text
stringlengths
107
2.17M
Require Import Arith. Require Import Omega. Require Import List. Import ListNotations. Require Import Sorting.Permutation. Require Import StructTact.StructTactics. Require Import StructTact.ListTactics. Set Implicit Arguments. Notation member := (in_dec eq_nat_dec). Lemma seq_range : forall n a x, In x (seq a n) -> a <= x < a + n. Proof. (* Goal: forall (n a x : nat) (_ : @In nat x (seq a n)), and (le a x) (lt x (Init.Nat.add a n)) *) induction n; intros; simpl in *. (* Goal: and (le a x) (lt x (Init.Nat.add a (S n))) *) (* Goal: and (le a x) (lt x (Init.Nat.add a O)) *) - (* Goal: and (le a x) (lt x (Init.Nat.add a O)) *) intuition. (* BG Goal: and (le a x) (lt x (Init.Nat.add a (S n))) *) - (* Goal: and (le a x) (lt x (Init.Nat.add a (S n))) *) break_or_hyp; try find_apply_hyp_hyp; intuition. Qed. Lemma plus_gt_0 : forall a b, a + b > 0 -> a > 0 \/ b > 0. Proof. (* Goal: forall (a b : nat) (_ : gt (Init.Nat.add a b) O), or (gt a O) (gt b O) *) intros. (* Goal: or (gt a O) (gt b O) *) destruct (eq_nat_dec a 0); intuition. Qed. Section list_util. Variables A B C : Type. Hypothesis A_eq_dec : forall x y : A, {x = y} + {x <> y}. Lemma list_neq_cons : forall (l : list A) x, x :: l <> l. Proof. (* Goal: forall (l : list A) (x : A), not (@eq (list A) (@cons A x l) l) *) intuition. (* Goal: False *) symmetry in H. (* Goal: False *) induction l; now inversion H. Qed. Lemma remove_preserve : forall (x y : A) xs, x <> y -> In y xs -> In y (remove A_eq_dec x xs). Proof. (* Goal: forall (x y : A) (xs : list A) (_ : not (@eq A x y)) (_ : @In A y xs), @In A y (@remove A A_eq_dec x xs) *) induction xs; intros. (* Goal: @In A y (@remove A A_eq_dec x (@cons A a xs)) *) (* Goal: @In A y (@remove A A_eq_dec x (@nil A)) *) - (* Goal: @In A y (@remove A A_eq_dec x (@nil A)) *) intuition. (* BG Goal: @In A y (@remove A A_eq_dec x (@cons A a xs)) *) - (* Goal: @In A y (@remove A A_eq_dec x (@cons A a xs)) *) simpl in *. (* Goal: @In A y (if A_eq_dec x a then @remove A A_eq_dec x xs else @cons A a (@remove A A_eq_dec x xs)) *) concludes. (* Goal: @In A y (if A_eq_dec x a then @remove A A_eq_dec x xs else @cons A a (@remove A A_eq_dec x xs)) *) intuition; break_if; subst; try congruence; intuition. Qed. Lemma in_remove : forall (x y : A) xs, In y (remove A_eq_dec x xs) -> In y xs. Proof. (* Goal: forall (x y : A) (xs : list A) (_ : @In A y (@remove A A_eq_dec x xs)), @In A y xs *) induction xs; intros. (* Goal: @In A y (@cons A a xs) *) (* Goal: @In A y (@nil A) *) - (* Goal: @In A y (@nil A) *) auto. (* BG Goal: @In A y (@cons A a xs) *) - (* Goal: @In A y (@cons A a xs) *) simpl in *. (* Goal: or (@eq A a y) (@In A y xs) *) break_if; simpl in *; intuition. Qed. Lemma remove_partition : forall xs (p : A) ys, remove A_eq_dec p (xs ++ p :: ys) = remove A_eq_dec p (xs ++ ys). Proof. (* Goal: forall (xs : list A) (p : A) (ys : list A), @eq (list A) (@remove A A_eq_dec p (@app A xs (@cons A p ys))) (@remove A A_eq_dec p (@app A xs ys)) *) induction xs; intros; simpl; break_if; congruence. Qed. Lemma remove_not_in : forall (x : A) xs, ~ In x xs -> remove A_eq_dec x xs = xs. Proof. (* Goal: forall (x : A) (xs : list A) (_ : not (@In A x xs)), @eq (list A) (@remove A A_eq_dec x xs) xs *) intros. (* Goal: @eq (list A) (@remove A A_eq_dec x xs) xs *) induction xs; simpl in *; try break_if; intuition congruence. Qed. Lemma remove_app_comm : forall a xs ys, remove A_eq_dec a (xs ++ ys) = remove A_eq_dec a xs ++ remove A_eq_dec a ys. Proof. (* Goal: forall (a : A) (xs ys : list A), @eq (list A) (@remove A A_eq_dec a (@app A xs ys)) (@app A (@remove A A_eq_dec a xs) (@remove A A_eq_dec a ys)) *) intros. (* Goal: @eq (list A) (@remove A A_eq_dec a (@app A xs ys)) (@app A (@remove A A_eq_dec a xs) (@remove A A_eq_dec a ys)) *) generalize dependent ys. (* Goal: forall ys : list A, @eq (list A) (@remove A A_eq_dec a (@app A xs ys)) (@app A (@remove A A_eq_dec a xs) (@remove A A_eq_dec a ys)) *) induction xs; intros. (* Goal: @eq (list A) (@remove A A_eq_dec a (@app A (@cons A a0 xs) ys)) (@app A (@remove A A_eq_dec a (@cons A a0 xs)) (@remove A A_eq_dec a ys)) *) (* Goal: @eq (list A) (@remove A A_eq_dec a (@app A (@nil A) ys)) (@app A (@remove A A_eq_dec a (@nil A)) (@remove A A_eq_dec a ys)) *) - (* Goal: @eq (list A) (@remove A A_eq_dec a (@app A (@nil A) ys)) (@app A (@remove A A_eq_dec a (@nil A)) (@remove A A_eq_dec a ys)) *) tauto. (* BG Goal: @eq (list A) (@remove A A_eq_dec a (@app A (@cons A a0 xs) ys)) (@app A (@remove A A_eq_dec a (@cons A a0 xs)) (@remove A A_eq_dec a ys)) *) - (* Goal: @eq (list A) (@remove A A_eq_dec a (@app A (@cons A a0 xs) ys)) (@app A (@remove A A_eq_dec a (@cons A a0 xs)) (@remove A A_eq_dec a ys)) *) destruct (A_eq_dec a0 a); simpl; break_if; try rewrite <- app_comm_cons; rewrite IHxs; congruence. Qed. Lemma filter_app : forall (f : A -> bool) xs ys, filter f (xs ++ ys) = filter f xs ++ filter f ys. Proof. (* Goal: forall (f : forall _ : A, bool) (xs ys : list A), @eq (list A) (@filter A f (@app A xs ys)) (@app A (@filter A f xs) (@filter A f ys)) *) induction xs; intros. (* Goal: @eq (list A) (@filter A f (@app A (@cons A a xs) ys)) (@app A (@filter A f (@cons A a xs)) (@filter A f ys)) *) (* Goal: @eq (list A) (@filter A f (@app A (@nil A) ys)) (@app A (@filter A f (@nil A)) (@filter A f ys)) *) - (* Goal: @eq (list A) (@filter A f (@app A (@nil A) ys)) (@app A (@filter A f (@nil A)) (@filter A f ys)) *) auto. (* BG Goal: @eq (list A) (@filter A f (@app A (@cons A a xs) ys)) (@app A (@filter A f (@cons A a xs)) (@filter A f ys)) *) - (* Goal: @eq (list A) (@filter A f (@app A (@cons A a xs) ys)) (@app A (@filter A f (@cons A a xs)) (@filter A f ys)) *) simpl. (* Goal: @eq (list A) (if f a then @cons A a (@filter A f (@app A xs ys)) else @filter A f (@app A xs ys)) (@app A (if f a then @cons A a (@filter A f xs) else @filter A f xs) (@filter A f ys)) *) rewrite IHxs. (* Goal: @eq (list A) (if f a then @cons A a (@app A (@filter A f xs) (@filter A f ys)) else @app A (@filter A f xs) (@filter A f ys)) (@app A (if f a then @cons A a (@filter A f xs) else @filter A f xs) (@filter A f ys)) *) break_if; auto. Qed. Lemma filter_fun_ext_eq : forall f g xs, (forall a : A, In a xs -> f a = g a) -> filter f xs = filter g xs. Proof. (* Goal: forall (f g : forall _ : A, bool) (xs : list A) (_ : forall (a : A) (_ : @In A a xs), @eq bool (f a) (g a)), @eq (list A) (@filter A f xs) (@filter A g xs) *) induction xs; intros. (* Goal: @eq (list A) (@filter A f (@cons A a xs)) (@filter A g (@cons A a xs)) *) (* Goal: @eq (list A) (@filter A f (@nil A)) (@filter A g (@nil A)) *) - (* Goal: @eq (list A) (@filter A f (@nil A)) (@filter A g (@nil A)) *) auto. (* BG Goal: @eq (list A) (@filter A f (@cons A a xs)) (@filter A g (@cons A a xs)) *) - (* Goal: @eq (list A) (@filter A f (@cons A a xs)) (@filter A g (@cons A a xs)) *) simpl. (* Goal: @eq (list A) (if f a then @cons A a (@filter A f xs) else @filter A f xs) (if g a then @cons A a (@filter A g xs) else @filter A g xs) *) rewrite H by intuition. (* Goal: @eq (list A) (if g a then @cons A a (@filter A f xs) else @filter A f xs) (if g a then @cons A a (@filter A g xs) else @filter A g xs) *) rewrite IHxs by intuition. (* Goal: @eq (list A) (if g a then @cons A a (@filter A g xs) else @filter A g xs) (if g a then @cons A a (@filter A g xs) else @filter A g xs) *) auto. Qed. Lemma not_in_filter_false : forall (f : A -> bool) l x, In x l -> ~ In x (filter f l) -> f x = false. Proof. (* Goal: forall (f : forall _ : A, bool) (l : list A) (x : A) (_ : @In A x l) (_ : not (@In A x (@filter A f l))), @eq bool (f x) false *) intros. (* Goal: @eq bool (f x) false *) destruct (f x) eqn:?H; [|tauto]. (* Goal: @eq bool true false *) unfold not in *; find_false. (* Goal: @In A x (@filter A f l) *) now eapply filter_In. Qed. Lemma filter_length_bound : forall f (l : list A), length (filter f l) <= length l. Proof. (* Goal: forall (f : forall _ : A, bool) (l : list A), le (@length A (@filter A f l)) (@length A l) *) induction l. (* Goal: le (@length A (@filter A f (@cons A a l))) (@length A (@cons A a l)) *) (* Goal: le (@length A (@filter A f (@nil A))) (@length A (@nil A)) *) - (* Goal: le (@length A (@filter A f (@nil A))) (@length A (@nil A)) *) easy. (* BG Goal: le (@length A (@filter A f (@cons A a l))) (@length A (@cons A a l)) *) - (* Goal: le (@length A (@filter A f (@cons A a l))) (@length A (@cons A a l)) *) simpl. (* Goal: le (@length A (if f a then @cons A a (@filter A f l) else @filter A f l)) (S (@length A l)) *) break_if; simpl; omega. Qed. Lemma NoDup_map_injective : forall (f : A -> B) xs, (forall x y, In x xs -> In y xs -> f x = f y -> x = y) -> NoDup xs -> NoDup (map f xs). Proof. (* Goal: forall (f : forall _ : A, B) (xs : list A) (_ : forall (x y : A) (_ : @In A x xs) (_ : @In A y xs) (_ : @eq B (f x) (f y)), @eq A x y) (_ : @NoDup A xs), @NoDup B (@map A B f xs) *) induction xs; intros. (* Goal: @NoDup B (@map A B f (@cons A a xs)) *) (* Goal: @NoDup B (@map A B f (@nil A)) *) - (* Goal: @NoDup B (@map A B f (@nil A)) *) constructor. (* BG Goal: @NoDup B (@map A B f (@cons A a xs)) *) - (* Goal: @NoDup B (@map A B f (@cons A a xs)) *) simpl. (* Goal: @NoDup B (@cons B (f a) (@map A B f xs)) *) invc_NoDup. (* Goal: @NoDup B (@cons B (f a) (@map A B f xs)) *) constructor. (* Goal: @NoDup B (@map A B f xs) *) (* Goal: not (@In B (f a) (@map A B f xs)) *) + (* Goal: not (@In B (f a) (@map A B f xs)) *) intro. (* Goal: False *) do_in_map. (* Goal: False *) assert (x = a) by intuition. (* Goal: False *) congruence. (* BG Goal: @NoDup B (@map A B f xs) *) + (* Goal: @NoDup B (@map A B f xs) *) intuition. Qed. Lemma NoDup_disjoint_append : forall (l : list A) l', NoDup l -> NoDup l' -> (forall a, In a l -> ~ In a l') -> NoDup (l ++ l'). Proof. (* Goal: forall (l l' : list A) (_ : @NoDup A l) (_ : @NoDup A l') (_ : forall (a : A) (_ : @In A a l), not (@In A a l')), @NoDup A (@app A l l') *) induction l; intros. (* Goal: @NoDup A (@app A (@cons A a l) l') *) (* Goal: @NoDup A (@app A (@nil A) l') *) - (* Goal: @NoDup A (@app A (@nil A) l') *) auto. (* BG Goal: @NoDup A (@app A (@cons A a l) l') *) - (* Goal: @NoDup A (@app A (@cons A a l) l') *) simpl. (* Goal: @NoDup A (@cons A a (@app A l l')) *) invc_NoDup. (* Goal: @NoDup A (@cons A a (@app A l l')) *) constructor. (* Goal: @NoDup A (@app A l l') *) (* Goal: not (@In A a (@app A l l')) *) + (* Goal: not (@In A a (@app A l l')) *) intro. (* Goal: False *) do_in_app. (* Goal: False *) intuition eauto with *. (* BG Goal: @NoDup A (@app A l l') *) + (* Goal: @NoDup A (@app A l l') *) intuition eauto with *. Qed. Lemma NoDup_map_partition : forall (f : A -> B) xs l y zs xs' y' zs', NoDup (map f l) -> l = xs ++ y :: zs -> l = xs' ++ y' :: zs' -> f y = f y' -> xs = xs'. Proof. (* Goal: forall (f : forall _ : A, B) (xs l : list A) (y : A) (zs xs' : list A) (y' : A) (zs' : list A) (_ : @NoDup B (@map A B f l)) (_ : @eq (list A) l (@app A xs (@cons A y zs))) (_ : @eq (list A) l (@app A xs' (@cons A y' zs'))) (_ : @eq B (f y) (f y')), @eq (list A) xs xs' *) induction xs; simpl; intros; destruct xs'. (* Goal: @eq (list A) (@cons A a xs) (@cons A a0 xs') *) (* Goal: @eq (list A) (@cons A a xs) (@nil A) *) (* Goal: @eq (list A) (@nil A) (@cons A a xs') *) (* Goal: @eq (list A) (@nil A) (@nil A) *) - (* Goal: @eq (list A) (@nil A) (@nil A) *) auto. (* BG Goal: @eq (list A) (@cons A a xs) (@cons A a0 xs') *) (* BG Goal: @eq (list A) (@cons A a xs) (@nil A) *) (* BG Goal: @eq (list A) (@nil A) (@cons A a xs') *) - (* Goal: @eq (list A) (@nil A) (@cons A a xs') *) subst. (* Goal: @eq (list A) (@nil A) (@cons A a xs') *) simpl in *. (* Goal: @eq (list A) (@nil A) (@cons A a xs') *) find_inversion. (* Goal: @eq (list A) (@nil A) (@cons A a xs') *) invc H. (* Goal: @eq (list A) (@nil A) (@cons A a xs') *) exfalso. (* Goal: False *) rewrite map_app in *. (* Goal: False *) simpl in *. (* Goal: False *) repeat find_rewrite. (* Goal: False *) intuition. (* BG Goal: @eq (list A) (@cons A a xs) (@cons A a0 xs') *) (* BG Goal: @eq (list A) (@cons A a xs) (@nil A) *) - (* Goal: @eq (list A) (@cons A a xs) (@nil A) *) subst. (* Goal: @eq (list A) (@cons A a xs) (@nil A) *) simpl in *. (* Goal: @eq (list A) (@cons A a xs) (@nil A) *) find_inversion. (* Goal: @eq (list A) (@cons A y' xs) (@nil A) *) invc H. (* Goal: @eq (list A) (@cons A y' xs) (@nil A) *) exfalso. (* Goal: False *) rewrite map_app in *. (* Goal: False *) simpl in *. (* Goal: False *) repeat find_rewrite. (* Goal: False *) intuition. (* BG Goal: @eq (list A) (@cons A a xs) (@cons A a0 xs') *) - (* Goal: @eq (list A) (@cons A a xs) (@cons A a0 xs') *) subst. (* Goal: @eq (list A) (@cons A a xs) (@cons A a0 xs') *) simpl in *. (* Goal: @eq (list A) (@cons A a xs) (@cons A a0 xs') *) find_injection. (* Goal: @eq (list A) (@cons A a0 xs) (@cons A a0 xs') *) intros. (* Goal: @eq (list A) (@cons A a0 xs) (@cons A a0 xs') *) subst. (* Goal: @eq (list A) (@cons A a0 xs) (@cons A a0 xs') *) f_equal. (* Goal: @eq (list A) xs xs' *) eapply IHxs; eauto. (* Goal: @NoDup B (@map A B f (@app A xs (@cons A y zs))) *) solve_by_inversion. Qed. Lemma filter_NoDup : forall p (l : list A), NoDup l -> NoDup (filter p l). Proof. (* Goal: forall (p : forall _ : A, bool) (l : list A) (_ : @NoDup A l), @NoDup A (@filter A p l) *) induction l; intros. (* Goal: @NoDup A (@filter A p (@cons A a l)) *) (* Goal: @NoDup A (@filter A p (@nil A)) *) - (* Goal: @NoDup A (@filter A p (@nil A)) *) auto. (* BG Goal: @NoDup A (@filter A p (@cons A a l)) *) - (* Goal: @NoDup A (@filter A p (@cons A a l)) *) invc_NoDup. (* Goal: @NoDup A (@filter A p (@cons A a l)) *) simpl. (* Goal: @NoDup A (if p a then @cons A a (@filter A p l) else @filter A p l) *) break_if; auto. (* Goal: @NoDup A (@cons A a (@filter A p l)) *) constructor; auto. (* Goal: not (@In A a (@filter A p l)) *) intro. (* Goal: False *) apply filter_In in H. (* Goal: False *) intuition. Qed. Lemma NoDup_map_filter : forall (f : A -> B) g l, NoDup (map f l) -> NoDup (map f (filter g l)). Proof. (* Goal: forall (f : forall _ : A, B) (g : forall _ : A, bool) (l : list A) (_ : @NoDup B (@map A B f l)), @NoDup B (@map A B f (@filter A g l)) *) intros. (* Goal: @NoDup B (@map A B f (@filter A g l)) *) induction l; simpl in *. (* Goal: @NoDup B (@map A B f (if g a then @cons A a (@filter A g l) else @filter A g l)) *) (* Goal: @NoDup B (@nil B) *) - (* Goal: @NoDup B (@nil B) *) constructor. (* BG Goal: @NoDup B (@map A B f (if g a then @cons A a (@filter A g l) else @filter A g l)) *) - (* Goal: @NoDup B (@map A B f (if g a then @cons A a (@filter A g l) else @filter A g l)) *) invc_NoDup. (* Goal: @NoDup B (@map A B f (if g a then @cons A a (@filter A g l) else @filter A g l)) *) concludes. (* Goal: @NoDup B (@map A B f (if g a then @cons A a (@filter A g l) else @filter A g l)) *) break_if; simpl in *; auto. (* Goal: @NoDup B (@cons B (f a) (@map A B f (@filter A g l))) *) constructor; auto. (* Goal: not (@In B (f a) (@map A B f (@filter A g l))) *) intro. (* Goal: False *) do_in_map. (* Goal: False *) find_apply_lem_hyp filter_In. (* Goal: False *) intuition. (* Goal: False *) match goal with | H : _ -> False |- False => apply H end. (* Goal: @In B (f a) (@map A B f l) *) apply in_map_iff. (* Goal: @ex A (fun x : A => and (@eq B (f x) (f a)) (@In A x l)) *) eauto. Qed. Lemma filter_true_id : forall (f : A -> bool) xs, (forall x, In x xs -> f x = true) -> filter f xs = xs. Proof. (* Goal: forall (f : forall _ : A, bool) (xs : list A) (_ : forall (x : A) (_ : @In A x xs), @eq bool (f x) true), @eq (list A) (@filter A f xs) xs *) induction xs; intros. (* Goal: @eq (list A) (@filter A f (@cons A a xs)) (@cons A a xs) *) (* Goal: @eq (list A) (@filter A f (@nil A)) (@nil A) *) - (* Goal: @eq (list A) (@filter A f (@nil A)) (@nil A) *) auto. (* BG Goal: @eq (list A) (@filter A f (@cons A a xs)) (@cons A a xs) *) - (* Goal: @eq (list A) (@filter A f (@cons A a xs)) (@cons A a xs) *) simpl. (* Goal: @eq (list A) (if f a then @cons A a (@filter A f xs) else @filter A f xs) (@cons A a xs) *) now rewrite H, IHxs by intuition. Qed. Lemma map_of_map : forall (f : A -> B) (g : B -> C) xs, map g (map f xs) = map (fun x => g (f x)) xs. Proof. (* Goal: forall (f : forall _ : A, B) (g : forall _ : B, C) (xs : list A), @eq (list C) (@map B C g (@map A B f xs)) (@map A C (fun x : A => g (f x)) xs) *) induction xs; simpl; auto using f_equal2. Qed. Lemma filter_except_one : forall (f g : A -> bool) x xs, (forall y, In y xs -> x <> y -> f y = g y) -> g x = false -> filter f (remove A_eq_dec x xs) = filter g xs. Proof. (* Goal: forall (f g : forall _ : A, bool) (x : A) (xs : list A) (_ : forall (y : A) (_ : @In A y xs) (_ : not (@eq A x y)), @eq bool (f y) (g y)) (_ : @eq bool (g x) false), @eq (list A) (@filter A f (@remove A A_eq_dec x xs)) (@filter A g xs) *) induction xs; intros. (* Goal: @eq (list A) (@filter A f (@remove A A_eq_dec x (@cons A a xs))) (@filter A g (@cons A a xs)) *) (* Goal: @eq (list A) (@filter A f (@remove A A_eq_dec x (@nil A))) (@filter A g (@nil A)) *) - (* Goal: @eq (list A) (@filter A f (@remove A A_eq_dec x (@nil A))) (@filter A g (@nil A)) *) auto. (* BG Goal: @eq (list A) (@filter A f (@remove A A_eq_dec x (@cons A a xs))) (@filter A g (@cons A a xs)) *) - (* Goal: @eq (list A) (@filter A f (@remove A A_eq_dec x (@cons A a xs))) (@filter A g (@cons A a xs)) *) simpl. (* Goal: @eq (list A) (@filter A f (if A_eq_dec x a then @remove A A_eq_dec x xs else @cons A a (@remove A A_eq_dec x xs))) (if g a then @cons A a (@filter A g xs) else @filter A g xs) *) break_if. (* Goal: @eq (list A) (@filter A f (@cons A a (@remove A A_eq_dec x xs))) (if g a then @cons A a (@filter A g xs) else @filter A g xs) *) (* Goal: @eq (list A) (@filter A f (@remove A A_eq_dec x xs)) (if g a then @cons A a (@filter A g xs) else @filter A g xs) *) + (* Goal: @eq (list A) (@filter A f (@remove A A_eq_dec x xs)) (if g a then @cons A a (@filter A g xs) else @filter A g xs) *) subst. (* Goal: @eq (list A) (@filter A f (@remove A A_eq_dec a xs)) (if g a then @cons A a (@filter A g xs) else @filter A g xs) *) repeat find_rewrite. (* Goal: @eq (list A) (@filter A f (@remove A A_eq_dec a xs)) (@filter A g xs) *) eauto with *. (* BG Goal: @eq (list A) (@filter A f (@cons A a (@remove A A_eq_dec x xs))) (if g a then @cons A a (@filter A g xs) else @filter A g xs) *) + (* Goal: @eq (list A) (@filter A f (@cons A a (@remove A A_eq_dec x xs))) (if g a then @cons A a (@filter A g xs) else @filter A g xs) *) simpl. (* Goal: @eq (list A) (if f a then @cons A a (@filter A f (@remove A A_eq_dec x xs)) else @filter A f (@remove A A_eq_dec x xs)) (if g a then @cons A a (@filter A g xs) else @filter A g xs) *) rewrite H by auto with *. (* Goal: @eq (list A) (if g a then @cons A a (@filter A f (@remove A A_eq_dec x xs)) else @filter A f (@remove A A_eq_dec x xs)) (if g a then @cons A a (@filter A g xs) else @filter A g xs) *) break_if; eauto using f_equal2 with *. Qed. Lemma flat_map_nil : forall (f : A -> list B) l, flat_map f l = [] -> l = [] \/ (forall x, In x l -> f x = []). Proof. (* Goal: forall (f : forall _ : A, list B) (l : list A) (_ : @eq (list B) (@flat_map A B f l) (@nil B)), or (@eq (list A) l (@nil A)) (forall (x : A) (_ : @In A x l), @eq (list B) (f x) (@nil B)) *) induction l; intros. (* Goal: or (@eq (list A) (@cons A a l) (@nil A)) (forall (x : A) (_ : @In A x (@cons A a l)), @eq (list B) (f x) (@nil B)) *) (* Goal: or (@eq (list A) (@nil A) (@nil A)) (forall (x : A) (_ : @In A x (@nil A)), @eq (list B) (f x) (@nil B)) *) - (* Goal: or (@eq (list A) (@nil A) (@nil A)) (forall (x : A) (_ : @In A x (@nil A)), @eq (list B) (f x) (@nil B)) *) intuition. (* BG Goal: or (@eq (list A) (@cons A a l) (@nil A)) (forall (x : A) (_ : @In A x (@cons A a l)), @eq (list B) (f x) (@nil B)) *) - (* Goal: or (@eq (list A) (@cons A a l) (@nil A)) (forall (x : A) (_ : @In A x (@cons A a l)), @eq (list B) (f x) (@nil B)) *) right. (* Goal: forall (x : A) (_ : @In A x (@cons A a l)), @eq (list B) (f x) (@nil B) *) simpl in *. (* Goal: forall (x : A) (_ : or (@eq A a x) (@In A x l)), @eq (list B) (f x) (@nil B) *) apply app_eq_nil in H. (* Goal: forall (x : A) (_ : or (@eq A a x) (@In A x l)), @eq (list B) (f x) (@nil B) *) intuition; subst; simpl in *; intuition. Qed. Theorem NoDup_Permutation_NoDup : forall (l l' : list A), NoDup l -> Permutation l l' -> NoDup l'. Proof. (* Goal: forall (l l' : list A) (_ : @NoDup A l) (_ : @Permutation A l l'), @NoDup A l' *) intros l l' Hnd Hp. (* Goal: @NoDup A l' *) induction Hp; auto; invc_NoDup; constructor; eauto using Permutation_in, Permutation_sym; simpl in *; intuition. Qed. Theorem NoDup_append : forall l (a : A), NoDup (l ++ [a]) <-> NoDup (a :: l). Proof. (* Goal: forall (l : list A) (a : A), iff (@NoDup A (@app A l (@cons A a (@nil A)))) (@NoDup A (@cons A a l)) *) intuition eauto using NoDup_Permutation_NoDup, Permutation_sym, Permutation_cons_append. Qed. Lemma NoDup_map_elim : forall (f : A -> B) xs x y, f x = f y -> NoDup (map f xs) -> In x xs -> In y xs -> x = y. Proof. (* Goal: forall (f : forall _ : A, B) (xs : list A) (x y : A) (_ : @eq B (f x) (f y)) (_ : @NoDup B (@map A B f xs)) (_ : @In A x xs) (_ : @In A y xs), @eq A x y *) induction xs; intros; simpl in *. (* Goal: @eq A x y *) (* Goal: @eq A x y *) - (* Goal: @eq A x y *) intuition. (* BG Goal: @eq A x y *) - (* Goal: @eq A x y *) invc_NoDup. (* Goal: @eq A x y *) intuition; subst; auto; exfalso. (* Goal: False *) (* Goal: False *) + (* Goal: False *) repeat find_rewrite. (* Goal: False *) auto using in_map. (* BG Goal: False *) + (* Goal: False *) repeat find_reverse_rewrite. (* Goal: False *) auto using in_map. Qed. Lemma remove_length_not_in : forall (x : A) xs, ~ In x xs -> length (remove A_eq_dec x xs) = length xs. Proof. (* Goal: forall (x : A) (xs : list A) (_ : not (@In A x xs)), @eq nat (@length A (@remove A A_eq_dec x xs)) (@length A xs) *) induction xs; intros. (* Goal: @eq nat (@length A (@remove A A_eq_dec x (@cons A a xs))) (@length A (@cons A a xs)) *) (* Goal: @eq nat (@length A (@remove A A_eq_dec x (@nil A))) (@length A (@nil A)) *) - (* Goal: @eq nat (@length A (@remove A A_eq_dec x (@nil A))) (@length A (@nil A)) *) auto. (* BG Goal: @eq nat (@length A (@remove A A_eq_dec x (@cons A a xs))) (@length A (@cons A a xs)) *) - (* Goal: @eq nat (@length A (@remove A A_eq_dec x (@cons A a xs))) (@length A (@cons A a xs)) *) simpl in *. (* Goal: @eq nat (@length A (if A_eq_dec x a then @remove A A_eq_dec x xs else @cons A a (@remove A A_eq_dec x xs))) (S (@length A xs)) *) intuition. (* Goal: @eq nat (@length A (if A_eq_dec x a then @remove A A_eq_dec x xs else @cons A a (@remove A A_eq_dec x xs))) (S (@length A xs)) *) break_if; subst; simpl; intuition. Qed. Lemma remove_length_in : forall (x : A) xs, In x xs -> NoDup xs -> S (length (remove A_eq_dec x xs)) = length xs. Proof. (* Goal: forall (x : A) (xs : list A) (_ : @In A x xs) (_ : @NoDup A xs), @eq nat (S (@length A (@remove A A_eq_dec x xs))) (@length A xs) *) induction xs; intros; simpl in *; intuition; invc_NoDup; break_if; subst; intuition (simpl; try congruence). (* Goal: @eq nat (S (@length A (@remove A A_eq_dec x xs))) (S (@length A xs)) *) now rewrite remove_length_not_in. Qed. Lemma subset_size_eq : forall xs, NoDup xs -> forall ys, NoDup ys -> (forall x : A, In x xs -> In x ys) -> length xs = length ys -> (forall x, In x ys -> In x xs). Proof. (* Goal: forall (xs : list A) (_ : @NoDup A xs) (ys : list A) (_ : @NoDup A ys) (_ : forall (x : A) (_ : @In A x xs), @In A x ys) (_ : @eq nat (@length A xs) (@length A ys)) (x : A) (_ : @In A x ys), @In A x xs *) induction xs; intros. (* Goal: @In A x (@cons A a xs) *) (* Goal: @In A x (@nil A) *) - (* Goal: @In A x (@nil A) *) destruct ys; simpl in *; congruence. (* BG Goal: @In A x (@cons A a xs) *) - (* Goal: @In A x (@cons A a xs) *) invc_NoDup. (* Goal: @In A x (@cons A a xs) *) concludes. (* Goal: @In A x (@cons A a xs) *) assert (In a ys) by eauto with *. (* Goal: @In A x (@cons A a xs) *) find_apply_lem_hyp in_split. (* Goal: @In A x (@cons A a xs) *) break_exists_name l1. (* Goal: @In A x (@cons A a xs) *) break_exists_name l2. (* Goal: @In A x (@cons A a xs) *) subst. (* Goal: @In A x (@cons A a xs) *) specialize (IHxs (l1 ++ l2)). (* Goal: @In A x (@cons A a xs) *) conclude_using ltac:(eauto using NoDup_remove_1). (* Goal: @In A x (@cons A a xs) *) forward IHxs. (* Goal: @In A x (@cons A a xs) *) (* Goal: forall (x : A) (_ : @In A x xs), @In A x (@app A l1 l2) *) intros x' Hx'. (* Goal: @In A x (@cons A a xs) *) (* Goal: @In A x' (@app A l1 l2) *) assert (In x' (l1 ++ a :: l2)) by eauto with *. (* Goal: @In A x (@cons A a xs) *) (* Goal: @In A x' (@app A l1 l2) *) do_in_app. (* Goal: @In A x (@cons A a xs) *) (* Goal: @In A x' (@app A l1 l2) *) simpl in *. (* Goal: @In A x (@cons A a xs) *) (* Goal: @In A x' (@app A l1 l2) *) intuition. (* Goal: @In A x (@cons A a xs) *) (* Goal: @In A x' (@app A l1 l2) *) subst. (* Goal: @In A x (@cons A a xs) *) (* Goal: @In A x' (@app A l1 l2) *) congruence. (* Goal: @In A x (@cons A a xs) *) concludes. (* Goal: @In A x (@cons A a xs) *) forward IHxs. (* Goal: @In A x (@cons A a xs) *) (* Goal: @eq nat (@length A xs) (@length A (@app A l1 l2)) *) rewrite app_length in *. (* Goal: @In A x (@cons A a xs) *) (* Goal: @eq nat (@length A xs) (Init.Nat.add (@length A l1) (@length A l2)) *) simpl in *. (* Goal: @In A x (@cons A a xs) *) (* Goal: @eq nat (@length A xs) (Init.Nat.add (@length A l1) (@length A l2)) *) omega. (* Goal: @In A x (@cons A a xs) *) concludes. (* Goal: @In A x (@cons A a xs) *) do_in_app. (* Goal: @In A x (@cons A a xs) *) simpl in *. (* Goal: or (@eq A a x) (@In A x xs) *) intuition. Qed. Lemma remove_NoDup : forall (x : A) xs, NoDup xs -> NoDup (remove A_eq_dec x xs). Proof. (* Goal: forall (x : A) (xs : list A) (_ : @NoDup A xs), @NoDup A (@remove A A_eq_dec x xs) *) induction xs; intros. (* Goal: @NoDup A (@remove A A_eq_dec x (@cons A a xs)) *) (* Goal: @NoDup A (@remove A A_eq_dec x (@nil A)) *) - (* Goal: @NoDup A (@remove A A_eq_dec x (@nil A)) *) auto with struct_util. (* BG Goal: @NoDup A (@remove A A_eq_dec x (@cons A a xs)) *) - (* Goal: @NoDup A (@remove A A_eq_dec x (@cons A a xs)) *) invc_NoDup. (* Goal: @NoDup A (@remove A A_eq_dec x (@cons A a xs)) *) simpl. (* Goal: @NoDup A (if A_eq_dec x a then @remove A A_eq_dec x xs else @cons A a (@remove A A_eq_dec x xs)) *) break_if; eauto 6 using in_remove with struct_util. Qed. Lemma remove_length_ge : forall (x : A) xs, NoDup xs -> length (remove A_eq_dec x xs) >= length xs - 1. Proof. (* Goal: forall (x : A) (xs : list A) (_ : @NoDup A xs), ge (@length A (@remove A A_eq_dec x xs)) (Init.Nat.sub (@length A xs) (S O)) *) induction xs; intros. (* Goal: ge (@length A (@remove A A_eq_dec x (@cons A a xs))) (Init.Nat.sub (@length A (@cons A a xs)) (S O)) *) (* Goal: ge (@length A (@remove A A_eq_dec x (@nil A))) (Init.Nat.sub (@length A (@nil A)) (S O)) *) - (* Goal: ge (@length A (@remove A A_eq_dec x (@nil A))) (Init.Nat.sub (@length A (@nil A)) (S O)) *) auto. (* BG Goal: ge (@length A (@remove A A_eq_dec x (@cons A a xs))) (Init.Nat.sub (@length A (@cons A a xs)) (S O)) *) - (* Goal: ge (@length A (@remove A A_eq_dec x (@cons A a xs))) (Init.Nat.sub (@length A (@cons A a xs)) (S O)) *) invc_NoDup. (* Goal: ge (@length A (@remove A A_eq_dec x (@cons A a xs))) (Init.Nat.sub (@length A (@cons A a xs)) (S O)) *) simpl. (* Goal: ge (@length A (if A_eq_dec x a then @remove A A_eq_dec x xs else @cons A a (@remove A A_eq_dec x xs))) (Init.Nat.sub (@length A xs) O) *) break_if. (* Goal: ge (@length A (@cons A a (@remove A A_eq_dec x xs))) (Init.Nat.sub (@length A xs) O) *) (* Goal: ge (@length A (@remove A A_eq_dec x xs)) (Init.Nat.sub (@length A xs) O) *) + (* Goal: ge (@length A (@remove A A_eq_dec x xs)) (Init.Nat.sub (@length A xs) O) *) rewrite <- minus_n_O. (* Goal: ge (@length A (@remove A A_eq_dec x xs)) (@length A xs) *) subst. (* Goal: ge (@length A (@remove A A_eq_dec a xs)) (@length A xs) *) rewrite remove_length_not_in; auto. (* BG Goal: ge (@length A (@cons A a (@remove A A_eq_dec x xs))) (Init.Nat.sub (@length A xs) O) *) + (* Goal: ge (@length A (@cons A a (@remove A A_eq_dec x xs))) (Init.Nat.sub (@length A xs) O) *) simpl. (* Goal: ge (S (@length A (@remove A A_eq_dec x xs))) (Init.Nat.sub (@length A xs) O) *) concludes. (* Goal: ge (S (@length A (@remove A A_eq_dec x xs))) (Init.Nat.sub (@length A xs) O) *) omega. Qed. Lemma remove_length_le : forall (x : A) xs eq_dec, length xs >= length (remove eq_dec x xs). Proof. (* Goal: forall (x : A) (xs : list A) (eq_dec : forall x0 y : A, sumbool (@eq A x0 y) (not (@eq A x0 y))), ge (@length A xs) (@length A (@remove A eq_dec x xs)) *) induction xs; intros. (* Goal: ge (@length A (@cons A a xs)) (@length A (@remove A eq_dec x (@cons A a xs))) *) (* Goal: ge (@length A (@nil A)) (@length A (@remove A eq_dec x (@nil A))) *) - (* Goal: ge (@length A (@nil A)) (@length A (@remove A eq_dec x (@nil A))) *) auto. (* BG Goal: ge (@length A (@cons A a xs)) (@length A (@remove A eq_dec x (@cons A a xs))) *) - (* Goal: ge (@length A (@cons A a xs)) (@length A (@remove A eq_dec x (@cons A a xs))) *) simpl in *. (* Goal: ge (S (@length A xs)) (@length A (if eq_dec x a then @remove A eq_dec x xs else @cons A a (@remove A eq_dec x xs))) *) specialize (IHxs eq_dec). (* Goal: ge (S (@length A xs)) (@length A (if eq_dec x a then @remove A eq_dec x xs else @cons A a (@remove A eq_dec x xs))) *) break_if; subst; simpl; omega. Qed. Lemma remove_length_lt : forall (x : A) xs eq_dec, In x xs -> length xs > length (remove eq_dec x xs). Proof. (* Goal: forall (x : A) (xs : list A) (eq_dec : forall x0 y : A, sumbool (@eq A x0 y) (not (@eq A x0 y))) (_ : @In A x xs), gt (@length A xs) (@length A (@remove A eq_dec x xs)) *) induction xs; intros; simpl in *; intuition. (* Goal: gt (S (@length A xs)) (@length A (if eq_dec x a then @remove A eq_dec x xs else @cons A a (@remove A eq_dec x xs))) *) (* Goal: gt (S (@length A xs)) (@length A (if eq_dec x a then @remove A eq_dec x xs else @cons A a (@remove A eq_dec x xs))) *) - (* Goal: gt (S (@length A xs)) (@length A (if eq_dec x a then @remove A eq_dec x xs else @cons A a (@remove A eq_dec x xs))) *) subst. (* Goal: gt (S (@length A xs)) (@length A (if eq_dec x x then @remove A eq_dec x xs else @cons A x (@remove A eq_dec x xs))) *) break_if; try congruence. (* Goal: gt (S (@length A xs)) (@length A (@remove A eq_dec x xs)) *) pose proof remove_length_le x xs eq_dec. (* Goal: gt (S (@length A xs)) (@length A (@remove A eq_dec x xs)) *) omega. (* BG Goal: gt (S (@length A xs)) (@length A (if eq_dec x a then @remove A eq_dec x xs else @cons A a (@remove A eq_dec x xs))) *) - (* Goal: gt (S (@length A xs)) (@length A (if eq_dec x a then @remove A eq_dec x xs else @cons A a (@remove A eq_dec x xs))) *) specialize (IHxs ltac:(eauto) ltac:(eauto)). (* Goal: gt (S (@length A xs)) (@length A (if eq_dec x a then @remove A eq_dec x xs else @cons A a (@remove A eq_dec x xs))) *) break_if; subst; simpl; omega. Qed. Lemma subset_length : forall xs ys, NoDup xs -> (forall x : A, In x xs -> In x ys) -> length ys >= length xs. Proof. (* Goal: forall (xs ys : list A) (_ : @NoDup A xs) (_ : forall (x : A) (_ : @In A x xs), @In A x ys), ge (@length A ys) (@length A xs) *) induction xs; intros. (* Goal: ge (@length A ys) (@length A (@cons A a xs)) *) (* Goal: ge (@length A ys) (@length A (@nil A)) *) - (* Goal: ge (@length A ys) (@length A (@nil A)) *) simpl. (* Goal: ge (@length A ys) O *) omega. (* BG Goal: ge (@length A ys) (@length A (@cons A a xs)) *) - (* Goal: ge (@length A ys) (@length A (@cons A a xs)) *) specialize (IHxs (remove A_eq_dec a ys)). (* Goal: ge (@length A ys) (@length A (@cons A a xs)) *) invc_NoDup. (* Goal: ge (@length A ys) (@length A (@cons A a xs)) *) concludes. (* Goal: ge (@length A ys) (@length A (@cons A a xs)) *) forward IHxs. (* Goal: ge (@length A ys) (@length A (@cons A a xs)) *) (* Goal: forall (x : A) (_ : @In A x xs), @In A x (@remove A A_eq_dec a ys) *) intros. (* Goal: ge (@length A ys) (@length A (@cons A a xs)) *) (* Goal: @In A x (@remove A A_eq_dec a ys) *) apply remove_preserve; [congruence|intuition]. (* Goal: ge (@length A ys) (@length A (@cons A a xs)) *) concludes. (* Goal: ge (@length A ys) (@length A (@cons A a xs)) *) pose proof remove_length_lt a ys A_eq_dec. (* Goal: ge (@length A ys) (@length A (@cons A a xs)) *) conclude_using intuition. (* Goal: ge (@length A ys) (@length A (@cons A a xs)) *) simpl. (* Goal: ge (@length A ys) (S (@length A xs)) *) omega. Qed. Lemma app_cons_singleton_inv : forall xs (y : A) zs w, xs ++ y :: zs = [w] -> xs = [] /\ y = w /\ zs = []. Proof. (* Goal: forall (xs : list A) (y : A) (zs : list A) (w : A) (_ : @eq (list A) (@app A xs (@cons A y zs)) (@cons A w (@nil A))), and (@eq (list A) xs (@nil A)) (and (@eq A y w) (@eq (list A) zs (@nil A))) *) intros. (* Goal: and (@eq (list A) xs (@nil A)) (and (@eq A y w) (@eq (list A) zs (@nil A))) *) destruct xs. (* Goal: and (@eq (list A) (@cons A a xs) (@nil A)) (and (@eq A y w) (@eq (list A) zs (@nil A))) *) (* Goal: and (@eq (list A) (@nil A) (@nil A)) (and (@eq A y w) (@eq (list A) zs (@nil A))) *) - (* Goal: and (@eq (list A) (@nil A) (@nil A)) (and (@eq A y w) (@eq (list A) zs (@nil A))) *) solve_by_inversion. (* BG Goal: and (@eq (list A) (@cons A a xs) (@nil A)) (and (@eq A y w) (@eq (list A) zs (@nil A))) *) - (* Goal: and (@eq (list A) (@cons A a xs) (@nil A)) (and (@eq A y w) (@eq (list A) zs (@nil A))) *) destruct xs; solve_by_inversion. Qed. Lemma app_cons_in : forall (l : list A) xs a ys, l = xs ++ a :: ys -> In a l. Proof. (* Goal: forall (l xs : list A) (a : A) (ys : list A) (_ : @eq (list A) l (@app A xs (@cons A a ys))), @In A a l *) intros. (* Goal: @In A a l *) subst. (* Goal: @In A a (@app A xs (@cons A a ys)) *) auto with *. Qed. Hint Resolve app_cons_in : struct_util. Lemma app_cons_in_rest: forall (l : list A) xs a b ys, l = xs ++ a :: ys -> In b (xs ++ ys) -> In b l. Proof. (* Goal: forall (l xs : list A) (a b : A) (ys : list A) (_ : @eq (list A) l (@app A xs (@cons A a ys))) (_ : @In A b (@app A xs ys)), @In A b l *) intros. (* Goal: @In A b l *) subst. (* Goal: @In A b (@app A xs (@cons A a ys)) *) in_crush. Qed. Hint Resolve app_cons_in_rest : struct_util. Lemma in_rest_app_cons: forall (l xs ys : list A) a b, l = xs ++ a :: ys -> In b l -> a <> b -> In b (xs ++ ys). Proof. (* Goal: forall (l xs ys : list A) (a b : A) (_ : @eq (list A) l (@app A xs (@cons A a ys))) (_ : @In A b l) (_ : not (@eq A a b)), @In A b (@app A xs ys) *) intros. (* Goal: @In A b (@app A xs ys) *) subst_max. (* Goal: @In A b (@app A xs ys) *) do_in_app. (* Goal: @In A b (@app A xs ys) *) break_or_hyp. (* Goal: @In A b (@app A xs ys) *) (* Goal: @In A b (@app A xs ys) *) - (* Goal: @In A b (@app A xs ys) *) auto with datatypes. (* BG Goal: @In A b (@app A xs ys) *) - (* Goal: @In A b (@app A xs ys) *) find_apply_lem_hyp in_inv. (* Goal: @In A b (@app A xs ys) *) break_or_hyp; auto using in_or_app || congruence. Qed. Hint Resolve in_rest_app_cons : struct_util. Lemma remove_filter_commute : forall (l : list A) A_eq_dec f x, remove A_eq_dec x (filter f l) = filter f (remove A_eq_dec x l). Proof. (* Goal: forall (l : list A) (A_eq_dec : forall x y : A, sumbool (@eq A x y) (not (@eq A x y))) (f : forall _ : A, bool) (x : A), @eq (list A) (@remove A A_eq_dec x (@filter A f l)) (@filter A f (@remove A A_eq_dec x l)) *) induction l; intros; simpl in *; auto. (* Goal: @eq (list A) (@remove A A_eq_dec0 x (if f a then @cons A a (@filter A f l) else @filter A f l)) (@filter A f (if A_eq_dec0 x a then @remove A A_eq_dec0 x l else @cons A a (@remove A A_eq_dec0 x l))) *) repeat (break_if; subst; simpl in *; try congruence). Qed. Lemma In_filter_In : forall (f : A -> bool) x l l', filter f l = l' -> In x l' -> In x l. Proof. (* Goal: forall (f : forall _ : A, bool) (x : A) (l l' : list A) (_ : @eq (list A) (@filter A f l) l') (_ : @In A x l'), @In A x l *) intros. (* Goal: @In A x l *) subst. (* Goal: @In A x l *) eapply filter_In; eauto. Qed. Lemma filter_partition : forall (l1 : list A) f l2 x l1' l2', NoDup (l1 ++ x :: l2) -> filter f (l1 ++ x :: l2) = (l1' ++ x :: l2') -> filter f l1 = l1' /\ filter f l2 = l2'. Proof. (* Goal: forall (l1 : list A) (f : forall _ : A, bool) (l2 : list A) (x : A) (l1' l2' : list A) (_ : @NoDup A (@app A l1 (@cons A x l2))) (_ : @eq (list A) (@filter A f (@app A l1 (@cons A x l2))) (@app A l1' (@cons A x l2'))), and (@eq (list A) (@filter A f l1) l1') (@eq (list A) (@filter A f l2) l2') *) induction l1; intros; simpl in *; break_if; simpl in *; invc_NoDup. (* Goal: and (@eq (list A) (@filter A f l1) l1') (@eq (list A) (@filter A f l2) l2') *) (* Goal: and (@eq (list A) (@cons A a (@filter A f l1)) l1') (@eq (list A) (@filter A f l2) l2') *) (* Goal: and (@eq (list A) (@nil A) l1') (@eq (list A) (@filter A f l2) l2') *) (* Goal: and (@eq (list A) (@nil A) l1') (@eq (list A) (@filter A f l2) l2') *) - (* Goal: and (@eq (list A) (@nil A) l1') (@eq (list A) (@filter A f l2) l2') *) destruct l1'; simpl in *. (* Goal: and (@eq (list A) (@nil A) (@cons A a l1')) (@eq (list A) (@filter A f l2) l2') *) (* Goal: and (@eq (list A) (@nil A) (@nil A)) (@eq (list A) (@filter A f l2) l2') *) + (* Goal: and (@eq (list A) (@nil A) (@nil A)) (@eq (list A) (@filter A f l2) l2') *) solve_by_inversion. (* BG Goal: and (@eq (list A) (@filter A f l1) l1') (@eq (list A) (@filter A f l2) l2') *) (* BG Goal: and (@eq (list A) (@cons A a (@filter A f l1)) l1') (@eq (list A) (@filter A f l2) l2') *) (* BG Goal: and (@eq (list A) (@nil A) l1') (@eq (list A) (@filter A f l2) l2') *) (* BG Goal: and (@eq (list A) (@nil A) (@cons A a l1')) (@eq (list A) (@filter A f l2) l2') *) + (* Goal: and (@eq (list A) (@nil A) (@cons A a l1')) (@eq (list A) (@filter A f l2) l2') *) find_inversion. (* Goal: and (@eq (list A) (@nil A) (@cons A a l1')) (@eq (list A) (@filter A f l2) l2') *) exfalso. (* Goal: False *) eauto using In_filter_In with *. (* BG Goal: and (@eq (list A) (@filter A f l1) l1') (@eq (list A) (@filter A f l2) l2') *) (* BG Goal: and (@eq (list A) (@cons A a (@filter A f l1)) l1') (@eq (list A) (@filter A f l2) l2') *) (* BG Goal: and (@eq (list A) (@nil A) l1') (@eq (list A) (@filter A f l2) l2') *) - (* Goal: and (@eq (list A) (@nil A) l1') (@eq (list A) (@filter A f l2) l2') *) exfalso. (* Goal: False *) eauto using In_filter_In with *. (* BG Goal: and (@eq (list A) (@filter A f l1) l1') (@eq (list A) (@filter A f l2) l2') *) (* BG Goal: and (@eq (list A) (@cons A a (@filter A f l1)) l1') (@eq (list A) (@filter A f l2) l2') *) - (* Goal: and (@eq (list A) (@cons A a (@filter A f l1)) l1') (@eq (list A) (@filter A f l2) l2') *) destruct l1'; simpl in *; break_and; find_inversion. (* Goal: and (@eq (list A) (@cons A a0 (@filter A f l1)) (@cons A a0 l1')) (@eq (list A) (@filter A f l2) l2') *) (* Goal: and (@eq (list A) (@cons A x (@filter A f l1)) (@nil A)) (@eq (list A) (@filter A f l2) (@filter A f (@app A l1 (@cons A x l2)))) *) + (* Goal: and (@eq (list A) (@cons A x (@filter A f l1)) (@nil A)) (@eq (list A) (@filter A f l2) (@filter A f (@app A l1 (@cons A x l2)))) *) exfalso. (* Goal: False *) eauto with *. (* BG Goal: and (@eq (list A) (@filter A f l1) l1') (@eq (list A) (@filter A f l2) l2') *) (* BG Goal: and (@eq (list A) (@cons A a0 (@filter A f l1)) (@cons A a0 l1')) (@eq (list A) (@filter A f l2) l2') *) + (* Goal: and (@eq (list A) (@cons A a0 (@filter A f l1)) (@cons A a0 l1')) (@eq (list A) (@filter A f l2) l2') *) find_apply_hyp_hyp. (* Goal: and (@eq (list A) (@cons A a0 (@filter A f l1)) (@cons A a0 l1')) (@eq (list A) (@filter A f l2) l2') *) intuition auto using f_equal2. (* BG Goal: and (@eq (list A) (@filter A f l1) l1') (@eq (list A) (@filter A f l2) l2') *) - (* Goal: and (@eq (list A) (@filter A f l1) l1') (@eq (list A) (@filter A f l2) l2') *) eauto. Qed. Lemma map_inverses : forall (la : list A) (lb : list B) (f : A -> B) g, (forall a, g (f a) = a) -> (forall b, f (g b) = b) -> lb = map f la -> la = map g lb. Proof. (* Goal: forall (la : list A) (lb : list B) (f : forall _ : A, B) (g : forall _ : B, A) (_ : forall a : A, @eq A (g (f a)) a) (_ : forall b : B, @eq B (f (g b)) b) (_ : @eq (list B) lb (@map A B f la)), @eq (list A) la (@map B A g lb) *) destruct la; intros; simpl in *. (* Goal: @eq (list A) (@cons A a la) (@map B A g lb) *) (* Goal: @eq (list A) (@nil A) (@map B A g lb) *) - (* Goal: @eq (list A) (@nil A) (@map B A g lb) *) subst. (* Goal: @eq (list A) (@nil A) (@map B A g (@nil B)) *) reflexivity. (* BG Goal: @eq (list A) (@cons A a la) (@map B A g lb) *) - (* Goal: @eq (list A) (@cons A a la) (@map B A g lb) *) destruct lb; try congruence. (* Goal: @eq (list A) (@cons A a la) (@map B A g (@cons B b lb)) *) simpl in *. (* Goal: @eq (list A) (@cons A a la) (@cons A (g b) (@map B A g lb)) *) find_inversion. (* Goal: @eq (list A) (@cons A a la) (@cons A (g (f a)) (@map B A g (@map A B f la))) *) find_higher_order_rewrite. (* Goal: @eq (list A) (@cons A a la) (@cons A a (@map B A g (@map A B f la))) *) f_equal. (* Goal: @eq (list A) la (@map B A g (@map A B f la)) *) rewrite map_map. (* Goal: @eq (list A) la (@map A A (fun x : A => g (f x)) la) *) erewrite map_ext; [symmetry; apply map_id|]. (* Goal: forall a : A, @eq A (g (f a)) ((fun x : A => x) a) *) simpl in *. (* Goal: forall a : A, @eq A (g (f a)) a *) auto. Qed. Lemma In_notIn_implies_neq : forall x y l, In(A:=A) x l -> ~ In(A:=A) y l -> x <> y. Proof. (* Goal: forall (x y : A) (l : list A) (_ : @In A x l) (_ : not (@In A y l)), not (@eq A x y) *) intuition congruence. Qed. Lemma In_cons_neq : forall a x xs, In(A:=A) a (x :: xs) -> a <> x -> In a xs. Proof. (* Goal: forall (a x : A) (xs : list A) (_ : @In A a (@cons A x xs)) (_ : not (@eq A a x)), @In A a xs *) simpl. (* Goal: forall (a x : A) (xs : list A) (_ : or (@eq A x a) (@In A a xs)) (_ : not (@eq A a x)), @In A a xs *) intuition congruence. Qed. Lemma NoDup_app3_not_in_1 : forall (xs ys zs : list A) b, NoDup (xs ++ ys ++ b :: zs) -> In b xs -> False. Proof. (* Goal: forall (xs ys zs : list A) (b : A) (_ : @NoDup A (@app A xs (@app A ys (@cons A b zs)))) (_ : @In A b xs), False *) intros. (* Goal: False *) rewrite <- app_ass in *. (* Goal: False *) find_apply_lem_hyp NoDup_remove. (* Goal: False *) rewrite app_ass in *. (* Goal: False *) intuition. Qed. Lemma NoDup_app3_not_in_2 : forall (xs ys zs : list A) b, NoDup (xs ++ ys ++ b :: zs) -> In b ys -> False. Proof. (* Goal: forall (xs ys zs : list A) (b : A) (_ : @NoDup A (@app A xs (@app A ys (@cons A b zs)))) (_ : @In A b ys), False *) intros. (* Goal: False *) rewrite <- app_ass in *. (* Goal: False *) find_apply_lem_hyp NoDup_remove_2. (* Goal: False *) rewrite app_ass in *. (* Goal: False *) auto 10 with *. Qed. Lemma NoDup_app3_not_in_3 : forall (xs ys zs : list A) b, NoDup (xs ++ ys ++ b :: zs) -> In b zs -> False. Proof. (* Goal: forall (xs ys zs : list A) (b : A) (_ : @NoDup A (@app A xs (@app A ys (@cons A b zs)))) (_ : @In A b zs), False *) intros. (* Goal: False *) rewrite <- app_ass in *. (* Goal: False *) find_apply_lem_hyp NoDup_remove_2. (* Goal: False *) rewrite app_ass in *. (* Goal: False *) auto 10 with *. Qed. Lemma In_cons_2_3 : forall xs ys zs x y a, In (A:=A) a (xs ++ ys ++ zs) -> In a (xs ++ x :: ys ++ y :: zs). Proof. (* Goal: forall (xs ys zs : list A) (x y a : A) (_ : @In A a (@app A xs (@app A ys zs))), @In A a (@app A xs (@cons A x (@app A ys (@cons A y zs)))) *) intros. (* Goal: @In A a (@app A xs (@cons A x (@app A ys (@cons A y zs)))) *) repeat (do_in_app; intuition auto 10 with *). Qed. Lemma In_cons_2_3_neq : forall a x y xs ys zs, In (A:=A) a (xs ++ x :: ys ++ y :: zs) -> a <> x -> a <> y -> In a (xs ++ ys ++ zs). Proof. (* Goal: forall (a x y : A) (xs ys zs : list A) (_ : @In A a (@app A xs (@cons A x (@app A ys (@cons A y zs))))) (_ : not (@eq A a x)) (_ : not (@eq A a y)), @In A a (@app A xs (@app A ys zs)) *) intros. (* Goal: @In A a (@app A xs (@app A ys zs)) *) repeat (do_in_app; simpl in *; intuition (auto with *; try congruence)). Qed. Lemma in_middle_reduce : forall a xs y zs, In (A:=A) a (xs ++ y :: zs) -> a <> y -> In a (xs ++ zs). Proof. (* Goal: forall (a : A) (xs : list A) (y : A) (zs : list A) (_ : @In A a (@app A xs (@cons A y zs))) (_ : not (@eq A a y)), @In A a (@app A xs zs) *) intros. (* Goal: @In A a (@app A xs zs) *) do_in_app; simpl in *; intuition. (* Goal: @In A a (@app A xs zs) *) congruence. Qed. Lemma in_middle_insert : forall a xs y zs, In (A:=A) a (xs ++ zs) -> In a (xs ++ y :: zs). Proof. (* Goal: forall (a : A) (xs : list A) (y : A) (zs : list A) (_ : @In A a (@app A xs zs)), @In A a (@app A xs (@cons A y zs)) *) intros. (* Goal: @In A a (@app A xs (@cons A y zs)) *) do_in_app; simpl in *; intuition. Qed. Lemma NoDup_rev : forall l, NoDup (A:=A) l -> NoDup (rev l). Proof. (* Goal: forall (l : list A) (_ : @NoDup A l), @NoDup A (@rev A l) *) induction l; intros; simpl. (* Goal: @NoDup A (@app A (@rev A l) (@cons A a (@nil A))) *) (* Goal: @NoDup A (@nil A) *) - (* Goal: @NoDup A (@nil A) *) auto. (* BG Goal: @NoDup A (@app A (@rev A l) (@cons A a (@nil A))) *) - (* Goal: @NoDup A (@app A (@rev A l) (@cons A a (@nil A))) *) apply NoDup_append. (* Goal: @NoDup A (@cons A a (@rev A l)) *) invc_NoDup. (* Goal: @NoDup A (@cons A a (@rev A l)) *) constructor; auto. (* Goal: not (@In A a (@rev A l)) *) intuition. (* Goal: False *) find_apply_lem_hyp in_rev. (* Goal: False *) auto. Qed. Lemma NoDup_map_map : forall (f : A -> B) (g : A -> C) xs, (forall x y, In x xs -> In y xs -> f x = f y -> g x = g y) -> NoDup (map g xs) -> NoDup (map f xs). Proof. (* Goal: forall (f : forall _ : A, B) (g : forall _ : A, C) (xs : list A) (_ : forall (x y : A) (_ : @In A x xs) (_ : @In A y xs) (_ : @eq B (f x) (f y)), @eq C (g x) (g y)) (_ : @NoDup C (@map A C g xs)), @NoDup B (@map A B f xs) *) induction xs; intros; simpl in *. (* Goal: @NoDup B (@cons B (f a) (@map A B f xs)) *) (* Goal: @NoDup B (@nil B) *) - (* Goal: @NoDup B (@nil B) *) constructor. (* BG Goal: @NoDup B (@cons B (f a) (@map A B f xs)) *) - (* Goal: @NoDup B (@cons B (f a) (@map A B f xs)) *) invc_NoDup. (* Goal: @NoDup B (@cons B (f a) (@map A B f xs)) *) constructor; auto. (* Goal: not (@In B (f a) (@map A B f xs)) *) intro. (* Goal: False *) do_in_map. (* Goal: False *) find_apply_hyp_hyp. (* Goal: False *) find_reverse_rewrite. (* Goal: False *) auto using in_map. Qed. Lemma pigeon : forall (l : list A) sub1 sub2, (forall a, In a sub1 -> In a l) -> (forall a, In a sub2 -> In a l) -> NoDup l -> NoDup sub1 -> NoDup sub2 -> length sub1 + length sub2 > length l -> exists a, In a sub1 /\ In a sub2. Proof. (* Goal: forall (l sub1 sub2 : list A) (_ : forall (a : A) (_ : @In A a sub1), @In A a l) (_ : forall (a : A) (_ : @In A a sub2), @In A a l) (_ : @NoDup A l) (_ : @NoDup A sub1) (_ : @NoDup A sub2) (_ : gt (Init.Nat.add (@length A sub1) (@length A sub2)) (@length A l)), @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) induction l. (* Goal: forall (sub1 sub2 : list A) (_ : forall (a0 : A) (_ : @In A a0 sub1), @In A a0 (@cons A a l)) (_ : forall (a0 : A) (_ : @In A a0 sub2), @In A a0 (@cons A a l)) (_ : @NoDup A (@cons A a l)) (_ : @NoDup A sub1) (_ : @NoDup A sub2) (_ : gt (Init.Nat.add (@length A sub1) (@length A sub2)) (@length A (@cons A a l))), @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) (* Goal: forall (sub1 sub2 : list A) (_ : forall (a : A) (_ : @In A a sub1), @In A a (@nil A)) (_ : forall (a : A) (_ : @In A a sub2), @In A a (@nil A)) (_ : @NoDup A (@nil A)) (_ : @NoDup A sub1) (_ : @NoDup A sub2) (_ : gt (Init.Nat.add (@length A sub1) (@length A sub2)) (@length A (@nil A))), @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) intros. (* Goal: forall (sub1 sub2 : list A) (_ : forall (a0 : A) (_ : @In A a0 sub1), @In A a0 (@cons A a l)) (_ : forall (a0 : A) (_ : @In A a0 sub2), @In A a0 (@cons A a l)) (_ : @NoDup A (@cons A a l)) (_ : @NoDup A sub1) (_ : @NoDup A sub2) (_ : gt (Init.Nat.add (@length A sub1) (@length A sub2)) (@length A (@cons A a l))), @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) (* Goal: @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) + (* Goal: @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) simpl in *. (* Goal: @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) find_apply_lem_hyp plus_gt_0. (* Goal: @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) intuition. (* Goal: @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) (* Goal: @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) * (* Goal: @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) destruct sub1; simpl in *; [omega|]. (* Goal: @ex A (fun a0 : A => and (or (@eq A a a0) (@In A a0 sub1)) (@In A a0 sub2)) *) specialize (H a). (* Goal: @ex A (fun a0 : A => and (or (@eq A a a0) (@In A a0 sub1)) (@In A a0 sub2)) *) intuition. (* BG Goal: forall (sub1 sub2 : list A) (_ : forall (a0 : A) (_ : @In A a0 sub1), @In A a0 (@cons A a l)) (_ : forall (a0 : A) (_ : @In A a0 sub2), @In A a0 (@cons A a l)) (_ : @NoDup A (@cons A a l)) (_ : @NoDup A sub1) (_ : @NoDup A sub2) (_ : gt (Init.Nat.add (@length A sub1) (@length A sub2)) (@length A (@cons A a l))), @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) (* BG Goal: @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) * (* Goal: @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) destruct sub2; simpl in *; [omega|]. (* Goal: @ex A (fun a0 : A => and (@In A a0 sub1) (or (@eq A a a0) (@In A a0 sub2))) *) specialize (H0 a). (* Goal: @ex A (fun a0 : A => and (@In A a0 sub1) (or (@eq A a a0) (@In A a0 sub2))) *) intuition. (* BG Goal: forall (sub1 sub2 : list A) (_ : forall (a0 : A) (_ : @In A a0 sub1), @In A a0 (@cons A a l)) (_ : forall (a0 : A) (_ : @In A a0 sub2), @In A a0 (@cons A a l)) (_ : @NoDup A (@cons A a l)) (_ : @NoDup A sub1) (_ : @NoDup A sub2) (_ : gt (Init.Nat.add (@length A sub1) (@length A sub2)) (@length A (@cons A a l))), @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) + (* Goal: forall (sub1 sub2 : list A) (_ : forall (a0 : A) (_ : @In A a0 sub1), @In A a0 (@cons A a l)) (_ : forall (a0 : A) (_ : @In A a0 sub2), @In A a0 (@cons A a l)) (_ : @NoDup A (@cons A a l)) (_ : @NoDup A sub1) (_ : @NoDup A sub2) (_ : gt (Init.Nat.add (@length A sub1) (@length A sub2)) (@length A (@cons A a l))), @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) intros. (* Goal: @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) simpl in *. (* Goal: @ex A (fun a : A => and (@In A a sub1) (@In A a sub2)) *) destruct (in_dec A_eq_dec a sub1); destruct (in_dec A_eq_dec a sub2); eauto; specialize (IHl (remove A_eq_dec a sub1) (remove A_eq_dec a sub2)); cut (exists a0, In a0 (remove A_eq_dec a sub1) /\ In a0 (remove A_eq_dec a sub2)); try solve [intros; break_exists; intuition eauto using in_remove]; apply IHl; try solve [ intros; find_copy_apply_lem_hyp in_remove; find_apply_hyp_hyp; intuition; subst; exfalso; eapply remove_In; eauto]; eauto using remove_NoDup; try solve_by_inversion; repeat match goal with | H : ~ In a ?sub |- _ => assert (length (remove A_eq_dec a sub) = length sub) by eauto using remove_length_not_in; clear H | H : In a ?sub |- _ => assert (length (remove A_eq_dec a sub) >= length sub - 1) by eauto using remove_length_ge; clear H end; omega. Qed. Lemma snoc_assoc : forall (l : list A) x y, l ++ [x; y] = (l ++ [x]) ++ [y]. Proof. (* Goal: forall (l : list A) (x y : A), @eq (list A) (@app A l (@cons A x (@cons A y (@nil A)))) (@app A (@app A l (@cons A x (@nil A))) (@cons A y (@nil A))) *) induction l; intros; simpl; intuition. (* Goal: @eq (list A) (@cons A a (@app A l (@cons A x (@cons A y (@nil A))))) (@cons A a (@app A (@app A l (@cons A x (@nil A))) (@cons A y (@nil A)))) *) auto using f_equal. Qed. Lemma cons_cons_app : forall (x y : A), [x; y] = [x] ++ [y]. Proof. (* Goal: forall x y : A, @eq (list A) (@cons A x (@cons A y (@nil A))) (@app A (@cons A x (@nil A)) (@cons A y (@nil A))) *) auto. Qed. Lemma map_eq_inv : forall (f : A -> B) l xs ys, map f l = xs ++ ys -> exists l1 l2, l = l1 ++ l2 /\ map f l1 = xs /\ map f l2 = ys. Proof. (* Goal: forall (f : forall _ : A, B) (l : list A) (xs ys : list B) (_ : @eq (list B) (@map A B f l) (@app B xs ys)), @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) l (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) xs) (@eq (list B) (@map A B f l2) ys)))) *) induction l; simpl; intros xs ys H. (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@cons A a l) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) xs) (@eq (list B) (@map A B f l2) ys)))) *) (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@nil A) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) xs) (@eq (list B) (@map A B f l2) ys)))) *) - (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@nil A) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) xs) (@eq (list B) (@map A B f l2) ys)))) *) symmetry in H. (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@nil A) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) xs) (@eq (list B) (@map A B f l2) ys)))) *) apply app_eq_nil in H. (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@nil A) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) xs) (@eq (list B) (@map A B f l2) ys)))) *) break_and. (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@nil A) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) xs) (@eq (list B) (@map A B f l2) ys)))) *) subst. (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@nil A) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) (@nil B)) (@eq (list B) (@map A B f l2) (@nil B))))) *) exists [], []. (* Goal: and (@eq (list A) (@nil A) (@app A (@nil A) (@nil A))) (and (@eq (list B) (@map A B f (@nil A)) (@nil B)) (@eq (list B) (@map A B f (@nil A)) (@nil B))) *) auto. (* BG Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@cons A a l) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) xs) (@eq (list B) (@map A B f l2) ys)))) *) - (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@cons A a l) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) xs) (@eq (list B) (@map A B f l2) ys)))) *) destruct xs; simpl in *. (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@cons A a l) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) (@cons B b xs)) (@eq (list B) (@map A B f l2) ys)))) *) (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@cons A a l) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) (@nil B)) (@eq (list B) (@map A B f l2) ys)))) *) + (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@cons A a l) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) (@nil B)) (@eq (list B) (@map A B f l2) ys)))) *) exists [], (a :: l). (* Goal: and (@eq (list A) (@cons A a l) (@app A (@nil A) (@cons A a l))) (and (@eq (list B) (@map A B f (@nil A)) (@nil B)) (@eq (list B) (@map A B f (@cons A a l)) ys)) *) intuition. (* BG Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@cons A a l) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) (@cons B b xs)) (@eq (list B) (@map A B f l2) ys)))) *) + (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@cons A a l) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) (@cons B b xs)) (@eq (list B) (@map A B f l2) ys)))) *) invc H. (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@cons A a l) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) (@cons B (f a) xs)) (@eq (list B) (@map A B f l2) ys)))) *) find_apply_hyp_hyp. (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@cons A a l) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) (@cons B (f a) xs)) (@eq (list B) (@map A B f l2) ys)))) *) break_exists_name l1. (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@cons A a l) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) (@cons B (f a) xs)) (@eq (list B) (@map A B f l2) ys)))) *) break_exists_name l2. (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@cons A a l) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) (@cons B (f a) xs)) (@eq (list B) (@map A B f l2) ys)))) *) break_and. (* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq (list A) (@cons A a l) (@app A l1 l2)) (and (@eq (list B) (@map A B f l1) (@cons B (f a) xs)) (@eq (list B) (@map A B f l2) ys)))) *) exists (a :: l1), l2. (* Goal: and (@eq (list A) (@cons A a l) (@app A (@cons A a l1) l2)) (and (@eq (list B) (@map A B f (@cons A a l1)) (@cons B (f a) xs)) (@eq (list B) (@map A B f l2) ys)) *) subst. (* Goal: and (@eq (list A) (@cons A a (@app A l1 l2)) (@app A (@cons A a l1) l2)) (and (@eq (list B) (@map A B f (@cons A a l1)) (@cons B (f a) (@map A B f l1))) (@eq (list B) (@map A B f l2) (@map A B f l2))) *) intuition. Qed. Lemma map_partition : forall p l (x : B) p' (f : A -> B), map f l = (p ++ x :: p') -> exists ap a ap', l = ap ++ a :: ap' /\ map f ap = p /\ f a = x /\ map f ap' = p'. Proof. (* Goal: forall (p : list B) (l : list A) (x : B) (p' : list B) (f : forall _ : A, B) (_ : @eq (list B) (@map A B f l) (@app B p (@cons B x p'))), @ex (list A) (fun ap : list A => @ex A (fun a : A => @ex (list A) (fun ap' : list A => and (@eq (list A) l (@app A ap (@cons A a ap'))) (and (@eq (list B) (@map A B f ap) p) (and (@eq B (f a) x) (@eq (list B) (@map A B f ap') p')))))) *) intros p l x p' f H_m. (* Goal: @ex (list A) (fun ap : list A => @ex A (fun a : A => @ex (list A) (fun ap' : list A => and (@eq (list A) l (@app A ap (@cons A a ap'))) (and (@eq (list B) (@map A B f ap) p) (and (@eq B (f a) x) (@eq (list B) (@map A B f ap') p')))))) *) pose proof map_eq_inv f _ _ _ H_m. (* Goal: @ex (list A) (fun ap : list A => @ex A (fun a : A => @ex (list A) (fun ap' : list A => and (@eq (list A) l (@app A ap (@cons A a ap'))) (and (@eq (list B) (@map A B f ap) p) (and (@eq B (f a) x) (@eq (list B) (@map A B f ap') p')))))) *) break_exists_name l1. (* Goal: @ex (list A) (fun ap : list A => @ex A (fun a : A => @ex (list A) (fun ap' : list A => and (@eq (list A) l (@app A ap (@cons A a ap'))) (and (@eq (list B) (@map A B f ap) p) (and (@eq B (f a) x) (@eq (list B) (@map A B f ap') p')))))) *) break_exists_name l2. (* Goal: @ex (list A) (fun ap : list A => @ex A (fun a : A => @ex (list A) (fun ap' : list A => and (@eq (list A) l (@app A ap (@cons A a ap'))) (and (@eq (list B) (@map A B f ap) p) (and (@eq B (f a) x) (@eq (list B) (@map A B f ap') p')))))) *) break_and. (* Goal: @ex (list A) (fun ap : list A => @ex A (fun a : A => @ex (list A) (fun ap' : list A => and (@eq (list A) l (@app A ap (@cons A a ap'))) (and (@eq (list B) (@map A B f ap) p) (and (@eq B (f a) x) (@eq (list B) (@map A B f ap') p')))))) *) find_rewrite. (* Goal: @ex (list A) (fun ap : list A => @ex A (fun a : A => @ex (list A) (fun ap' : list A => and (@eq (list A) l (@app A ap (@cons A a ap'))) (and (@eq (list B) (@map A B f ap) p) (and (@eq B (f a) x) (@eq (list B) (@map A B f ap') p')))))) *) destruct l2; simpl in *. (* Goal: @ex (list A) (fun ap : list A => @ex A (fun a : A => @ex (list A) (fun ap' : list A => and (@eq (list A) l (@app A ap (@cons A a ap'))) (and (@eq (list B) (@map A B f ap) p) (and (@eq B (f a) x) (@eq (list B) (@map A B f ap') p')))))) *) (* Goal: @ex (list A) (fun ap : list A => @ex A (fun a : A => @ex (list A) (fun ap' : list A => and (@eq (list A) l (@app A ap (@cons A a ap'))) (and (@eq (list B) (@map A B f ap) p) (and (@eq B (f a) x) (@eq (list B) (@map A B f ap') p')))))) *) - (* Goal: @ex (list A) (fun ap : list A => @ex A (fun a : A => @ex (list A) (fun ap' : list A => and (@eq (list A) l (@app A ap (@cons A a ap'))) (and (@eq (list B) (@map A B f ap) p) (and (@eq B (f a) x) (@eq (list B) (@map A B f ap') p')))))) *) match goal with H : [] = _ :: _ |- _ => contradict H end. (* Goal: not (@eq (list B) (@nil B) (@cons B x p')) *) auto with datatypes. (* BG Goal: @ex (list A) (fun ap : list A => @ex A (fun a : A => @ex (list A) (fun ap' : list A => and (@eq (list A) l (@app A ap (@cons A a ap'))) (and (@eq (list B) (@map A B f ap) p) (and (@eq B (f a) x) (@eq (list B) (@map A B f ap') p')))))) *) - (* Goal: @ex (list A) (fun ap : list A => @ex A (fun a : A => @ex (list A) (fun ap' : list A => and (@eq (list A) l (@app A ap (@cons A a ap'))) (and (@eq (list B) (@map A B f ap) p) (and (@eq B (f a) x) (@eq (list B) (@map A B f ap') p')))))) *) repeat find_rewrite. (* Goal: @ex (list A) (fun ap : list A => @ex A (fun a0 : A => @ex (list A) (fun ap' : list A => and (@eq (list A) (@app A l1 (@cons A a l2)) (@app A ap (@cons A a0 ap'))) (and (@eq (list B) (@map A B f ap) p) (and (@eq B (f a0) x) (@eq (list B) (@map A B f ap') p')))))) *) find_inversion. (* Goal: @ex (list A) (fun ap : list A => @ex A (fun a0 : A => @ex (list A) (fun ap' : list A => and (@eq (list A) (@app A l1 (@cons A a l2)) (@app A ap (@cons A a0 ap'))) (and (@eq (list B) (@map A B f ap) (@map A B f l1)) (and (@eq B (f a0) (f a)) (@eq (list B) (@map A B f ap') (@map A B f l2))))))) *) exists l1, a, l2. (* Goal: and (@eq (list A) (@app A l1 (@cons A a l2)) (@app A l1 (@cons A a l2))) (and (@eq (list B) (@map A B f l1) (@map A B f l1)) (and (@eq B (f a) (f a)) (@eq (list B) (@map A B f l2) (@map A B f l2)))) *) auto. Qed. Lemma map_eq_inv_eq : forall (f : A -> B), (forall a a', f a = f a' -> a = a') -> forall l l', map f l = map f l' -> l = l'. Proof. (* Goal: forall (f : forall _ : A, B) (_ : forall (a a' : A) (_ : @eq B (f a) (f a')), @eq A a a') (l l' : list A) (_ : @eq (list B) (@map A B f l) (@map A B f l')), @eq (list A) l l' *) induction l; simpl; intros l' Heq; destruct l'; simpl in *; try congruence. (* Goal: @eq (list A) (@cons A a l) (@cons A a0 l') *) find_inversion. (* Goal: @eq (list A) (@cons A a l) (@cons A a0 l') *) auto using f_equal2. Qed. Lemma map_fst_snd_id : forall l, map (fun t : A * B => (fst t, snd t)) l = l. Proof. (* Goal: forall l : list (prod A B), @eq (list (prod A B)) (@map (prod A B) (prod A B) (fun t : prod A B => @pair A B (@fst A B t) (@snd A B t)) l) l *) intros. (* Goal: @eq (list (prod A B)) (@map (prod A B) (prod A B) (fun t : prod A B => @pair A B (@fst A B t) (@snd A B t)) l) l *) rewrite <- map_id. (* Goal: @eq (list (prod A B)) (@map (prod A B) (prod A B) (fun t : prod A B => @pair A B (@fst A B t) (@snd A B t)) l) (@map (prod A B) (prod A B) (fun x : prod A B => x) l) *) apply map_ext. (* Goal: forall a : prod A B, @eq (prod A B) (@pair A B (@fst A B a) (@snd A B a)) a *) destruct a; auto. Qed. Lemma in_firstn : forall n (x : A) xs, In x (firstn n xs) -> In x xs. Proof. (* Goal: forall (n : nat) (x : A) (xs : list A) (_ : @In A x (@firstn A n xs)), @In A x xs *) induction n; simpl; intuition; break_match; simpl in *; intuition. Qed. Lemma firstn_NoDup : forall n (xs : list A), NoDup xs -> NoDup (firstn n xs). Proof. (* Goal: forall (n : nat) (xs : list A) (_ : @NoDup A xs), @NoDup A (@firstn A n xs) *) induction n; intros; simpl; destruct xs; auto with struct_util. (* Goal: @NoDup A (@cons A a (@firstn A n xs)) *) invc_NoDup. (* Goal: @NoDup A (@cons A a (@firstn A n xs)) *) eauto 6 using in_firstn with struct_util. Qed. Lemma NoDup_mid_not_in : forall (a : A) (l l' : list A), NoDup (l ++ a :: l') -> ~ In a (l ++ l'). Proof. (* Goal: forall (a : A) (l l' : list A) (_ : @NoDup A (@app A l (@cons A a l'))), not (@In A a (@app A l l')) *) induction l; intros; simpl in *. (* Goal: not (or (@eq A a0 a) (@In A a (@app A l l'))) *) (* Goal: not (@In A a l') *) - (* Goal: not (@In A a l') *) invc_NoDup; auto. (* BG Goal: not (or (@eq A a0 a) (@In A a (@app A l l'))) *) - (* Goal: not (or (@eq A a0 a) (@In A a (@app A l l'))) *) invc_NoDup. (* Goal: not (or (@eq A a0 a) (@In A a (@app A l l'))) *) intro. (* Goal: False *) break_or_hyp. (* Goal: False *) (* Goal: False *) * (* Goal: False *) match goal with H: ~ In _ _ |- _ => contradict H end. (* Goal: @In A a (@app A l (@cons A a l')) *) apply in_or_app. (* Goal: or (@In A a l) (@In A a (@cons A a l')) *) right; left. (* Goal: @eq A a a *) auto. (* BG Goal: False *) * (* Goal: False *) match goal with H: In _ _ |- _ => contradict H end. (* Goal: not (@In A a (@app A l l')) *) eauto. Qed. Lemma Permutation_split : forall (ns ns' : list A) (n : A), Permutation (n :: ns) ns' -> exists ns0, exists ns1, ns' = ns0 ++ n :: ns1. Proof. (* Goal: forall (ns ns' : list A) (n : A) (_ : @Permutation A (@cons A n ns) ns'), @ex (list A) (fun ns0 : list A => @ex (list A) (fun ns1 : list A => @eq (list A) ns' (@app A ns0 (@cons A n ns1)))) *) intros l l' a H_pm. (* Goal: @ex (list A) (fun ns0 : list A => @ex (list A) (fun ns1 : list A => @eq (list A) l' (@app A ns0 (@cons A a ns1)))) *) assert (In a (a :: l)); auto with datatypes. (* Goal: @ex (list A) (fun ns0 : list A => @ex (list A) (fun ns1 : list A => @eq (list A) l' (@app A ns0 (@cons A a ns1)))) *) assert (In a l'); eauto using Permutation_in. (* Goal: @ex (list A) (fun ns0 : list A => @ex (list A) (fun ns1 : list A => @eq (list A) l' (@app A ns0 (@cons A a ns1)))) *) find_apply_lem_hyp In_split; auto. Qed. Lemma NoDup_app_left : forall (l l' : list A), NoDup (l ++ l') -> NoDup l. Proof. (* Goal: forall (l l' : list A) (_ : @NoDup A (@app A l l')), @NoDup A l *) induction l; intros; simpl in *. (* Goal: @NoDup A (@cons A a l) *) (* Goal: @NoDup A (@nil A) *) - (* Goal: @NoDup A (@nil A) *) apply NoDup_nil. (* BG Goal: @NoDup A (@cons A a l) *) - (* Goal: @NoDup A (@cons A a l) *) invc_NoDup. (* Goal: @NoDup A (@cons A a l) *) find_apply_hyp_hyp. (* Goal: @NoDup A (@cons A a l) *) apply NoDup_cons; auto. (* Goal: not (@In A a l) *) intro. (* Goal: False *) match goal with H: ~ In _ _ |- _ => contradict H end. (* Goal: @In A a (@app A l l') *) apply in_or_app. (* Goal: or (@In A a l) (@In A a l') *) left; auto. Qed. Lemma NoDup_app_right : forall (l l' : list A), NoDup (l ++ l') -> NoDup l'. Proof. (* Goal: forall (l l' : list A) (_ : @NoDup A (@app A l l')), @NoDup A l' *) induction l; intros; simpl in *; auto. (* Goal: @NoDup A l' *) invc_NoDup. (* Goal: @NoDup A l' *) find_apply_hyp_hyp; auto. Qed. Lemma NoDup_in_not_in_right : forall (l l' : list A) (a : A), NoDup (l ++ l') -> In a l -> ~ In a l'. Proof. (* Goal: forall (l l' : list A) (a : A) (_ : @NoDup A (@app A l l')) (_ : @In A a l), not (@In A a l') *) induction l; intros; simpl in *; auto. (* Goal: not (@In A a0 l') *) invc_NoDup. (* Goal: not (@In A a0 l') *) break_or_hyp; eauto with datatypes. Qed. Lemma NoDup_in_not_in_left : forall (l l' : list A) (a : A), NoDup (l ++ l') -> In a l' -> ~ In a l. Proof. (* Goal: forall (l l' : list A) (a : A) (_ : @NoDup A (@app A l l')) (_ : @In A a l'), not (@In A a l) *) intros. (* Goal: not (@In A a l) *) induction l; simpl in *; auto. (* Goal: not (or (@eq A a0 a) (@In A a l)) *) invc_NoDup. (* Goal: not (or (@eq A a0 a) (@In A a l)) *) concludes. (* Goal: not (or (@eq A a0 a) (@In A a l)) *) intro. (* Goal: False *) break_or_hyp; auto with datatypes. Qed. Lemma count_occ_app : forall l l' (a : A), count_occ A_eq_dec (l ++ l') a = count_occ A_eq_dec l a + count_occ A_eq_dec l' a. Proof. (* Goal: forall (l l' : list A) (a : A), @eq nat (@count_occ A A_eq_dec (@app A l l') a) (Init.Nat.add (@count_occ A A_eq_dec l a) (@count_occ A A_eq_dec l' a)) *) intros. (* Goal: @eq nat (@count_occ A A_eq_dec (@app A l l') a) (Init.Nat.add (@count_occ A A_eq_dec l a) (@count_occ A A_eq_dec l' a)) *) induction l; simpl in *; auto. (* Goal: @eq nat (if A_eq_dec a0 a then S (@count_occ A A_eq_dec (@app A l l') a) else @count_occ A A_eq_dec (@app A l l') a) (Init.Nat.add (if A_eq_dec a0 a then S (@count_occ A A_eq_dec l a) else @count_occ A A_eq_dec l a) (@count_occ A A_eq_dec l' a)) *) break_if; auto. (* Goal: @eq nat (S (@count_occ A A_eq_dec (@app A l l') a)) (Init.Nat.add (S (@count_occ A A_eq_dec l a)) (@count_occ A A_eq_dec l' a)) *) find_rewrite. (* Goal: @eq nat (S (Init.Nat.add (@count_occ A A_eq_dec l a) (@count_occ A A_eq_dec l' a))) (Init.Nat.add (S (@count_occ A A_eq_dec l a)) (@count_occ A A_eq_dec l' a)) *) auto. Qed. Lemma Permutation_map_fst : forall l l' : list (A * B), Permutation l l' -> Permutation (map fst l) (map fst l'). Proof. (* Goal: forall (l l' : list (prod A B)) (_ : @Permutation (prod A B) l l'), @Permutation A (@map (prod A B) A (@fst A B) l) (@map (prod A B) A (@fst A B) l') *) induction l; intros; simpl in *. (* Goal: @Permutation A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) l)) (@map (prod A B) A (@fst A B) l') *) (* Goal: @Permutation A (@nil A) (@map (prod A B) A (@fst A B) l') *) - (* Goal: @Permutation A (@nil A) (@map (prod A B) A (@fst A B) l') *) find_apply_lem_hyp Permutation_nil. (* Goal: @Permutation A (@nil A) (@map (prod A B) A (@fst A B) l') *) find_rewrite. (* Goal: @Permutation A (@nil A) (@map (prod A B) A (@fst A B) (@nil (prod A B))) *) auto. (* BG Goal: @Permutation A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) l)) (@map (prod A B) A (@fst A B) l') *) - (* Goal: @Permutation A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) l)) (@map (prod A B) A (@fst A B) l') *) assert (In a l'). (* Goal: @Permutation A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) l)) (@map (prod A B) A (@fst A B) l') *) (* Goal: @In (prod A B) a l' *) apply Permutation_in with (l := a :: l); auto with datatypes. (* Goal: @Permutation A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) l)) (@map (prod A B) A (@fst A B) l') *) find_apply_lem_hyp in_split. (* Goal: @Permutation A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) l)) (@map (prod A B) A (@fst A B) l') *) break_exists. (* Goal: @Permutation A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) l)) (@map (prod A B) A (@fst A B) l') *) find_rewrite. (* Goal: @Permutation A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) l)) (@map (prod A B) A (@fst A B) l') *) find_apply_lem_hyp Permutation_cons_app_inv. (* Goal: @Permutation A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) l)) (@map (prod A B) A (@fst A B) l') *) find_apply_hyp_hyp. (* Goal: @Permutation A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) l)) (@map (prod A B) A (@fst A B) l') *) find_rewrite. (* Goal: @Permutation A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) l)) (@map (prod A B) A (@fst A B) (@app (prod A B) x (@cons (prod A B) a x0))) *) rewrite map_app. (* Goal: @Permutation A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) l)) (@app A (@map (prod A B) A (@fst A B) x) (@map (prod A B) A (@fst A B) (@cons (prod A B) a x0))) *) simpl. (* Goal: @Permutation A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) l)) (@app A (@map (prod A B) A (@fst A B) x) (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) x0))) *) apply Permutation_cons_app. (* Goal: @Permutation A (@map (prod A B) A (@fst A B) l) (@app A (@map (prod A B) A (@fst A B) x) (@map (prod A B) A (@fst A B) x0)) *) rewrite <- map_app. (* Goal: @Permutation A (@map (prod A B) A (@fst A B) l) (@map (prod A B) A (@fst A B) (@app (prod A B) x x0)) *) auto. Qed. Lemma snd_eq_not_in_map : forall (l : list (A * B)) n m, (forall nm, In nm l -> snd nm = m) -> ~ In (n, m) l -> ~ In n (map fst l). Proof. (* Goal: forall (l : list (prod A B)) (n : A) (m : B) (_ : forall (nm : prod A B) (_ : @In (prod A B) nm l), @eq B (@snd A B nm) m) (_ : not (@In (prod A B) (@pair A B n m) l)), not (@In A n (@map (prod A B) A (@fst A B) l)) *) intros. (* Goal: not (@In A n (@map (prod A B) A (@fst A B) l)) *) induction l; simpl in *; auto. (* Goal: not (or (@eq A (@fst A B a) n) (@In A n (@map (prod A B) A (@fst A B) l))) *) intro. (* Goal: False *) break_or_hyp. (* Goal: False *) (* Goal: False *) - (* Goal: False *) match goal with H: ~ _ |- _ => contradict H end. (* Goal: or (@eq (prod A B) a (@pair A B (@fst A B a) m)) (@In (prod A B) (@pair A B (@fst A B a) m) l) *) left. (* Goal: @eq (prod A B) a (@pair A B (@fst A B a) m) *) destruct a. (* Goal: @eq (prod A B) (@pair A B a b) (@pair A B (@fst A B (@pair A B a b)) m) *) match goal with H: forall _ : A * B, _ |- _ => specialize (H (a, b)) end. (* Goal: @eq (prod A B) (@pair A B a b) (@pair A B (@fst A B (@pair A B a b)) m) *) simpl in *. (* Goal: @eq (prod A B) (@pair A B a b) (@pair A B a m) *) intuition eauto; repeat find_rewrite; auto. (* BG Goal: False *) - (* Goal: False *) match goal with H: In _ _ |- _ => contradict H end. (* Goal: not (@In A n (@map (prod A B) A (@fst A B) l)) *) apply IHl; eauto. Qed. Lemma NoDup_map_snd_fst : forall nms : list (A * B), NoDup nms -> (forall nm nm', In nm nms -> In nm' nms -> snd nm = snd nm') -> NoDup (map fst nms). Proof. (* Goal: forall (nms : list (prod A B)) (_ : @NoDup (prod A B) nms) (_ : forall (nm nm' : prod A B) (_ : @In (prod A B) nm nms) (_ : @In (prod A B) nm' nms), @eq B (@snd A B nm) (@snd A B nm')), @NoDup A (@map (prod A B) A (@fst A B) nms) *) intros. (* Goal: @NoDup A (@map (prod A B) A (@fst A B) nms) *) induction nms; simpl in *. (* Goal: @NoDup A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) nms)) *) (* Goal: @NoDup A (@nil A) *) - (* Goal: @NoDup A (@nil A) *) apply NoDup_nil. (* BG Goal: @NoDup A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) nms)) *) - (* Goal: @NoDup A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) nms)) *) invc_NoDup. (* Goal: @NoDup A (@cons A (@fst A B a) (@map (prod A B) A (@fst A B) nms)) *) apply NoDup_cons. (* Goal: @NoDup A (@map (prod A B) A (@fst A B) nms) *) (* Goal: not (@In A (@fst A B a) (@map (prod A B) A (@fst A B) nms)) *) * (* Goal: not (@In A (@fst A B a) (@map (prod A B) A (@fst A B) nms)) *) assert (forall nm, In nm nms -> snd nm = snd a). (* Goal: not (@In A (@fst A B a) (@map (prod A B) A (@fst A B) nms)) *) (* Goal: forall (nm : prod A B) (_ : @In (prod A B) nm nms), @eq B (@snd A B nm) (@snd A B a) *) intuition eauto. (* Goal: not (@In A (@fst A B a) (@map (prod A B) A (@fst A B) nms)) *) destruct a. (* Goal: not (@In A (@fst A B (@pair A B a b)) (@map (prod A B) A (@fst A B) nms)) *) apply snd_eq_not_in_map with (m := b); auto. (* BG Goal: @NoDup A (@map (prod A B) A (@fst A B) nms) *) * (* Goal: @NoDup A (@map (prod A B) A (@fst A B) nms) *) apply IHnms; auto. Qed. Lemma in_fold_left_by_cons_in : forall (l : list B) (g : B -> A) x acc, In x (fold_left (fun a b => g b :: a) l acc) -> In x acc \/ exists y, In y l /\ x = g y. Proof. (* Goal: forall (l : list B) (g : forall _ : B, A) (x : A) (acc : list A) (_ : @In A x (@fold_left (list A) B (fun (a : list A) (b : B) => @cons A (g b) a) l acc)), or (@In A x acc) (@ex B (fun y : B => and (@In B y l) (@eq A x (g y)))) *) intros until l. (* Goal: forall (g : forall _ : B, A) (x : A) (acc : list A) (_ : @In A x (@fold_left (list A) B (fun (a : list A) (b : B) => @cons A (g b) a) l acc)), or (@In A x acc) (@ex B (fun y : B => and (@In B y l) (@eq A x (g y)))) *) induction l. (* Goal: forall (g : forall _ : B, A) (x : A) (acc : list A) (_ : @In A x (@fold_left (list A) B (fun (a : list A) (b : B) => @cons A (g b) a) (@cons B a l) acc)), or (@In A x acc) (@ex B (fun y : B => and (@In B y (@cons B a l)) (@eq A x (g y)))) *) (* Goal: forall (g : forall _ : B, A) (x : A) (acc : list A) (_ : @In A x (@fold_left (list A) B (fun (a : list A) (b : B) => @cons A (g b) a) (@nil B) acc)), or (@In A x acc) (@ex B (fun y : B => and (@In B y (@nil B)) (@eq A x (g y)))) *) - (* Goal: forall (g : forall _ : B, A) (x : A) (acc : list A) (_ : @In A x (@fold_left (list A) B (fun (a : list A) (b : B) => @cons A (g b) a) (@nil B) acc)), or (@In A x acc) (@ex B (fun y : B => and (@In B y (@nil B)) (@eq A x (g y)))) *) auto. (* BG Goal: forall (g : forall _ : B, A) (x : A) (acc : list A) (_ : @In A x (@fold_left (list A) B (fun (a : list A) (b : B) => @cons A (g b) a) (@cons B a l) acc)), or (@In A x acc) (@ex B (fun y : B => and (@In B y (@cons B a l)) (@eq A x (g y)))) *) - (* Goal: forall (g : forall _ : B, A) (x : A) (acc : list A) (_ : @In A x (@fold_left (list A) B (fun (a : list A) (b : B) => @cons A (g b) a) (@cons B a l) acc)), or (@In A x acc) (@ex B (fun y : B => and (@In B y (@cons B a l)) (@eq A x (g y)))) *) simpl; intros. (* Goal: or (@In A x acc) (@ex B (fun y : B => and (or (@eq B a y) (@In B y l)) (@eq A x (g y)))) *) destruct (A_eq_dec x (g a)); subst. (* Goal: or (@In A x acc) (@ex B (fun y : B => and (or (@eq B a y) (@In B y l)) (@eq A x (g y)))) *) (* Goal: or (@In A (g a) acc) (@ex B (fun y : B => and (or (@eq B a y) (@In B y l)) (@eq A (g a) (g y)))) *) + (* Goal: or (@In A (g a) acc) (@ex B (fun y : B => and (or (@eq B a y) (@In B y l)) (@eq A (g a) (g y)))) *) right; exists a; tauto. (* BG Goal: or (@In A x acc) (@ex B (fun y : B => and (or (@eq B a y) (@In B y l)) (@eq A x (g y)))) *) + (* Goal: or (@In A x acc) (@ex B (fun y : B => and (or (@eq B a y) (@In B y l)) (@eq A x (g y)))) *) find_apply_lem_hyp IHl. (* Goal: or (@In A x acc) (@ex B (fun y : B => and (or (@eq B a y) (@In B y l)) (@eq A x (g y)))) *) break_or_hyp; [left|right]. (* Goal: @ex B (fun y : B => and (or (@eq B a y) (@In B y l)) (@eq A x (g y))) *) (* Goal: @In A x acc *) * (* Goal: @In A x acc *) find_apply_lem_hyp In_cons_neq; tauto. (* BG Goal: @ex B (fun y : B => and (or (@eq B a y) (@In B y l)) (@eq A x (g y))) *) * (* Goal: @ex B (fun y : B => and (or (@eq B a y) (@In B y l)) (@eq A x (g y))) *) break_exists_exists; tauto. Qed. Lemma fold_left_for_each_not_in : forall (f : A -> B -> A) (g : A -> B -> C), (forall a b b', b <> b' -> g (f a b') b = g a b) -> forall l a b, ~ In b l -> g (fold_left f l a) b = g a b. Proof. (* Goal: forall (f : forall (_ : A) (_ : B), A) (g : forall (_ : A) (_ : B), C) (_ : forall (a : A) (b b' : B) (_ : not (@eq B b b')), @eq C (g (f a b') b) (g a b)) (l : list B) (a : A) (b : B) (_ : not (@In B b l)), @eq C (g (@fold_left A B f l a) b) (g a b) *) induction l as [| b' l']; simpl in *; auto. (* Goal: forall (a : A) (b : B) (_ : not (or (@eq B b' b) (@In B b l'))), @eq C (g (@fold_left A B f l' (f a b')) b) (g a b) *) - (* Goal: forall (a : A) (b : B) (_ : not (or (@eq B b' b) (@In B b l'))), @eq C (g (@fold_left A B f l' (f a b')) b) (g a b) *) intros. (* Goal: @eq C (g (@fold_left A B f l' (f a b')) b) (g a b) *) intuition. (* Goal: @eq C (g (@fold_left A B f l' (f a b')) b) (g a b) *) rewrite IHl'; auto. Qed. Lemma fold_left_for_each_in : forall (f : A -> B -> A) (g : A -> B -> C) (B_eq_dec : forall x y : B, {x = y} + {x <> y}), (forall a b b', b <> b' -> g (f a b') b = g a b) -> forall l a b, In b l -> exists a', g (fold_left f l a) b = g (f a' b) b. Proof. (* Goal: forall (f : forall (_ : A) (_ : B), A) (g : forall (_ : A) (_ : B), C) (_ : forall x y : B, sumbool (@eq B x y) (not (@eq B x y))) (_ : forall (a : A) (b b' : B) (_ : not (@eq B b b')), @eq C (g (f a b') b) (g a b)) (l : list B) (a : A) (b : B) (_ : @In B b l), @ex A (fun a' : A => @eq C (g (@fold_left A B f l a) b) (g (f a' b) b)) *) induction l as [|b' l']; simpl in *; intuition; subst. (* Goal: @ex A (fun a' : A => @eq C (g (@fold_left A B f l' (f a b)) b) (g (f a' b) b)) *) destruct (in_dec B_eq_dec b l'); intuition. (* Goal: @ex A (fun a' : A => @eq C (g (@fold_left A B f l' (f a b)) b) (g (f a' b) b)) *) find_eapply_lem_hyp fold_left_for_each_not_in; eauto. Qed. Lemma hd_error_tl_exists : forall (l : list A) x, hd_error l = Some x -> exists tl, l = x :: tl. Proof. (* Goal: forall (l : list A) (x : A) (_ : @eq (option A) (@hd_error A l) (@Some A x)), @ex (list A) (fun tl : list A => @eq (list A) l (@cons A x tl)) *) intros. (* Goal: @ex (list A) (fun tl : list A => @eq (list A) l (@cons A x tl)) *) destruct l; simpl in *. (* Goal: @ex (list A) (fun tl : list A => @eq (list A) (@cons A a l) (@cons A x tl)) *) (* Goal: @ex (list A) (fun tl : list A => @eq (list A) (@nil A) (@cons A x tl)) *) - (* Goal: @ex (list A) (fun tl : list A => @eq (list A) (@nil A) (@cons A x tl)) *) congruence. (* BG Goal: @ex (list A) (fun tl : list A => @eq (list A) (@cons A a l) (@cons A x tl)) *) - (* Goal: @ex (list A) (fun tl : list A => @eq (list A) (@cons A a l) (@cons A x tl)) *) eexists; solve_by_inversion. Qed. Lemma hd_error_None : forall (l : list A), hd_error l = None -> l = []. Proof. (* Goal: forall (l : list A) (_ : @eq (option A) (@hd_error A l) (@None A)), @eq (list A) l (@nil A) *) now destruct l. Qed. End list_util. Hint Resolve app_cons_in : struct_util. Hint Resolve app_cons_in_rest : struct_util. Hint Resolve in_rest_app_cons : struct_util.
Set Implicit Arguments. Unset Strict Implicit. Require Export Sets. Section Def. Variable E F : Setoid. Comments "The type of elements of a cartesian product:". Record cart_type : Type := {cart_l : E; cart_r : F}. Comments "Equality of couples:". Definition cart_eq (x y : cart_type) := Equal (cart_l x) (cart_l y) /\ Equal (cart_r x) (cart_r y). Lemma cart_eq_equiv : equivalence cart_eq. Proof. (* Goal: @equivalence cart_type cart_eq *) red in |- *. (* Goal: and (@reflexive cart_type cart_eq) (@partial_equivalence cart_type cart_eq) *) split; [ try assumption | idtac ]. (* Goal: @partial_equivalence cart_type cart_eq *) (* Goal: @reflexive cart_type cart_eq *) red in |- *. (* Goal: @partial_equivalence cart_type cart_eq *) (* Goal: forall x : cart_type, @app_rel cart_type cart_eq x x *) intros x; red in |- *. (* Goal: @partial_equivalence cart_type cart_eq *) (* Goal: cart_eq x x *) elim x. (* Goal: @partial_equivalence cart_type cart_eq *) (* Goal: forall (cart_l : Carrier E) (cart_r : Carrier F), cart_eq (Build_cart_type cart_l cart_r) (Build_cart_type cart_l cart_r) *) unfold cart_eq in |- *; simpl in |- *; auto with algebra. (* Goal: @partial_equivalence cart_type cart_eq *) red in |- *. (* Goal: and (@transitive cart_type cart_eq) (@symmetric cart_type cart_eq) *) split; [ idtac | try assumption ]. (* Goal: @symmetric cart_type cart_eq *) (* Goal: @transitive cart_type cart_eq *) red in |- *. (* Goal: @symmetric cart_type cart_eq *) (* Goal: forall (x y z : cart_type) (_ : @app_rel cart_type cart_eq x y) (_ : @app_rel cart_type cart_eq y z), @app_rel cart_type cart_eq x z *) unfold app_rel, cart_eq in |- *. (* Goal: @symmetric cart_type cart_eq *) (* Goal: forall (x y z : cart_type) (_ : and (@Equal E (cart_l x) (cart_l y)) (@Equal F (cart_r x) (cart_r y))) (_ : and (@Equal E (cart_l y) (cart_l z)) (@Equal F (cart_r y) (cart_r z))), and (@Equal E (cart_l x) (cart_l z)) (@Equal F (cart_r x) (cart_r z)) *) intros x y z H' H'0; split; [ try assumption | idtac ]. (* Goal: @symmetric cart_type cart_eq *) (* Goal: @Equal F (cart_r x) (cart_r z) *) (* Goal: @Equal E (cart_l x) (cart_l z) *) apply Trans with (cart_l y); intuition. (* Goal: @symmetric cart_type cart_eq *) (* Goal: @Equal F (cart_r x) (cart_r z) *) apply Trans with (cart_r y); intuition. (* Goal: @symmetric cart_type cart_eq *) red in |- *. (* Goal: forall (x y : cart_type) (_ : @app_rel cart_type cart_eq x y), @app_rel cart_type cart_eq y x *) unfold app_rel, cart_eq in |- *. (* Goal: forall (x y : cart_type) (_ : and (@Equal E (cart_l x) (cart_l y)) (@Equal F (cart_r x) (cart_r y))), and (@Equal E (cart_l y) (cart_l x)) (@Equal F (cart_r y) (cart_r x)) *) intuition. Qed. Definition cart : Setoid := Build_Setoid cart_eq_equiv. Comments "We will denote the cartesian product of" E "and" F "with" (cart E F). End Def. Section Projections. Variable E F : Setoid. Definition proj1 (x : cart E F) : E := cart_l x. Definition proj2 (x : cart E F) : F := cart_r x. Comments "We note" (proj1 x) "and" (proj2 x) "the components of a couple" x "in " (cart E F). Lemma proj1_comp : forall x y : cart E F, Equal x y -> Equal (proj1 x) (proj1 y). Proof. (* Goal: forall (x y : Carrier (cart E F)) (_ : @Equal (cart E F) x y), @Equal E (proj1 x) (proj1 y) *) red in |- *. (* Goal: forall (x y : Carrier (cart E F)) (_ : @Equal (cart E F) x y), (let (Carrier, Equal, _) as s return (relation (Carrier s)) := E in Equal) (proj1 x) (proj1 y) *) simpl in |- *. (* Goal: forall (x y : cart_type E F) (_ : @cart_eq E F x y), (let (Carrier, Equal, _) as s return (relation (Carrier s)) := E in Equal) (proj1 x) (proj1 y) *) unfold app_rel, cart_eq in |- *; intuition. Qed. Lemma proj2_comp : forall x y : cart E F, Equal x y -> Equal (proj2 x) (proj2 y). Proof. (* Goal: forall (x y : Carrier (cart E F)) (_ : @Equal (cart E F) x y), @Equal F (proj2 x) (proj2 y) *) red in |- *. (* Goal: forall (x y : Carrier (cart E F)) (_ : @Equal (cart E F) x y), (let (Carrier, Equal, _) as s return (relation (Carrier s)) := F in Equal) (proj2 x) (proj2 y) *) simpl in |- *. (* Goal: forall (x y : cart_type E F) (_ : @cart_eq E F x y), (let (Carrier, Equal, _) as s return (relation (Carrier s)) := F in Equal) (proj2 x) (proj2 y) *) unfold app_rel, cart_eq in |- *; intuition. Qed. Hint Resolve proj1_comp proj2_comp: algebra. Definition proj1_map : MAP (cart E F) E := Build_Map proj1_comp. Definition proj2_map : MAP (cart E F) F := Build_Map proj2_comp. Definition couple (x : E) (y : F) : cart E F := Build_cart_type x y. Lemma couple_comp : forall (x x' : E) (y y' : F), Equal x x' -> Equal y y' -> Equal (couple x y) (couple x' y'). Proof. (* Goal: forall (x x' : Carrier E) (y y' : Carrier F) (_ : @Equal E x x') (_ : @Equal F y y'), @Equal (cart E F) (couple x y) (couple x' y') *) simpl in |- *. (* Goal: forall (x x' : Carrier E) (y y' : Carrier F) (_ : @Equal E x x') (_ : @Equal F y y'), @cart_eq E F (couple x y) (couple x' y') *) unfold app_rel, cart_eq in |- *; intuition. Qed. Hint Resolve couple_comp: algebra. Lemma coupl_proj : forall x : cart E F, Equal (couple (proj1 x) (proj2 x)) x. Proof. (* Goal: forall x : Carrier (cart E F), @Equal (cart E F) (couple (proj1 x) (proj2 x)) x *) simpl in |- *. (* Goal: forall x : cart_type E F, @cart_eq E F (couple (proj1 x) (proj2 x)) x *) unfold app_rel, cart_eq in |- *; intuition. Qed. Hint Resolve coupl_proj: algebra. End Projections. Section Maps. Variable E F G : Setoid. Definition curry (f : MAP (cart E F) G) (x : E) (y : F) := f (couple x y). Definition fun2_compatible (f : E -> F -> G) := forall (x x' : E) (y y' : F), Equal x x' -> Equal y y' -> Equal (f x y) (f x' y'). Definition uncurry : forall f : E -> F -> G, fun2_compatible f -> MAP (cart E F) G. Proof. (* Goal: forall (f : forall (_ : Carrier E) (_ : Carrier F), Carrier G) (_ : fun2_compatible f), Carrier (MAP (cart E F) G) *) intros f H'; try assumption. (* Goal: Carrier (MAP (cart E F) G) *) apply (Build_Map (Ap:=fun x : cart E F => f (proj1 x) (proj2 x))). (* Goal: @fun_compatible (cart E F) G (fun x : Carrier (cart E F) => f (@proj1 E F x) (@proj2 E F x)) *) red in |- *. (* Goal: forall (x y : Carrier (cart E F)) (_ : @Equal (cart E F) x y), @Equal G (f (@proj1 E F x) (@proj2 E F x)) (f (@proj1 E F y) (@proj2 E F y)) *) intros x y; try assumption. (* Goal: forall _ : @Equal (cart E F) x y, @Equal G (f (@proj1 E F x) (@proj2 E F x)) (f (@proj1 E F y) (@proj2 E F y)) *) elim x. (* Goal: forall (cart_l : Carrier E) (cart_r : Carrier F) (_ : @Equal (cart E F) (@Build_cart_type E F cart_l cart_r) y), @Equal G (f (@proj1 E F (@Build_cart_type E F cart_l cart_r)) (@proj2 E F (@Build_cart_type E F cart_l cart_r))) (f (@proj1 E F y) (@proj2 E F y)) *) elim y. (* Goal: forall (cart_l : Carrier E) (cart_r : Carrier F) (cart_l0 : Carrier E) (cart_r0 : Carrier F) (_ : @Equal (cart E F) (@Build_cart_type E F cart_l0 cart_r0) (@Build_cart_type E F cart_l cart_r)), @Equal G (f (@proj1 E F (@Build_cart_type E F cart_l0 cart_r0)) (@proj2 E F (@Build_cart_type E F cart_l0 cart_r0))) (f (@proj1 E F (@Build_cart_type E F cart_l cart_r)) (@proj2 E F (@Build_cart_type E F cart_l cart_r))) *) simpl in |- *. (* Goal: forall (cart_l : Carrier E) (cart_r : Carrier F) (cart_l0 : Carrier E) (cart_r0 : Carrier F) (_ : @cart_eq E F (@Build_cart_type E F cart_l0 cart_r0) (@Build_cart_type E F cart_l cart_r)), @Equal G (f cart_l0 cart_r0) (f cart_l cart_r) *) unfold app_rel, cart_eq in |- *; intuition. Qed. Variable f : MAP E (cart F G). Definition map_proj1 : MAP E F := comp_map_map (proj1_map F G) f. Definition map_proj2 : MAP E G := comp_map_map (proj2_map F G) f. Definition map_couple : MAP E F -> MAP E G -> MAP E (cart F G). Proof. (* Goal: forall (_ : Carrier (MAP E F)) (_ : Carrier (MAP E G)), Carrier (MAP E (cart F G)) *) intros g h. (* Goal: Carrier (MAP E (cart F G)) *) apply (Build_Map (Ap:=fun x : E => couple (g x) (h x))). (* Goal: @fun_compatible E (cart F G) (fun x : Carrier E => @couple F G (@Ap E F g x) (@Ap E G h x)) *) red in |- *. (* Goal: forall (x y : Carrier E) (_ : @Equal E x y), @Equal (cart F G) (@couple F G (@Ap E F g x) (@Ap E G h x)) (@couple F G (@Ap E F g y) (@Ap E G h y)) *) intros x y H'; try assumption. (* Goal: @Equal (cart F G) (@couple F G (@Ap E F g x) (@Ap E G h x)) (@couple F G (@Ap E F g y) (@Ap E G h y)) *) apply couple_comp; auto with algebra. Qed. Lemma map_couple_proj_prop : Equal (map_couple map_proj1 map_proj2) f. Proof. (* Goal: @Equal (MAP E (cart F G)) (map_couple map_proj1 map_proj2) f *) simpl in |- *. (* Goal: @Map_eq E (cart F G) (map_couple map_proj1 map_proj2) f *) red in |- *. (* Goal: forall x : Carrier E, @Equal (cart F G) (@Ap E (cart F G) (map_couple map_proj1 map_proj2) x) (@Ap E (cart F G) f x) *) unfold map_proj1, map_proj2 in |- *; simpl in |- *. (* Goal: forall x : Carrier E, @cart_eq F G (@couple F G (@proj1 F G (@Ap E (cart F G) f x)) (@proj2 F G (@Ap E (cart F G) f x))) (@Ap E (cart F G) f x) *) unfold app_rel, cart_eq in |- *; intuition. Qed. End Maps. Hint Resolve proj1_comp proj2_comp couple_comp coupl_proj map_couple_proj_prop: algebra.
Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelsymmetric. Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelflip. Section Euclid. Context `{Ax1:euclidean_neutral}. Lemma lemma_PGrotate : forall A B C D, PG A B C D -> PG B C D A. Proof. (* Goal: forall (A B C D : @Point Ax1) (_ : @PG Ax1 A B C D), @PG Ax1 B C D A *) intros. (* Goal: @PG Ax1 B C D A *) assert ((Par A B C D /\ Par A D B C)) by (conclude_def PG ). (* Goal: @PG Ax1 B C D A *) assert (Par B C A D) by (conclude lemma_parallelsymmetric). (* Goal: @PG Ax1 B C D A *) assert (Par B C D A) by (forward_using lemma_parallelflip). (* Goal: @PG Ax1 B C D A *) assert (Par B A C D) by (forward_using lemma_parallelflip). (* Goal: @PG Ax1 B C D A *) assert (PG B C D A) by (conclude_def PG ). (* Goal: @PG Ax1 B C D A *) close. Qed. End Euclid.
Require Import ZArith. Require Import Wf_nat. Require Import lemmas. Require Import natZ. Require Import divides. Require Import modulo. Definition LinComb (c x y : Z) := exists a : Z, (exists b : Z, c = (x * a + y * b)%Z). Definition LinCombMod (c x y : Z) (n : nat) := exists a : Z, (exists b : Z, Mod c (x * a + y * b) n). Definition ZLinCombMod (c x y n : Z) := exists a : Z, (exists b : Z, ZMod c (x * a + y * b) n). Lemma lincombmodzlincombmod : forall (c x y : Z) (n : nat), LinCombMod c x y n -> ZLinCombMod c x y (Z_of_nat n). Proof. (* Goal: forall (c x y : Z) (n : nat) (_ : LinCombMod c x y n), ZLinCombMod c x y (Z.of_nat n) *) unfold LinCombMod, ZLinCombMod in |- *. (* Goal: forall (c x y : Z) (n : nat) (_ : @ex Z (fun a : Z => @ex Z (fun b : Z => Mod c (Z.add (Z.mul x a) (Z.mul y b)) n))), @ex Z (fun a : Z => @ex Z (fun b : Z => ZMod c (Z.add (Z.mul x a) (Z.mul y b)) (Z.of_nat n))) *) intros. (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => ZMod c (Z.add (Z.mul x a) (Z.mul y b)) (Z.of_nat n))) *) elim H. (* Goal: forall (x0 : Z) (_ : @ex Z (fun b : Z => Mod c (Z.add (Z.mul x x0) (Z.mul y b)) n)), @ex Z (fun a : Z => @ex Z (fun b : Z => ZMod c (Z.add (Z.mul x a) (Z.mul y b)) (Z.of_nat n))) *) intros z Hz. (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => ZMod c (Z.add (Z.mul x a) (Z.mul y b)) (Z.of_nat n))) *) exists z. (* Goal: @ex Z (fun b : Z => ZMod c (Z.add (Z.mul x z) (Z.mul y b)) (Z.of_nat n)) *) elim Hz. (* Goal: forall (x0 : Z) (_ : Mod c (Z.add (Z.mul x z) (Z.mul y x0)) n), @ex Z (fun b : Z => ZMod c (Z.add (Z.mul x z) (Z.mul y b)) (Z.of_nat n)) *) intros b Hb. (* Goal: @ex Z (fun b : Z => ZMod c (Z.add (Z.mul x z) (Z.mul y b)) (Z.of_nat n)) *) exists b. (* Goal: ZMod c (Z.add (Z.mul x z) (Z.mul y b)) (Z.of_nat n) *) apply modzmod. (* Goal: Mod c (Z.add (Z.mul x z) (Z.mul y b)) n *) assumption. Qed. Lemma zlincombmodlincombmod : forall c x y n : Z, ZLinCombMod c x y n -> LinCombMod c x y (Zabs_nat n). Proof. (* Goal: forall (c x y n : Z) (_ : ZLinCombMod c x y n), LinCombMod c x y (Z.abs_nat n) *) unfold ZLinCombMod, LinCombMod in |- *. (* Goal: forall (c x y n : Z) (_ : @ex Z (fun a : Z => @ex Z (fun b : Z => ZMod c (Z.add (Z.mul x a) (Z.mul y b)) n))), @ex Z (fun a : Z => @ex Z (fun b : Z => Mod c (Z.add (Z.mul x a) (Z.mul y b)) (Z.abs_nat n))) *) intros. (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => Mod c (Z.add (Z.mul x a) (Z.mul y b)) (Z.abs_nat n))) *) elim H. (* Goal: forall (x0 : Z) (_ : @ex Z (fun b : Z => ZMod c (Z.add (Z.mul x x0) (Z.mul y b)) n)), @ex Z (fun a : Z => @ex Z (fun b : Z => Mod c (Z.add (Z.mul x a) (Z.mul y b)) (Z.abs_nat n))) *) intros a Ha. (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => Mod c (Z.add (Z.mul x a) (Z.mul y b)) (Z.abs_nat n))) *) exists a. (* Goal: @ex Z (fun b : Z => Mod c (Z.add (Z.mul x a) (Z.mul y b)) (Z.abs_nat n)) *) elim Ha. (* Goal: forall (x0 : Z) (_ : ZMod c (Z.add (Z.mul x a) (Z.mul y x0)) n), @ex Z (fun b : Z => Mod c (Z.add (Z.mul x a) (Z.mul y b)) (Z.abs_nat n)) *) intros b Hb. (* Goal: @ex Z (fun b : Z => Mod c (Z.add (Z.mul x a) (Z.mul y b)) (Z.abs_nat n)) *) exists b. (* Goal: Mod c (Z.add (Z.mul x a) (Z.mul y b)) (Z.abs_nat n) *) apply zmodmod. (* Goal: ZMod c (Z.add (Z.mul x a) (Z.mul y b)) n *) assumption. Qed. Definition common_div (x y : Z) (d : nat) := Divides d (Zabs_nat x) /\ Divides d (Zabs_nat y). Definition gcd (x y : Z) (d : nat) := common_div x y d /\ (forall e : nat, common_div x y e -> e <= d). Lemma gcd_unq : forall (d1 d2 : nat) (x y : Z), gcd x y d1 -> gcd x y d2 -> d1 = d2. Proof. (* Goal: forall (d1 d2 : nat) (x y : Z) (_ : gcd x y d1) (_ : gcd x y d2), @eq nat d1 d2 *) unfold gcd in |- *. (* Goal: forall (d1 d2 : nat) (x y : Z) (_ : and (common_div x y d1) (forall (e : nat) (_ : common_div x y e), le e d1)) (_ : and (common_div x y d2) (forall (e : nat) (_ : common_div x y e), le e d2)), @eq nat d1 d2 *) intros. (* Goal: @eq nat d1 d2 *) elim H. (* Goal: forall (_ : common_div x y d1) (_ : forall (e : nat) (_ : common_div x y e), le e d1), @eq nat d1 d2 *) elim H0. (* Goal: forall (_ : common_div x y d2) (_ : forall (e : nat) (_ : common_div x y e), le e d2) (_ : common_div x y d1) (_ : forall (e : nat) (_ : common_div x y e), le e d1), @eq nat d1 d2 *) intros. (* Goal: @eq nat d1 d2 *) apply le_antisym. (* Goal: le d2 d1 *) (* Goal: le d1 d2 *) apply H2. (* Goal: le d2 d1 *) (* Goal: common_div x y d1 *) assumption. (* Goal: le d2 d1 *) apply H4. (* Goal: common_div x y d2 *) assumption. Qed. Lemma gcd_sym : forall (d : nat) (x y : Z), gcd x y d -> gcd y x d. Proof. (* Goal: forall (d : nat) (x y : Z) (_ : gcd x y d), gcd y x d *) unfold gcd in |- *. (* Goal: forall (d : nat) (x y : Z) (_ : and (common_div x y d) (forall (e : nat) (_ : common_div x y e), le e d)), and (common_div y x d) (forall (e : nat) (_ : common_div y x e), le e d) *) unfold common_div in |- *. (* Goal: forall (d : nat) (x y : Z) (_ : and (and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat y))), le e d)), and (and (Divides d (Z.abs_nat y)) (Divides d (Z.abs_nat x))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat y)) (Divides e (Z.abs_nat x))), le e d) *) intros. (* Goal: and (and (Divides d (Z.abs_nat y)) (Divides d (Z.abs_nat x))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat y)) (Divides e (Z.abs_nat x))), le e d) *) elim H. (* Goal: forall (_ : and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat y))) (_ : forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat y))), le e d), and (and (Divides d (Z.abs_nat y)) (Divides d (Z.abs_nat x))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat y)) (Divides e (Z.abs_nat x))), le e d) *) intros. (* Goal: and (and (Divides d (Z.abs_nat y)) (Divides d (Z.abs_nat x))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat y)) (Divides e (Z.abs_nat x))), le e d) *) elim H0. (* Goal: forall (_ : Divides d (Z.abs_nat x)) (_ : Divides d (Z.abs_nat y)), and (and (Divides d (Z.abs_nat y)) (Divides d (Z.abs_nat x))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat y)) (Divides e (Z.abs_nat x))), le e d) *) intros. (* Goal: and (and (Divides d (Z.abs_nat y)) (Divides d (Z.abs_nat x))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat y)) (Divides e (Z.abs_nat x))), le e d) *) split. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat y)) (Divides e (Z.abs_nat x))), le e d *) (* Goal: and (Divides d (Z.abs_nat y)) (Divides d (Z.abs_nat x)) *) split. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat y)) (Divides e (Z.abs_nat x))), le e d *) (* Goal: Divides d (Z.abs_nat x) *) (* Goal: Divides d (Z.abs_nat y) *) assumption. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat y)) (Divides e (Z.abs_nat x))), le e d *) (* Goal: Divides d (Z.abs_nat x) *) assumption. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat y)) (Divides e (Z.abs_nat x))), le e d *) intros. (* Goal: le e d *) elim H4. (* Goal: forall (_ : Divides e (Z.abs_nat y)) (_ : Divides e (Z.abs_nat x)), le e d *) intros. (* Goal: le e d *) apply H1. (* Goal: and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat y)) *) split. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: Divides e (Z.abs_nat x) *) assumption. (* Goal: Divides e (Z.abs_nat y) *) assumption. Qed. Lemma gcd_opp_l : forall (d : nat) (x y : Z), gcd x y d -> gcd (- x) y d. Proof. (* Goal: forall (d : nat) (x y : Z) (_ : gcd x y d), gcd (Z.opp x) y d *) unfold gcd in |- *. (* Goal: forall (d : nat) (x y : Z) (_ : and (common_div x y d) (forall (e : nat) (_ : common_div x y e), le e d)), and (common_div (Z.opp x) y d) (forall (e : nat) (_ : common_div (Z.opp x) y e), le e d) *) unfold common_div in |- *. (* Goal: forall (d : nat) (x y : Z) (_ : and (and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat y))), le e d)), and (and (Divides d (Z.abs_nat (Z.opp x))) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat (Z.opp x))) (Divides e (Z.abs_nat y))), le e d) *) intros. (* Goal: and (and (Divides d (Z.abs_nat (Z.opp x))) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat (Z.opp x))) (Divides e (Z.abs_nat y))), le e d) *) elim H. (* Goal: forall (_ : and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat y))) (_ : forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat y))), le e d), and (and (Divides d (Z.abs_nat (Z.opp x))) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat (Z.opp x))) (Divides e (Z.abs_nat y))), le e d) *) intros. (* Goal: and (and (Divides d (Z.abs_nat (Z.opp x))) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat (Z.opp x))) (Divides e (Z.abs_nat y))), le e d) *) elim H0. (* Goal: forall (_ : Divides d (Z.abs_nat x)) (_ : Divides d (Z.abs_nat y)), and (and (Divides d (Z.abs_nat (Z.opp x))) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat (Z.opp x))) (Divides e (Z.abs_nat y))), le e d) *) intros. (* Goal: and (and (Divides d (Z.abs_nat (Z.opp x))) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat (Z.opp x))) (Divides e (Z.abs_nat y))), le e d) *) split. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat (Z.opp x))) (Divides e (Z.abs_nat y))), le e d *) (* Goal: and (Divides d (Z.abs_nat (Z.opp x))) (Divides d (Z.abs_nat y)) *) split. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat (Z.opp x))) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: Divides d (Z.abs_nat (Z.opp x)) *) rewrite <- abs_opp. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat (Z.opp x))) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: Divides d (Z.abs_nat x) *) assumption. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat (Z.opp x))) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) assumption. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat (Z.opp x))) (Divides e (Z.abs_nat y))), le e d *) intros. (* Goal: le e d *) elim H4. (* Goal: forall (_ : Divides e (Z.abs_nat (Z.opp x))) (_ : Divides e (Z.abs_nat y)), le e d *) intros. (* Goal: le e d *) apply H1. (* Goal: and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat y)) *) split. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: Divides e (Z.abs_nat x) *) rewrite abs_opp. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: Divides e (Z.abs_nat (Z.opp x)) *) assumption. (* Goal: Divides e (Z.abs_nat y) *) assumption. Qed. Lemma gcd_opp_r : forall (d : nat) (x y : Z), gcd x y d -> gcd x (- y) d. Proof. (* Goal: forall (d : nat) (x y : Z) (_ : gcd x y d), gcd x (Z.opp y) d *) unfold gcd in |- *. (* Goal: forall (d : nat) (x y : Z) (_ : and (common_div x y d) (forall (e : nat) (_ : common_div x y e), le e d)), and (common_div x (Z.opp y) d) (forall (e : nat) (_ : common_div x (Z.opp y) e), le e d) *) unfold common_div in |- *. (* Goal: forall (d : nat) (x y : Z) (_ : and (and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat y))), le e d)), and (and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat (Z.opp y)))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat (Z.opp y)))), le e d) *) intros. (* Goal: and (and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat (Z.opp y)))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat (Z.opp y)))), le e d) *) elim H. (* Goal: forall (_ : and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat y))) (_ : forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat y))), le e d), and (and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat (Z.opp y)))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat (Z.opp y)))), le e d) *) intros. (* Goal: and (and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat (Z.opp y)))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat (Z.opp y)))), le e d) *) elim H0. (* Goal: forall (_ : Divides d (Z.abs_nat x)) (_ : Divides d (Z.abs_nat y)), and (and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat (Z.opp y)))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat (Z.opp y)))), le e d) *) intros. (* Goal: and (and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat (Z.opp y)))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat (Z.opp y)))), le e d) *) split. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat (Z.opp y)))), le e d *) (* Goal: and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat (Z.opp y))) *) split. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat (Z.opp y)))), le e d *) (* Goal: Divides d (Z.abs_nat (Z.opp y)) *) (* Goal: Divides d (Z.abs_nat x) *) assumption. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat (Z.opp y)))), le e d *) (* Goal: Divides d (Z.abs_nat (Z.opp y)) *) rewrite <- abs_opp. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat (Z.opp y)))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) assumption. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat (Z.opp y)))), le e d *) intros. (* Goal: le e d *) elim H4. (* Goal: forall (_ : Divides e (Z.abs_nat x)) (_ : Divides e (Z.abs_nat (Z.opp y))), le e d *) intros. (* Goal: le e d *) apply H1. (* Goal: and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat y)) *) split. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: Divides e (Z.abs_nat x) *) assumption. (* Goal: Divides e (Z.abs_nat y) *) rewrite abs_opp. (* Goal: Divides e (Z.abs_nat (Z.opp y)) *) assumption. Qed. Lemma gcd_0_l : forall d : nat, d > 0 -> gcd 0 (Z_of_nat d) d. Proof. (* Goal: forall (d : nat) (_ : gt d O), gcd Z0 (Z.of_nat d) d *) unfold gcd in |- *. (* Goal: forall (d : nat) (_ : gt d O), and (common_div Z0 (Z.of_nat d) d) (forall (e : nat) (_ : common_div Z0 (Z.of_nat d) e), le e d) *) unfold common_div in |- *. (* Goal: forall (d : nat) (_ : gt d O), and (and (Divides d (Z.abs_nat Z0)) (Divides d (Z.abs_nat (Z.of_nat d)))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d) *) split. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d *) (* Goal: and (Divides d (Z.abs_nat Z0)) (Divides d (Z.abs_nat (Z.of_nat d))) *) split. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d *) (* Goal: Divides d (Z.abs_nat (Z.of_nat d)) *) (* Goal: Divides d (Z.abs_nat Z0) *) split with 0. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d *) (* Goal: Divides d (Z.abs_nat (Z.of_nat d)) *) (* Goal: @eq nat (Z.abs_nat Z0) (Init.Nat.mul d O) *) simpl in |- *. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d *) (* Goal: Divides d (Z.abs_nat (Z.of_nat d)) *) (* Goal: @eq nat O (Init.Nat.mul d O) *) rewrite <- mult_n_O. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d *) (* Goal: Divides d (Z.abs_nat (Z.of_nat d)) *) (* Goal: @eq nat O O *) reflexivity. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d *) (* Goal: Divides d (Z.abs_nat (Z.of_nat d)) *) split with 1. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d *) (* Goal: @eq nat (Z.abs_nat (Z.of_nat d)) (Init.Nat.mul d (S O)) *) simpl in |- *. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d *) (* Goal: @eq nat (Z.abs_nat (Z.of_nat d)) (Init.Nat.mul d (S O)) *) rewrite <- mult_n_Sm. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d *) (* Goal: @eq nat (Z.abs_nat (Z.of_nat d)) (Init.Nat.add (Init.Nat.mul d O) d) *) rewrite <- mult_n_O. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d *) (* Goal: @eq nat (Z.abs_nat (Z.of_nat d)) (Init.Nat.add O d) *) simpl in |- *. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d *) (* Goal: @eq nat (Z.abs_nat (Z.of_nat d)) d *) rewrite abs_inj. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d *) (* Goal: @eq nat d d *) reflexivity. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat Z0)) (Divides e (Z.abs_nat (Z.of_nat d)))), le e d *) intros. (* Goal: le e d *) apply div_le. (* Goal: Divides e d *) (* Goal: lt O d *) assumption. (* Goal: Divides e d *) elim H0. (* Goal: forall (_ : Divides e (Z.abs_nat Z0)) (_ : Divides e (Z.abs_nat (Z.of_nat d))), Divides e d *) intros. (* Goal: Divides e d *) rewrite abs_inj in H2. (* Goal: Divides e d *) assumption. Qed. Lemma gcd_0_r : forall d : nat, d > 0 -> gcd (Z_of_nat d) 0 d. Proof. (* Goal: forall (d : nat) (_ : gt d O), gcd (Z.of_nat d) Z0 d *) intros. (* Goal: gcd (Z.of_nat d) Z0 d *) apply gcd_sym. (* Goal: gcd Z0 (Z.of_nat d) d *) apply gcd_0_l. (* Goal: gt d O *) assumption. Qed. Lemma euclid_gcd1 : forall (d : nat) (x y q r : Z), gcd x y d -> x = (q * y + r)%Z -> gcd r y d. Proof. (* Goal: forall (d : nat) (x y q r : Z) (_ : gcd x y d) (_ : @eq Z x (Z.add (Z.mul q y) r)), gcd r y d *) unfold gcd in |- *. (* Goal: forall (d : nat) (x y q r : Z) (_ : and (common_div x y d) (forall (e : nat) (_ : common_div x y e), le e d)) (_ : @eq Z x (Z.add (Z.mul q y) r)), and (common_div r y d) (forall (e : nat) (_ : common_div r y e), le e d) *) unfold common_div in |- *. (* Goal: forall (d : nat) (x y q r : Z) (_ : and (and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat y))), le e d)) (_ : @eq Z x (Z.add (Z.mul q y) r)), and (and (Divides d (Z.abs_nat r)) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d) *) intros. (* Goal: and (and (Divides d (Z.abs_nat r)) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d) *) elim H. (* Goal: forall (_ : and (Divides d (Z.abs_nat x)) (Divides d (Z.abs_nat y))) (_ : forall (e : nat) (_ : and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat y))), le e d), and (and (Divides d (Z.abs_nat r)) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d) *) intros. (* Goal: and (and (Divides d (Z.abs_nat r)) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d) *) elim H1. (* Goal: forall (_ : Divides d (Z.abs_nat x)) (_ : Divides d (Z.abs_nat y)), and (and (Divides d (Z.abs_nat r)) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d) *) intros. (* Goal: and (and (Divides d (Z.abs_nat r)) (Divides d (Z.abs_nat y))) (forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d) *) split. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: and (Divides d (Z.abs_nat r)) (Divides d (Z.abs_nat y)) *) split. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: Divides d (Z.abs_nat r) *) rewrite <- (abs_inj d). (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: Divides (Z.abs_nat (Z.of_nat d)) (Z.abs_nat r) *) apply zdivdiv. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat d) r *) apply zdiv_plus_r with (q * y)%Z. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat d) (Z.add (Z.mul q y) r) *) (* Goal: ZDivides (Z.of_nat d) (Z.mul q y) *) rewrite Zmult_comm. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat d) (Z.add (Z.mul q y) r) *) (* Goal: ZDivides (Z.of_nat d) (Z.mul y q) *) apply zdiv_mult_compat_l. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat d) (Z.add (Z.mul q y) r) *) (* Goal: ZDivides (Z.of_nat d) y *) apply divzdiv. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat d) (Z.add (Z.mul q y) r) *) (* Goal: Divides (Z.abs_nat (Z.of_nat d)) (Z.abs_nat y) *) rewrite abs_inj. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat d) (Z.add (Z.mul q y) r) *) (* Goal: Divides d (Z.abs_nat y) *) assumption. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat d) (Z.add (Z.mul q y) r) *) rewrite <- H0. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat d) x *) apply divzdiv. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: Divides (Z.abs_nat (Z.of_nat d)) (Z.abs_nat x) *) rewrite abs_inj. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) (* Goal: Divides d (Z.abs_nat x) *) assumption. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) (* Goal: Divides d (Z.abs_nat y) *) assumption. (* Goal: forall (e : nat) (_ : and (Divides e (Z.abs_nat r)) (Divides e (Z.abs_nat y))), le e d *) intros. (* Goal: le e d *) elim H5. (* Goal: forall (_ : Divides e (Z.abs_nat r)) (_ : Divides e (Z.abs_nat y)), le e d *) intros. (* Goal: le e d *) apply H2. (* Goal: and (Divides e (Z.abs_nat x)) (Divides e (Z.abs_nat y)) *) split. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: Divides e (Z.abs_nat x) *) rewrite <- (abs_inj e). (* Goal: Divides e (Z.abs_nat y) *) (* Goal: Divides (Z.abs_nat (Z.of_nat e)) (Z.abs_nat x) *) apply zdivdiv. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat e) x *) rewrite H0. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat e) (Z.add (Z.mul q y) r) *) apply zdiv_plus_compat. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat e) r *) (* Goal: ZDivides (Z.of_nat e) (Z.mul q y) *) rewrite Zmult_comm. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat e) r *) (* Goal: ZDivides (Z.of_nat e) (Z.mul y q) *) apply zdiv_mult_compat_l. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat e) r *) (* Goal: ZDivides (Z.of_nat e) y *) apply divzdiv. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat e) r *) (* Goal: Divides (Z.abs_nat (Z.of_nat e)) (Z.abs_nat y) *) rewrite abs_inj. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat e) r *) (* Goal: Divides e (Z.abs_nat y) *) assumption. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: ZDivides (Z.of_nat e) r *) apply divzdiv. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: Divides (Z.abs_nat (Z.of_nat e)) (Z.abs_nat r) *) rewrite abs_inj. (* Goal: Divides e (Z.abs_nat y) *) (* Goal: Divides e (Z.abs_nat r) *) assumption. (* Goal: Divides e (Z.abs_nat y) *) assumption. Qed. Theorem euclid_gcd : forall (d1 d2 : nat) (x y q r : Z), x = (q * y + r)%Z -> gcd x y d1 -> gcd r y d2 -> d1 = d2. Proof. (* Goal: forall (d1 d2 : nat) (x y q r : Z) (_ : @eq Z x (Z.add (Z.mul q y) r)) (_ : gcd x y d1) (_ : gcd r y d2), @eq nat d1 d2 *) intros. (* Goal: @eq nat d1 d2 *) apply (gcd_unq d1 d2 r y). (* Goal: gcd r y d2 *) (* Goal: gcd r y d1 *) apply euclid_gcd1 with x q. (* Goal: gcd r y d2 *) (* Goal: @eq Z x (Z.add (Z.mul q y) r) *) (* Goal: gcd x y d1 *) assumption. (* Goal: gcd r y d2 *) (* Goal: @eq Z x (Z.add (Z.mul q y) r) *) assumption. (* Goal: gcd r y d2 *) assumption. Qed. Lemma gcd_lincomb_nat : forall x y d : nat, x > 0 -> gcd (Z_of_nat x) (Z_of_nat y) d -> LinComb (Z_of_nat d) (Z_of_nat x) (Z_of_nat y). Proof. (* Goal: forall (x y d : nat) (_ : gt x O) (_ : gcd (Z.of_nat x) (Z.of_nat y) d), LinComb (Z.of_nat d) (Z.of_nat x) (Z.of_nat y) *) unfold LinComb in |- *. (* Goal: forall (x y d : nat) (_ : gt x O) (_ : gcd (Z.of_nat x) (Z.of_nat y) d), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat x) a) (Z.mul (Z.of_nat y) b)))) *) intro x. (* Goal: forall (y d : nat) (_ : gt x O) (_ : gcd (Z.of_nat x) (Z.of_nat y) d), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat x) a) (Z.mul (Z.of_nat y) b)))) *) apply (lt_wf_ind x). (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : lt m n) (y d : nat) (_ : gt m O) (_ : gcd (Z.of_nat m) (Z.of_nat y) d), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat m) a) (Z.mul (Z.of_nat y) b))))) (y d : nat) (_ : gt n O) (_ : gcd (Z.of_nat n) (Z.of_nat y) d), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat n) a) (Z.mul (Z.of_nat y) b)))) *) intros X IH. (* Goal: forall (y d : nat) (_ : gt X O) (_ : gcd (Z.of_nat X) (Z.of_nat y) d), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intros. (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) elim (div_rem X y). (* Goal: gt X O *) (* Goal: forall (x : nat) (_ : @ex nat (fun r : nat => and (le O r) (and (lt r X) (@eq nat y (Init.Nat.add (Init.Nat.mul x X) r))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intro q. (* Goal: gt X O *) (* Goal: forall _ : @ex nat (fun r : nat => and (le O r) (and (lt r X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) r)))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intros. (* Goal: gt X O *) (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) elim H1. (* Goal: gt X O *) (* Goal: forall (x : nat) (_ : and (le O x) (and (lt x X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) x)))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intro r. (* Goal: gt X O *) (* Goal: forall _ : and (le O r) (and (lt r X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) r))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) case r. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: forall _ : and (le O O) (and (lt O X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) O))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intros. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) elim H2. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: forall (_ : le O O) (_ : and (lt O X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) O))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intros. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) elim H4. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: forall (_ : lt O X) (_ : @eq nat y (Init.Nat.add (Init.Nat.mul q X) O)), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intros. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) rewrite <- plus_n_O in H6. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) split with 1%Z. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) (Zpos xH)) (Z.mul (Z.of_nat y) b))) *) split with 0%Z. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) (Zpos xH)) (Z.mul (Z.of_nat y) Z0)) *) rewrite <- Zmult_0_r_reverse. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) (Zpos xH)) Z0) *) rewrite <- Zplus_0_r_reverse. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: @eq Z (Z.of_nat d) (Z.mul (Z.of_nat X) (Zpos xH)) *) rewrite Zmult_comm. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: @eq Z (Z.of_nat d) (Z.mul (Zpos xH) (Z.of_nat X)) *) rewrite Zmult_1_l. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: @eq Z (Z.of_nat d) (Z.of_nat X) *) apply Znat.inj_eq. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: @eq nat d X *) apply (euclid_gcd d X (Z_of_nat y) (Z_of_nat X) (Z_of_nat q) 0). (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: gcd Z0 (Z.of_nat X) X *) (* Goal: gcd (Z.of_nat y) (Z.of_nat X) d *) (* Goal: @eq Z (Z.of_nat y) (Z.add (Z.mul (Z.of_nat q) (Z.of_nat X)) Z0) *) rewrite <- Zplus_0_r_reverse. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: gcd Z0 (Z.of_nat X) X *) (* Goal: gcd (Z.of_nat y) (Z.of_nat X) d *) (* Goal: @eq Z (Z.of_nat y) (Z.mul (Z.of_nat q) (Z.of_nat X)) *) rewrite <- Znat.inj_mult. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: gcd Z0 (Z.of_nat X) X *) (* Goal: gcd (Z.of_nat y) (Z.of_nat X) d *) (* Goal: @eq Z (Z.of_nat y) (Z.of_nat (Init.Nat.mul q X)) *) apply Znat.inj_eq. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: gcd Z0 (Z.of_nat X) X *) (* Goal: gcd (Z.of_nat y) (Z.of_nat X) d *) (* Goal: @eq nat y (Init.Nat.mul q X) *) assumption. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: gcd Z0 (Z.of_nat X) X *) (* Goal: gcd (Z.of_nat y) (Z.of_nat X) d *) apply gcd_sym. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: gcd Z0 (Z.of_nat X) X *) (* Goal: gcd (Z.of_nat X) (Z.of_nat y) d *) assumption. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: gcd Z0 (Z.of_nat X) X *) apply gcd_0_l. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) (* Goal: gt X O *) assumption. (* Goal: gt X O *) (* Goal: forall (n : nat) (_ : and (le O (S n)) (and (lt (S n) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S n))))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intro r1. (* Goal: gt X O *) (* Goal: forall _ : and (le O (S r1)) (and (lt (S r1) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S r1)))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intros. (* Goal: gt X O *) (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) elim H2. (* Goal: gt X O *) (* Goal: forall (_ : le O (S r1)) (_ : and (lt (S r1) X) (@eq nat y (Init.Nat.add (Init.Nat.mul q X) (S r1)))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intros. (* Goal: gt X O *) (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) elim H4. (* Goal: gt X O *) (* Goal: forall (_ : lt (S r1) X) (_ : @eq nat y (Init.Nat.add (Init.Nat.mul q X) (S r1))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intros. (* Goal: gt X O *) (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) elim (IH (S r1) H5 X d). (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: forall (x : Z) (_ : @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (S r1)) x) (Z.mul (Z.of_nat X) b)))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intro delta. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: forall _ : @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) b))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intros. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) elim H7. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: forall (x : Z) (_ : @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) x))), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intro gamma. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: forall _ : @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)), @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) intros. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @ex Z (fun a : Z => @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) a) (Z.mul (Z.of_nat y) b)))) *) split with (gamma - Z_of_nat q * delta)%Z. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) (Z.sub gamma (Z.mul (Z.of_nat q) delta))) (Z.mul (Z.of_nat y) b))) *) split with delta. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) (Z.sub gamma (Z.mul (Z.of_nat q) delta))) (Z.mul (Z.of_nat y) delta)) *) rewrite H6. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat X) (Z.sub gamma (Z.mul (Z.of_nat q) delta))) (Z.mul (Z.of_nat (Init.Nat.add (Init.Nat.mul q X) (S r1))) delta)) *) rewrite H8. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.mul (Z.of_nat X) (Z.sub gamma (Z.mul (Z.of_nat q) delta))) (Z.mul (Z.of_nat (Init.Nat.add (Init.Nat.mul q X) (S r1))) delta)) *) unfold Zminus in |- *. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.mul (Z.of_nat X) (Z.add gamma (Z.opp (Z.mul (Z.of_nat q) delta)))) (Z.mul (Z.of_nat (Init.Nat.add (Init.Nat.mul q X) (S r1))) delta)) *) rewrite Zmult_plus_distr_r. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.add (Z.mul (Z.of_nat X) gamma) (Z.mul (Z.of_nat X) (Z.opp (Z.mul (Z.of_nat q) delta)))) (Z.mul (Z.of_nat (Init.Nat.add (Init.Nat.mul q X) (S r1))) delta)) *) rewrite Znat.inj_plus. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.add (Z.mul (Z.of_nat X) gamma) (Z.mul (Z.of_nat X) (Z.opp (Z.mul (Z.of_nat q) delta)))) (Z.mul (Z.add (Z.of_nat (Init.Nat.mul q X)) (Z.of_nat (S r1))) delta)) *) rewrite Zmult_plus_distr_l. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.add (Z.mul (Z.of_nat X) gamma) (Z.mul (Z.of_nat X) (Z.opp (Z.mul (Z.of_nat q) delta)))) (Z.add (Z.mul (Z.of_nat (Init.Nat.mul q X)) delta) (Z.mul (Z.of_nat (S r1)) delta))) *) rewrite Znat.inj_mult. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.add (Z.mul (Z.of_nat X) gamma) (Z.mul (Z.of_nat X) (Z.opp (Z.mul (Z.of_nat q) delta)))) (Z.add (Z.mul (Z.mul (Z.of_nat q) (Z.of_nat X)) delta) (Z.mul (Z.of_nat (S r1)) delta))) *) rewrite <- Zopp_mult_distr_l_reverse. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.add (Z.mul (Z.of_nat X) gamma) (Z.mul (Z.of_nat X) (Z.mul (Z.opp (Z.of_nat q)) delta))) (Z.add (Z.mul (Z.mul (Z.of_nat q) (Z.of_nat X)) delta) (Z.mul (Z.of_nat (S r1)) delta))) *) rewrite (Zmult_assoc (Z_of_nat X)). (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.add (Z.mul (Z.of_nat X) gamma) (Z.mul (Z.mul (Z.of_nat X) (Z.opp (Z.of_nat q))) delta)) (Z.add (Z.mul (Z.mul (Z.of_nat q) (Z.of_nat X)) delta) (Z.mul (Z.of_nat (S r1)) delta))) *) rewrite (Zmult_comm (Z_of_nat X) (- Z_of_nat q)). (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.add (Z.mul (Z.of_nat X) gamma) (Z.mul (Z.mul (Z.opp (Z.of_nat q)) (Z.of_nat X)) delta)) (Z.add (Z.mul (Z.mul (Z.of_nat q) (Z.of_nat X)) delta) (Z.mul (Z.of_nat (S r1)) delta))) *) rewrite Zopp_mult_distr_l_reverse. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.add (Z.mul (Z.of_nat X) gamma) (Z.mul (Z.opp (Z.mul (Z.of_nat q) (Z.of_nat X))) delta)) (Z.add (Z.mul (Z.mul (Z.of_nat q) (Z.of_nat X)) delta) (Z.mul (Z.of_nat (S r1)) delta))) *) rewrite Zopp_mult_distr_l_reverse. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.add (Z.mul (Z.of_nat X) gamma) (Z.opp (Z.mul (Z.mul (Z.of_nat q) (Z.of_nat X)) delta))) (Z.add (Z.mul (Z.mul (Z.of_nat q) (Z.of_nat X)) delta) (Z.mul (Z.of_nat (S r1)) delta))) *) rewrite (Zplus_assoc_reverse (Z_of_nat X * gamma)). (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.mul (Z.of_nat X) gamma) (Z.add (Z.opp (Z.mul (Z.mul (Z.of_nat q) (Z.of_nat X)) delta)) (Z.add (Z.mul (Z.mul (Z.of_nat q) (Z.of_nat X)) delta) (Z.mul (Z.of_nat (S r1)) delta)))) *) rewrite <- Znat.inj_mult. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.mul (Z.of_nat X) gamma) (Z.add (Z.opp (Z.mul (Z.of_nat (Init.Nat.mul q X)) delta)) (Z.add (Z.mul (Z.of_nat (Init.Nat.mul q X)) delta) (Z.mul (Z.of_nat (S r1)) delta)))) *) rewrite (Zplus_assoc (- (Z_of_nat (q * X) * delta))). (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.mul (Z.of_nat X) gamma) (Z.add (Z.add (Z.opp (Z.mul (Z.of_nat (Init.Nat.mul q X)) delta)) (Z.mul (Z.of_nat (Init.Nat.mul q X)) delta)) (Z.mul (Z.of_nat (S r1)) delta))) *) rewrite Zplus_opp_l. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (S r1)) delta) (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.mul (Z.of_nat X) gamma) (Z.add Z0 (Z.mul (Z.of_nat (S r1)) delta))) *) simpl in |- *. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) (* Goal: @eq Z (Z.add match delta with | Z0 => Z0 | Zpos y' => Zpos (Pos.mul (Pos.of_succ_nat r1) y') | Zneg y' => Zneg (Pos.mul (Pos.of_succ_nat r1) y') end (Z.mul (Z.of_nat X) gamma)) (Z.add (Z.mul (Z.of_nat X) gamma) match delta with | Z0 => Z0 | Zpos y' => Zpos (Pos.mul (Pos.of_succ_nat r1) y') | Zneg y' => Zneg (Pos.mul (Pos.of_succ_nat r1) y') end) *) apply Zplus_comm. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) (* Goal: gt (S r1) O *) apply gt_Sn_O. (* Goal: gt X O *) (* Goal: gcd (Z.of_nat (S r1)) (Z.of_nat X) d *) apply (euclid_gcd1 d (Z_of_nat y) (Z_of_nat X) (Z_of_nat q) (Z_of_nat (S r1))). (* Goal: gt X O *) (* Goal: @eq Z (Z.of_nat y) (Z.add (Z.mul (Z.of_nat q) (Z.of_nat X)) (Z.of_nat (S r1))) *) (* Goal: gcd (Z.of_nat y) (Z.of_nat X) d *) apply gcd_sym. (* Goal: gt X O *) (* Goal: @eq Z (Z.of_nat y) (Z.add (Z.mul (Z.of_nat q) (Z.of_nat X)) (Z.of_nat (S r1))) *) (* Goal: gcd (Z.of_nat X) (Z.of_nat y) d *) assumption. (* Goal: gt X O *) (* Goal: @eq Z (Z.of_nat y) (Z.add (Z.mul (Z.of_nat q) (Z.of_nat X)) (Z.of_nat (S r1))) *) rewrite <- Znat.inj_mult. (* Goal: gt X O *) (* Goal: @eq Z (Z.of_nat y) (Z.add (Z.of_nat (Init.Nat.mul q X)) (Z.of_nat (S r1))) *) rewrite <- Znat.inj_plus. (* Goal: gt X O *) (* Goal: @eq Z (Z.of_nat y) (Z.of_nat (Init.Nat.add (Init.Nat.mul q X) (S r1))) *) apply Znat.inj_eq. (* Goal: gt X O *) (* Goal: @eq nat y (Init.Nat.add (Init.Nat.mul q X) (S r1)) *) assumption. (* Goal: gt X O *) assumption. Qed. Lemma gcd_lincomb_pos : forall (x y : Z) (d : nat), (x > 0)%Z -> gcd x y d -> LinComb (Z_of_nat d) x y. Proof. (* Goal: forall (x y : Z) (d : nat) (_ : Z.gt x Z0) (_ : gcd x y d), LinComb (Z.of_nat d) x y *) intros. (* Goal: LinComb (Z.of_nat d) x y *) elim (Zle_or_lt 0 y). (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: forall _ : Z.le Z0 y, LinComb (Z.of_nat d) x y *) intro. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: LinComb (Z.of_nat d) x y *) rewrite <- (inj_abs_pos x). (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: LinComb (Z.of_nat d) (Z.of_nat (Z.abs_nat x)) y *) rewrite <- (inj_abs_pos y). (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: LinComb (Z.of_nat d) (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) *) apply gcd_lincomb_nat. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) change (Zabs_nat x > Zabs_nat 0) in |- *. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) (Z.abs_nat Z0) *) apply gtzgt. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) (* Goal: Z.le Z0 Z0 *) (* Goal: Z.le Z0 x *) apply Zlt_le_weak. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) (* Goal: Z.le Z0 Z0 *) (* Goal: Z.lt Z0 x *) apply Zgt_lt. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) (* Goal: Z.le Z0 Z0 *) (* Goal: Z.gt x Z0 *) assumption. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) (* Goal: Z.le Z0 Z0 *) unfold Zle in |- *. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) (* Goal: not (@eq comparison (Z.compare Z0 Z0) Gt) *) simpl in |- *. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) (* Goal: not (@eq comparison Eq Gt) *) discriminate. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) assumption. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) rewrite inj_abs_pos. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: Z.ge x Z0 *) (* Goal: gcd x (Z.of_nat (Z.abs_nat y)) d *) rewrite inj_abs_pos. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: gcd x y d *) assumption. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) apply Zle_ge. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: Z.ge x Z0 *) (* Goal: Z.le Z0 y *) assumption. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: Z.ge x Z0 *) apply Zle_ge. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: Z.le Z0 x *) apply Zlt_le_weak. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: Z.lt Z0 x *) apply Zgt_lt. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) (* Goal: Z.gt x Z0 *) assumption. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.ge y Z0 *) apply Zle_ge. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) (* Goal: Z.le Z0 y *) assumption. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.ge x Z0 *) apply Zle_ge. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.le Z0 x *) apply Zlt_le_weak. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.lt Z0 x *) apply Zgt_lt. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.gt x Z0 *) assumption. (* Goal: forall _ : Z.lt y Z0, LinComb (Z.of_nat d) x y *) intro. (* Goal: LinComb (Z.of_nat d) x y *) rewrite <- (inj_abs_pos x). (* Goal: Z.ge x Z0 *) (* Goal: LinComb (Z.of_nat d) (Z.of_nat (Z.abs_nat x)) y *) replace y with (- - y)%Z. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: LinComb (Z.of_nat d) (Z.of_nat (Z.abs_nat x)) (Z.opp (Z.opp y)) *) rewrite <- (inj_abs_neg y). (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: LinComb (Z.of_nat d) (Z.of_nat (Z.abs_nat x)) (Z.opp (Z.of_nat (Z.abs_nat y))) *) elim (gcd_lincomb_nat (Zabs_nat x) (Zabs_nat y) d). (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) (* Goal: forall (x0 : Z) (_ : @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (Z.abs_nat x)) x0) (Z.mul (Z.of_nat (Z.abs_nat y)) b)))), LinComb (Z.of_nat d) (Z.of_nat (Z.abs_nat x)) (Z.opp (Z.of_nat (Z.abs_nat y))) *) intro alpha. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) (* Goal: forall _ : @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (Z.abs_nat x)) alpha) (Z.mul (Z.of_nat (Z.abs_nat y)) b))), LinComb (Z.of_nat d) (Z.of_nat (Z.abs_nat x)) (Z.opp (Z.of_nat (Z.abs_nat y))) *) intros. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) (* Goal: LinComb (Z.of_nat d) (Z.of_nat (Z.abs_nat x)) (Z.opp (Z.of_nat (Z.abs_nat y))) *) elim H2. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) (* Goal: forall (x0 : Z) (_ : @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (Z.abs_nat x)) alpha) (Z.mul (Z.of_nat (Z.abs_nat y)) x0))), LinComb (Z.of_nat d) (Z.of_nat (Z.abs_nat x)) (Z.opp (Z.of_nat (Z.abs_nat y))) *) intro beta. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) (* Goal: forall _ : @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (Z.abs_nat x)) alpha) (Z.mul (Z.of_nat (Z.abs_nat y)) beta)), LinComb (Z.of_nat d) (Z.of_nat (Z.abs_nat x)) (Z.opp (Z.of_nat (Z.abs_nat y))) *) intros. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) (* Goal: LinComb (Z.of_nat d) (Z.of_nat (Z.abs_nat x)) (Z.opp (Z.of_nat (Z.abs_nat y))) *) split with alpha. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) (* Goal: @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (Z.abs_nat x)) alpha) (Z.mul (Z.opp (Z.of_nat (Z.abs_nat y))) b))) *) split with (- beta)%Z. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) (* Goal: @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (Z.abs_nat x)) alpha) (Z.mul (Z.opp (Z.of_nat (Z.abs_nat y))) (Z.opp beta))) *) rewrite <- Zopp_mult_distr_r. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) (* Goal: @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (Z.abs_nat x)) alpha) (Z.opp (Z.mul (Z.opp (Z.of_nat (Z.abs_nat y))) beta))) *) rewrite (Zmult_comm (- Z_of_nat (Zabs_nat y))). (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) (* Goal: @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (Z.abs_nat x)) alpha) (Z.opp (Z.mul beta (Z.opp (Z.of_nat (Z.abs_nat y)))))) *) rewrite <- Zopp_mult_distr_r. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) (* Goal: @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (Z.abs_nat x)) alpha) (Z.opp (Z.opp (Z.mul beta (Z.of_nat (Z.abs_nat y)))))) *) rewrite Zopp_involutive. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) (* Goal: @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (Z.abs_nat x)) alpha) (Z.mul beta (Z.of_nat (Z.abs_nat y)))) *) rewrite (Zmult_comm beta). (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) (* Goal: @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.of_nat (Z.abs_nat x)) alpha) (Z.mul (Z.of_nat (Z.abs_nat y)) beta)) *) assumption. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) O *) change (Zabs_nat x > Zabs_nat 0) in |- *. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: gt (Z.abs_nat x) (Z.abs_nat Z0) *) apply gtzgt. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) (* Goal: Z.le Z0 Z0 *) (* Goal: Z.le Z0 x *) apply Zlt_le_weak. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) (* Goal: Z.le Z0 Z0 *) (* Goal: Z.lt Z0 x *) apply Zgt_lt. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) (* Goal: Z.le Z0 Z0 *) (* Goal: Z.gt x Z0 *) assumption. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) (* Goal: Z.le Z0 Z0 *) unfold Zle in |- *. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) (* Goal: not (@eq comparison (Z.compare Z0 Z0) Gt) *) simpl in |- *. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) (* Goal: not (@eq comparison Eq Gt) *) discriminate. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) (* Goal: Z.gt x Z0 *) assumption. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: gcd (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) d *) rewrite inj_abs_pos. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: Z.ge x Z0 *) (* Goal: gcd x (Z.of_nat (Z.abs_nat y)) d *) rewrite inj_abs_neg. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: Z.ge x Z0 *) (* Goal: Z.lt y Z0 *) (* Goal: gcd x (Z.opp y) d *) apply gcd_opp_r. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: Z.ge x Z0 *) (* Goal: Z.lt y Z0 *) (* Goal: gcd x y d *) assumption. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: Z.ge x Z0 *) (* Goal: Z.lt y Z0 *) assumption. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: Z.ge x Z0 *) apply Zle_ge. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: Z.le Z0 x *) apply Zlt_le_weak. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: Z.lt Z0 x *) apply Zgt_lt. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) (* Goal: Z.gt x Z0 *) assumption. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) (* Goal: Z.lt y Z0 *) assumption. (* Goal: Z.ge x Z0 *) (* Goal: @eq Z (Z.opp (Z.opp y)) y *) apply Zopp_involutive. (* Goal: Z.ge x Z0 *) apply Zle_ge. (* Goal: Z.le Z0 x *) apply Zlt_le_weak. (* Goal: Z.lt Z0 x *) apply Zgt_lt. (* Goal: Z.gt x Z0 *) assumption. Qed. Theorem gcd_lincomb : forall (x y : Z) (d : nat), x <> 0%Z -> gcd x y d -> LinComb (Z_of_nat d) x y. Proof. (* Goal: forall (x y : Z) (d : nat) (_ : not (@eq Z x Z0)) (_ : gcd x y d), LinComb (Z.of_nat d) x y *) intros. (* Goal: LinComb (Z.of_nat d) x y *) elim (Zle_or_lt 0 x). (* Goal: forall _ : Z.lt x Z0, LinComb (Z.of_nat d) x y *) (* Goal: forall _ : Z.le Z0 x, LinComb (Z.of_nat d) x y *) intro. (* Goal: forall _ : Z.lt x Z0, LinComb (Z.of_nat d) x y *) (* Goal: LinComb (Z.of_nat d) x y *) elim (Zle_lt_or_eq 0 x). (* Goal: forall _ : Z.lt x Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.le Z0 x *) (* Goal: forall _ : @eq Z Z0 x, LinComb (Z.of_nat d) x y *) (* Goal: forall _ : Z.lt Z0 x, LinComb (Z.of_nat d) x y *) intro. (* Goal: forall _ : Z.lt x Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.le Z0 x *) (* Goal: forall _ : @eq Z Z0 x, LinComb (Z.of_nat d) x y *) (* Goal: LinComb (Z.of_nat d) x y *) apply gcd_lincomb_pos. (* Goal: forall _ : Z.lt x Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.le Z0 x *) (* Goal: forall _ : @eq Z Z0 x, LinComb (Z.of_nat d) x y *) (* Goal: gcd x y d *) (* Goal: Z.gt x Z0 *) apply Zlt_gt. (* Goal: forall _ : Z.lt x Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.le Z0 x *) (* Goal: forall _ : @eq Z Z0 x, LinComb (Z.of_nat d) x y *) (* Goal: gcd x y d *) (* Goal: Z.lt Z0 x *) assumption. (* Goal: forall _ : Z.lt x Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.le Z0 x *) (* Goal: forall _ : @eq Z Z0 x, LinComb (Z.of_nat d) x y *) (* Goal: gcd x y d *) assumption. (* Goal: forall _ : Z.lt x Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.le Z0 x *) (* Goal: forall _ : @eq Z Z0 x, LinComb (Z.of_nat d) x y *) intro. (* Goal: forall _ : Z.lt x Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.le Z0 x *) (* Goal: LinComb (Z.of_nat d) x y *) elim H. (* Goal: forall _ : Z.lt x Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.le Z0 x *) (* Goal: @eq Z x Z0 *) rewrite H2. (* Goal: forall _ : Z.lt x Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.le Z0 x *) (* Goal: @eq Z x x *) reflexivity. (* Goal: forall _ : Z.lt x Z0, LinComb (Z.of_nat d) x y *) (* Goal: Z.le Z0 x *) assumption. (* Goal: forall _ : Z.lt x Z0, LinComb (Z.of_nat d) x y *) intro. (* Goal: LinComb (Z.of_nat d) x y *) elim (gcd_lincomb_pos (- x) y d). (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) (* Goal: forall (x0 : Z) (_ : @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.opp x) x0) (Z.mul y b)))), LinComb (Z.of_nat d) x y *) intro alpha. (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) (* Goal: forall _ : @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.opp x) alpha) (Z.mul y b))), LinComb (Z.of_nat d) x y *) intros. (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) (* Goal: LinComb (Z.of_nat d) x y *) elim H2. (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) (* Goal: forall (x0 : Z) (_ : @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.opp x) alpha) (Z.mul y x0))), LinComb (Z.of_nat d) x y *) intro beta. (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) (* Goal: forall _ : @eq Z (Z.of_nat d) (Z.add (Z.mul (Z.opp x) alpha) (Z.mul y beta)), LinComb (Z.of_nat d) x y *) intros. (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) (* Goal: LinComb (Z.of_nat d) x y *) split with (- alpha)%Z. (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) (* Goal: @ex Z (fun b : Z => @eq Z (Z.of_nat d) (Z.add (Z.mul x (Z.opp alpha)) (Z.mul y b))) *) split with beta. (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) (* Goal: @eq Z (Z.of_nat d) (Z.add (Z.mul x (Z.opp alpha)) (Z.mul y beta)) *) rewrite H3. (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) (* Goal: @eq Z (Z.add (Z.mul (Z.opp x) alpha) (Z.mul y beta)) (Z.add (Z.mul x (Z.opp alpha)) (Z.mul y beta)) *) rewrite (Zmult_comm x). (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) (* Goal: @eq Z (Z.add (Z.mul (Z.opp x) alpha) (Z.mul y beta)) (Z.add (Z.mul (Z.opp alpha) x) (Z.mul y beta)) *) rewrite Zopp_mult_distr_l_reverse. (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) (* Goal: @eq Z (Z.add (Z.opp (Z.mul x alpha)) (Z.mul y beta)) (Z.add (Z.mul (Z.opp alpha) x) (Z.mul y beta)) *) rewrite Zopp_mult_distr_l_reverse. (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) (* Goal: @eq Z (Z.add (Z.opp (Z.mul x alpha)) (Z.mul y beta)) (Z.add (Z.opp (Z.mul alpha x)) (Z.mul y beta)) *) rewrite (Zmult_comm alpha). (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) (* Goal: @eq Z (Z.add (Z.opp (Z.mul x alpha)) (Z.mul y beta)) (Z.add (Z.opp (Z.mul x alpha)) (Z.mul y beta)) *) reflexivity. (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.gt (Z.opp x) Z0 *) apply Zopp_lt_gt_0. (* Goal: gcd (Z.opp x) y d *) (* Goal: Z.lt x Z0 *) assumption. (* Goal: gcd (Z.opp x) y d *) apply gcd_opp_l. (* Goal: gcd x y d *) assumption. Qed.
Require Import Bool Arith List. Require Import BellantoniCook.Lib BellantoniCook.Bitstring BellantoniCook.MultiPoly. Inductive Cobham : Type := | Zero : Cobham | Proj : nat -> nat -> Cobham | Succ : bool -> Cobham | Smash : Cobham | Rec : Cobham -> Cobham -> Cobham -> Cobham -> Cobham | Comp : nat -> Cobham -> list Cobham -> Cobham. Definition Rec2 g h j := Rec g h h j. Lemma Cobham_ind2' : forall P : Cobham -> Prop, forall Q : list Cobham -> Prop, Q nil -> (forall e l, P e -> Q l -> Q (e :: l)) -> P Zero -> (forall n i, P (Proj n i)) -> (forall b, P (Succ b)) -> P Smash -> (forall j g h0 h1, P j -> P g -> P h0 -> P h1 -> P (Rec j g h0 h1)) -> (forall n h l, P h -> Q l -> P (Comp n h l)) -> forall e, P e. Proof. (* Goal: forall (P : forall _ : Cobham, Prop) (Q : forall _ : list Cobham, Prop) (_ : Q (@nil Cobham)) (_ : forall (e : Cobham) (l : list Cobham) (_ : P e) (_ : Q l), Q (@cons Cobham e l)) (_ : P Zero) (_ : forall n i : nat, P (Proj n i)) (_ : forall b : bool, P (Succ b)) (_ : P Smash) (_ : forall (j g h0 h1 : Cobham) (_ : P j) (_ : P g) (_ : P h0) (_ : P h1), P (Rec j g h0 h1)) (_ : forall (n : nat) (h : Cobham) (l : list Cobham) (_ : P h) (_ : Q l), P (Comp n h l)) (e : Cobham), P e *) fix Cobham_ind2' 11; intros. (* Goal: P e *) destruct e; auto. (* Goal: P (Comp n e l) *) (* Goal: P (Rec e1 e2 e3 e4) *) apply H5; eapply Cobham_ind2'; eauto. (* Goal: P (Comp n e l) *) apply H6. (* Goal: Q l *) (* Goal: P e *) eapply Cobham_ind2'; eauto. (* Goal: Q l *) revert l. (* Goal: forall l : list Cobham, Q l *) fix Cobham_ind2'0 1. (* Goal: forall l : list Cobham, Q l *) intro. (* Goal: Q l *) destruct l. (* Goal: Q (@cons Cobham c l) *) (* Goal: Q (@nil Cobham) *) apply H. (* Goal: Q (@cons Cobham c l) *) apply H0. (* Goal: Q l *) (* Goal: P c *) eapply Cobham_ind2'; eauto. (* Goal: Q l *) apply Cobham_ind2'0. Qed. Lemma Cobham_ind2 : forall P : Cobham -> Prop, P Zero -> (forall n i, P (Proj n i)) -> (forall b, P (Succ b)) -> P Smash -> (forall j g h0 h1, P j -> P g -> P h0 -> P h1 -> P (Rec j g h0 h1)) -> (forall n h l, P h -> (forall e, In e l -> P e) -> P (Comp n h l)) -> forall e, P e. Proof. (* Goal: forall (P : forall _ : Cobham, Prop) (_ : P Zero) (_ : forall n i : nat, P (Proj n i)) (_ : forall b : bool, P (Succ b)) (_ : P Smash) (_ : forall (j g h0 h1 : Cobham) (_ : P j) (_ : P g) (_ : P h0) (_ : P h1), P (Rec j g h0 h1)) (_ : forall (n : nat) (h : Cobham) (l : list Cobham) (_ : P h) (_ : forall (e : Cobham) (_ : @In Cobham e l), P e), P (Comp n h l)) (e : Cobham), P e *) intros. (* Goal: P e *) induction e using Cobham_ind2' with (Q := fun l => forall e, In e l -> P e); auto. (* Goal: forall (e0 : Cobham) (_ : @In Cobham e0 (@cons Cobham e l)), P e0 *) (* Goal: forall (e : Cobham) (_ : @In Cobham e (@nil Cobham)), P e *) simpl;intros; tauto. (* Goal: forall (e0 : Cobham) (_ : @In Cobham e0 (@cons Cobham e l)), P e0 *) simpl. (* Goal: forall (e0 : Cobham) (_ : or (@eq Cobham e e0) (@In Cobham e0 l)), P e0 *) intros e' [ | ]; intros; subst; auto. Qed. Inductive Arity : Set := | error_Rec : Arity -> Arity -> Arity -> Arity -> Arity | error_Comp : Arity -> list Arity -> Arity | error_Proj : nat -> nat -> Arity | ok_arity : nat -> Arity. Definition arity_eq (a1 a2 : Arity) := match a1, a2 with | ok_arity n1, ok_arity n2 => beq_nat n1 n2 | _, _ => false end. Lemma arity_eq_true x1 x2 : arity_eq x1 x2 = true -> x1 = x2. Proof. (* Goal: forall _ : @eq bool (arity_eq x1 x2) true, @eq Arity x1 x2 *) intros; unfold arity_eq in H. (* Goal: @eq Arity x1 x2 *) destruct x1; try discriminate. (* Goal: @eq Arity (ok_arity n) x2 *) destruct x2; try discriminate. (* Goal: @eq Arity (ok_arity n) (ok_arity n0) *) apply beq_nat_true in H; subst; trivial. Qed. Lemma arity_eq_refl : forall n, arity_eq (ok_arity n) (ok_arity n) = true. Proof. (* Goal: forall n : nat, @eq bool (arity_eq (ok_arity n) (ok_arity n)) true *) intros; case (ok_arity n); simpl; intros. (* Goal: @eq bool (Nat.eqb n0 n0) true *) rewrite beq_nat_true_iff; trivial. Qed. Fixpoint arity (e : Cobham) : Arity := match e with | Zero => ok_arity 0 | Proj n j => if leb (S j) n then ok_arity n else error_Proj n j | Succ _ => ok_arity 1 | Smash => ok_arity 2 | Rec g h0 h1 j => match arity g, arity h0, arity h1, arity j with | ok_arity gn, ok_arity h0n, ok_arity h1n, ok_arity jn => if beq_nat (S (S gn)) h0n && beq_nat h1n h0n && beq_nat (S jn) h1n then ok_arity jn else error_Rec (ok_arity gn) (ok_arity h0n) (ok_arity h1n) (ok_arity jn) | ag, ah0, ah1, aj => error_Rec ag ah0 ah1 aj end | Comp n h l => match arity h, map arity l with | ok_arity nh, al => if beq_nat nh (length l) && forallb (fun e => arity_eq e (ok_arity n)) al then ok_arity n else error_Comp (ok_arity nh) al | e , le => error_Comp e le end end. Lemma Cobham_ind_inf' : forall (P : nat -> Cobham -> Prop), forall Q : nat -> list Cobham -> Prop, (forall n, Q n nil) -> (forall e n l, P n e -> Q n l -> Q n (e :: l)) -> P 0 Zero -> (forall n i, i < n -> P n (Proj n i)) -> (forall b, P 1 (Succ b)) -> (P 2 Smash) -> (forall n g h0 h1 j, arity g = ok_arity n -> arity h0 = ok_arity (S (S n)) -> arity h1 = ok_arity (S (S n)) -> arity j = ok_arity (S n) -> P n g -> P (S (S n)) h0 -> P (S (S n)) h1 -> P (S n) j -> P (S n) (Rec g h0 h1 j)) -> (forall n h rl, arity h = ok_arity (length rl) -> (forall e, In e rl -> arity e = ok_arity n) -> P (length rl) h -> Q n rl -> P n (Comp n h rl)) -> forall e n , arity e = ok_arity n -> P n e. Proof. (* Goal: forall (P : forall (_ : nat) (_ : Cobham), Prop) (Q : forall (_ : nat) (_ : list Cobham), Prop) (_ : forall n : nat, Q n (@nil Cobham)) (_ : forall (e : Cobham) (n : nat) (l : list Cobham) (_ : P n e) (_ : Q n l), Q n (@cons Cobham e l)) (_ : P O Zero) (_ : forall (n i : nat) (_ : lt i n), P n (Proj n i)) (_ : forall b : bool, P (S O) (Succ b)) (_ : P (S (S O)) Smash) (_ : forall (n : nat) (g h0 h1 j : Cobham) (_ : @eq Arity (arity g) (ok_arity n)) (_ : @eq Arity (arity h0) (ok_arity (S (S n)))) (_ : @eq Arity (arity h1) (ok_arity (S (S n)))) (_ : @eq Arity (arity j) (ok_arity (S n))) (_ : P n g) (_ : P (S (S n)) h0) (_ : P (S (S n)) h1) (_ : P (S n) j), P (S n) (Rec g h0 h1 j)) (_ : forall (n : nat) (h : Cobham) (rl : list Cobham) (_ : @eq Arity (arity h) (ok_arity (@length Cobham rl))) (_ : forall (e : Cobham) (_ : @In Cobham e rl), @eq Arity (arity e) (ok_arity n)) (_ : P (@length Cobham rl) h) (_ : Q n rl), P n (Comp n h rl)) (e : Cobham) (n : nat) (_ : @eq Arity (arity e) (ok_arity n)), P n e *) fix Cobham_ind_inf' 11; intros. (* Goal: P n e *) destruct e; simpl in *. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) (* Goal: P n Smash *) (* Goal: P n (Succ b) *) (* Goal: P n (Proj n0 n1) *) (* Goal: P n Zero *) injection H7; intros; subst; auto. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) (* Goal: P n Smash *) (* Goal: P n (Succ b) *) (* Goal: P n (Proj n0 n1) *) destruct n0; try discriminate. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) (* Goal: P n Smash *) (* Goal: P n (Succ b) *) (* Goal: P n (Proj (S n0) n1) *) case_eq (leb n1 n0); intros; rewrite H8 in H7; try discriminate. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) (* Goal: P n Smash *) (* Goal: P n (Succ b) *) (* Goal: P n (Proj (S n0) n1) *) injection H7; intros; subst; auto. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) (* Goal: P n Smash *) (* Goal: P n (Succ b) *) (* Goal: P (S n0) (Proj (S n0) n1) *) apply H2. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) (* Goal: P n Smash *) (* Goal: P n (Succ b) *) (* Goal: lt n1 (S n0) *) apply leb_complete in H8; omega. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) (* Goal: P n Smash *) (* Goal: P n (Succ b) *) injection H7; intros; subst; auto. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) (* Goal: P n Smash *) injection H7; intros; subst; auto. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) case_eq (arity e1); intros; rewrite H8 in H7; try discriminate. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) case_eq (arity e2); intros; rewrite H9 in H7; try discriminate. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) case_eq (arity e3); intros; rewrite H10 in H7; try discriminate. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) case_eq (arity e4); intros; rewrite H11 in H7; try discriminate. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) destruct n1; simpl; intros; try discriminate; auto. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) destruct n1; simpl; intros; try discriminate; auto. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) case_eq (beq_nat n0 n1); intros; rewrite H12 in H7; try discriminate. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) apply beq_nat_true in H12; subst. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) case_eq (beq_nat n2 (S (S n1))); intros; rewrite H12 in H7; try discriminate. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) apply beq_nat_true in H12; subst. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) case_eq (beq_nat n3 (S n1)); intros; rewrite H12 in H7; try discriminate. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) apply beq_nat_true in H12; subst. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) simpl in H7. (* Goal: P n (Comp n0 e l) *) (* Goal: P n (Rec e1 e2 e3 e4) *) injection H7; intros; subst. (* Goal: P n (Comp n0 e l) *) (* Goal: P (S n1) (Rec e1 e2 e3 e4) *) apply H5; auto. (* Goal: P n (Comp n0 e l) *) (* Goal: P (S n1) e4 *) (* Goal: P (S (S n1)) e3 *) (* Goal: P (S (S n1)) e2 *) (* Goal: P n1 e1 *) eapply Cobham_ind_inf'; eauto. (* Goal: P n (Comp n0 e l) *) (* Goal: P (S n1) e4 *) (* Goal: P (S (S n1)) e3 *) (* Goal: P (S (S n1)) e2 *) eapply Cobham_ind_inf'; eauto. (* Goal: P n (Comp n0 e l) *) (* Goal: P (S n1) e4 *) (* Goal: P (S (S n1)) e3 *) eapply Cobham_ind_inf'; eauto. (* Goal: P n (Comp n0 e l) *) (* Goal: P (S n1) e4 *) eapply Cobham_ind_inf'; eauto. (* Goal: P n (Comp n0 e l) *) case_eq (arity e); intros; rewrite H8 in H7; try discriminate. (* Goal: P n (Comp n0 e l) *) case_eq (beq_nat n1 (length l)); intros; rewrite H9 in H7; try discriminate. (* Goal: P n (Comp n0 e l) *) case_eq (forallb (fun e : Arity => arity_eq e (ok_arity n0)) (map arity l)); intros; rewrite H10 in H7;try discriminate. (* Goal: P n (Comp n0 e l) *) simpl in H7. (* Goal: P n (Comp n0 e l) *) injection H7; intros; subst. (* Goal: P n (Comp n e l) *) rewrite forallb_forall in H10. (* Goal: P n (Comp n e l) *) apply beq_nat_true in H9; subst. (* Goal: P n (Comp n e l) *) apply H6; trivial. (* Goal: Q n l *) (* Goal: P (@length Cobham l) e *) (* Goal: forall (e : Cobham) (_ : @In Cobham e l), @eq Arity (arity e) (ok_arity n) *) intros. (* Goal: Q n l *) (* Goal: P (@length Cobham l) e *) (* Goal: @eq Arity (arity e0) (ok_arity n) *) apply arity_eq_true. (* Goal: Q n l *) (* Goal: P (@length Cobham l) e *) (* Goal: @eq bool (arity_eq (arity e0) (ok_arity n)) true *) apply H10. (* Goal: Q n l *) (* Goal: P (@length Cobham l) e *) (* Goal: @In Arity (arity e0) (@map Cobham Arity arity l) *) apply in_map_iff. (* Goal: Q n l *) (* Goal: P (@length Cobham l) e *) (* Goal: @ex Cobham (fun x : Cobham => and (@eq Arity (arity x) (arity e0)) (@In Cobham x l)) *) exists e0; split; trivial. (* Goal: Q n l *) (* Goal: P (@length Cobham l) e *) eapply Cobham_ind_inf'; eauto. (* Goal: Q n l *) clear H8. (* Goal: Q n l *) revert l H10. (* Goal: forall (l : list Cobham) (_ : forall (x : Arity) (_ : @In Arity x (@map Cobham Arity arity l)), @eq bool (arity_eq x (ok_arity n)) true), Q n l *) fix Cobham_ind_inf'0 1. (* Goal: forall (l : list Cobham) (_ : forall (x : Arity) (_ : @In Arity x (@map Cobham Arity arity l)), @eq bool (arity_eq x (ok_arity n)) true), Q n l *) intros. (* Goal: Q n l *) destruct l. (* Goal: Q n (@cons Cobham c l) *) (* Goal: Q n (@nil Cobham) *) auto. (* Goal: Q n (@cons Cobham c l) *) eapply H0. (* Goal: Q n l *) (* Goal: P n c *) eapply Cobham_ind_inf'; eauto. (* Goal: Q n l *) (* Goal: @eq Arity (arity c) (ok_arity n) *) apply arity_eq_true. (* Goal: Q n l *) (* Goal: @eq bool (arity_eq (arity c) (ok_arity n)) true *) apply H10. (* Goal: Q n l *) (* Goal: @In Arity (arity c) (@map Cobham Arity arity (@cons Cobham c l)) *) simpl; auto. (* Goal: Q n l *) apply Cobham_ind_inf'0. (* Goal: forall (x : Arity) (_ : @In Arity x (@map Cobham Arity arity l)), @eq bool (arity_eq x (ok_arity n)) true *) intros. (* Goal: @eq bool (arity_eq x (ok_arity n)) true *) apply H10. (* Goal: @In Arity x (@map Cobham Arity arity (@cons Cobham c l)) *) simpl; auto. Qed. Lemma Cobham_ind_inf : forall (P : nat -> Cobham -> Prop), P 0 Zero -> (forall n i, i < n -> P n (Proj n i)) -> (forall b, P 1 (Succ b)) -> (P 2 Smash) -> (forall n g h0 h1 j, arity g = ok_arity n -> arity h0 = ok_arity (S (S n)) -> arity h1 = ok_arity (S (S n)) -> arity j = ok_arity (S n) -> P n g -> P (S (S n)) h0 -> P (S (S n)) h1 -> P (S n) j -> P (S n) (Rec g h0 h1 j)) -> (forall n h rl, arity h = ok_arity (length rl) -> (forall e, In e rl -> arity e = ok_arity n) -> P (length rl) h -> (forall r, In r rl -> P n r) -> P n (Comp n h rl)) -> forall e n , arity e = ok_arity n -> P n e. Proof. (* Goal: forall (P : forall (_ : nat) (_ : Cobham), Prop) (_ : P O Zero) (_ : forall (n i : nat) (_ : lt i n), P n (Proj n i)) (_ : forall b : bool, P (S O) (Succ b)) (_ : P (S (S O)) Smash) (_ : forall (n : nat) (g h0 h1 j : Cobham) (_ : @eq Arity (arity g) (ok_arity n)) (_ : @eq Arity (arity h0) (ok_arity (S (S n)))) (_ : @eq Arity (arity h1) (ok_arity (S (S n)))) (_ : @eq Arity (arity j) (ok_arity (S n))) (_ : P n g) (_ : P (S (S n)) h0) (_ : P (S (S n)) h1) (_ : P (S n) j), P (S n) (Rec g h0 h1 j)) (_ : forall (n : nat) (h : Cobham) (rl : list Cobham) (_ : @eq Arity (arity h) (ok_arity (@length Cobham rl))) (_ : forall (e : Cobham) (_ : @In Cobham e rl), @eq Arity (arity e) (ok_arity n)) (_ : P (@length Cobham rl) h) (_ : forall (r : Cobham) (_ : @In Cobham r rl), P n r), P n (Comp n h rl)) (e : Cobham) (n : nat) (_ : @eq Arity (arity e) (ok_arity n)), P n e *) intros. (* Goal: P n e *) apply Cobham_ind_inf' with (Q := fun n l => forall e , In e l -> P n e); auto; simpl in *; intros. (* Goal: P n0 e1 *) (* Goal: P n0 e0 *) tauto. (* Goal: P n0 e1 *) destruct H8; subst; auto. Qed. Fixpoint sem_Rec (sem_g sem_h0 sem_h1 : list bs -> bs) (v : bs) (vl : list bs) : bs := match v with | nil => sem_g vl | b::v' => if b then sem_h1 (v' :: (sem_Rec sem_g sem_h0 sem_h1 v' vl) :: vl) else sem_h0 (v' :: (sem_Rec sem_g sem_h0 sem_h1 v' vl) :: vl) end. Fixpoint smash' (x y : bs) := match x with | nil => y | _ :: x' => false :: smash' x' y end. Lemma length_smash' x y : length (smash' x y) = length x + length y. Proof. (* Goal: @eq nat (@length bool (smash' x y)) (Init.Nat.add (@length bool x) (@length bool y)) *) induction x; simpl; trivial. (* Goal: @eq nat (S (@length bool (smash' x y))) (S (Init.Nat.add (@length bool x) (@length bool y))) *) intros; rewrite IHx; trivial. Qed. Fixpoint smash_bs (x y : bs) : bs := match x with | nil => true :: nil | _ :: x' => smash' y (smash_bs x' y) end. Lemma length_smash x y : length (smash_bs x y) = 1 + length x * length y. Proof. (* Goal: @eq nat (@length bool (smash_bs x y)) (Init.Nat.add (S O) (Init.Nat.mul (@length bool x) (@length bool y))) *) induction x; simpl; trivial; intros. (* Goal: @eq nat (@length bool (smash' y (smash_bs x y))) (S (Init.Nat.add (@length bool y) (Init.Nat.mul (@length bool x) (@length bool y)))) *) rewrite length_smash', IHx; omega. Qed. Fixpoint Sem (e: Cobham) (vl:list bs) : bs := match e with | Zero => nil | Proj n j => nth j vl nil | Succ b => b :: hd nil vl | Smash => smash_bs (hd nil vl) (hd nil (tl vl)) | Rec g h0 h1 j => sem_Rec (Sem g) (Sem h0) (Sem h1) (hd nil vl) (tail vl) | Comp _ h l => Sem h (List.map (fun e => Sem e vl) l) end. Lemma simpl_Rec : forall g h0 h1 j l, Sem (Rec g h0 h1 j) l = sem_Rec (Sem g) (Sem h0) (Sem h1) (hd nil l) (tl l). Proof. (* Goal: forall (g h0 h1 j : Cobham) (l : list (list bool)), @eq (list bool) (Sem (Rec g h0 h1 j) l) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) *) intros; simpl; trivial. Qed. Lemma Sem_add_zero : forall e n, arity e = ok_arity n -> forall l, length l <= n -> Sem e l = Sem e (l ++ (map (fun e => nil) (seq 0 (n - length l)))). Proof. (* Goal: forall (e : Cobham) (n : nat) (_ : @eq Arity (arity e) (ok_arity n)) (l : list (list bool)) (_ : le (@length (list bool) l) n), @eq (list bool) (Sem e l) (Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) *) refine (Cobham_ind_inf (fun n e => forall l : list bs, length l <= n -> Sem e l = Sem e (l ++ map (fun _ : nat => nil) (seq 0 (n - length l)))) _ _ _ _ _ _); simpl; auto; intros. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end)))) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end))))) *) (* Goal: @eq (list bool) (smash_bs (@hd (list bool) (@nil bool) l) (@hd (list bool) (@nil bool) (@tl (list bool) l))) (smash_bs (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))) (@hd (list bool) (@nil bool) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) l)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S O | S l => O end))))) *) (* Goal: @eq (list bool) (@nth (list bool) i l (@nil bool)) (@nth (list bool) i (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l))))) (@nil bool)) *) destruct (le_lt_dec (length l) i). (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end)))) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end))))) *) (* Goal: @eq (list bool) (smash_bs (@hd (list bool) (@nil bool) l) (@hd (list bool) (@nil bool) (@tl (list bool) l))) (smash_bs (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))) (@hd (list bool) (@nil bool) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) l)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S O | S l => O end))))) *) (* Goal: @eq (list bool) (@nth (list bool) i l (@nil bool)) (@nth (list bool) i (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l))))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i l (@nil bool)) (@nth (list bool) i (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l))))) (@nil bool)) *) rewrite nth_overflow; trivial. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end)))) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end))))) *) (* Goal: @eq (list bool) (smash_bs (@hd (list bool) (@nil bool) l) (@hd (list bool) (@nil bool) (@tl (list bool) l))) (smash_bs (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))) (@hd (list bool) (@nil bool) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) l)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S O | S l => O end))))) *) (* Goal: @eq (list bool) (@nth (list bool) i l (@nil bool)) (@nth (list bool) i (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l))))) (@nil bool)) *) (* Goal: @eq (list bool) (@nil bool) (@nth (list bool) i (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l))))) (@nil bool)) *) rewrite app_nth2; trivial. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end)))) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end))))) *) (* Goal: @eq (list bool) (smash_bs (@hd (list bool) (@nil bool) l) (@hd (list bool) (@nil bool) (@tl (list bool) l))) (smash_bs (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))) (@hd (list bool) (@nil bool) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) l)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S O | S l => O end))))) *) (* Goal: @eq (list bool) (@nth (list bool) i l (@nil bool)) (@nth (list bool) i (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l))))) (@nil bool)) *) (* Goal: @eq (list bool) (@nil bool) (@nth (list bool) (Init.Nat.sub i (@length (list bool) l)) (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))) (@nil bool)) *) rewrite nth_map_cst; trivial. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end)))) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end))))) *) (* Goal: @eq (list bool) (smash_bs (@hd (list bool) (@nil bool) l) (@hd (list bool) (@nil bool) (@tl (list bool) l))) (smash_bs (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))) (@hd (list bool) (@nil bool) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) l)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S O | S l => O end))))) *) (* Goal: @eq (list bool) (@nth (list bool) i l (@nil bool)) (@nth (list bool) i (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l))))) (@nil bool)) *) rewrite app_nth1; trivial. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end)))) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end))))) *) (* Goal: @eq (list bool) (smash_bs (@hd (list bool) (@nil bool) l) (@hd (list bool) (@nil bool) (@tl (list bool) l))) (smash_bs (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))) (@hd (list bool) (@nil bool) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) l)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S O | S l => O end))))) *) f_equal; destruct l; simpl; trivial. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end)))) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end))))) *) (* Goal: @eq (list bool) (smash_bs (@hd (list bool) (@nil bool) l) (@hd (list bool) (@nil bool) (@tl (list bool) l))) (smash_bs (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))) (@hd (list bool) (@nil bool) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S (S O) | S (O as l) => S O | S (S l0 as l) => O end)))))) *) f_equal; destruct l; simpl; trivial. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end)))) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end))))) *) (* Goal: @eq (list bool) (@hd (list bool) (@nil bool) l0) (@hd (list bool) (@nil bool) (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l0 with | O => S O | S l => O end)))) *) destruct l0; simpl; trivial. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end)))) (@tl (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O match @length (list bool) l with | O => S n | S l => Init.Nat.sub n l end))))) *) destruct l; simpl in *; try discriminate. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) *) (* Goal: @eq (list bool) (Sem g (@nil (list bool))) (Sem g (@map nat (list bool) (fun _ : nat => @nil bool) (seq (S O) n))) *) rewrite <- app_nil_l with (l := (map (fun _ : nat => nil) (seq 1 n))). (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) *) (* Goal: @eq (list bool) (Sem g (@nil (list bool))) (Sem g (@app (list bool) (@nil (list bool)) (@map nat (list bool) (fun _ : nat => @nil bool) (seq (S O) n)))) *) rewrite <- seq_shift, map_map. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) *) (* Goal: @eq (list bool) (Sem g (@nil (list bool))) (Sem g (@app (list bool) (@nil (list bool)) (@map nat (list bool) (fun _ : nat => @nil bool) (seq O n)))) *) replace n with (n - length (@nil bs)). (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) *) (* Goal: @eq nat (Init.Nat.sub n (@length (list bool) (@nil (list bool)))) n *) (* Goal: @eq (list bool) (Sem g (@nil (list bool))) (Sem g (@app (list bool) (@nil (list bool)) (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) (@nil (list bool)))))))) *) apply H3; trivial. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) *) (* Goal: @eq nat (Init.Nat.sub n (@length (list bool) (@nil (list bool)))) n *) (* Goal: le (@length (list bool) (@nil (list bool))) n *) simpl; omega. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) *) (* Goal: @eq nat (Init.Nat.sub n (@length (list bool) (@nil (list bool)))) n *) simpl; omega. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) *) induction l; simpl. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0))))))) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))))) *) (* Goal: @eq (list bool) (Sem g l0) (Sem g (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) *) apply H3; trivial; omega. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0))))))) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))))) *) rewrite <- IHl. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0))))))) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) (@app (list bool) l0 (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))))) *) replace (l :: sem_Rec (Sem g) (Sem h0) (Sem h1) l l0 :: l0 ++ map (fun _ : nat => nil) (seq 0 (n - length l0))) with ((l :: sem_Rec (Sem g) (Sem h0) (Sem h1) l l0 :: l0) ++ (map (fun _ : nat => nil) (seq 0 (n - length l0)))); trivial. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (if a then Sem h1 (@app (list bool) (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0))))) else Sem h0 (@app (list bool) (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) *) case a. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (Sem h0 (@app (list bool) (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) *) (* Goal: @eq (list bool) (Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (Sem h1 (@app (list bool) (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) *) erewrite H5; eauto; simpl; trivial; omega. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) (* Goal: @eq (list bool) (Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (Sem h0 (@app (list bool) (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l0)))))) *) erewrite H4; eauto; simpl; trivial; omega. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl)) *) f_equal. (* Goal: @eq (list (list bool)) (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl) (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) rl) *) apply map_ext2; intros. (* Goal: @eq (list bool) (Sem a l) (Sem a (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub n (@length (list bool) l)))))) *) eapply H2; trivial. Qed. Lemma Sem_remove_zero : forall e n, arity e = ok_arity n -> forall l l', n = length l -> Sem e l = Sem e (l ++ l'). Proof. (* Goal: forall (e : Cobham) (n : nat) (_ : @eq Arity (arity e) (ok_arity n)) (l l' : list (list bool)) (_ : @eq nat n (@length (list bool) l)), @eq (list bool) (Sem e l) (Sem e (@app (list bool) l l')) *) refine (Cobham_ind_inf (fun n e => forall l l', n = length l -> Sem e l = Sem e (l ++ l')) _ _ _ _ _ _); simpl; auto; intros. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l l')) (@tl (list bool) (@app (list bool) l l'))) *) (* Goal: @eq (list bool) (smash_bs (@hd (list bool) (@nil bool) l) (@hd (list bool) (@nil bool) (@tl (list bool) l))) (smash_bs (@hd (list bool) (@nil bool) (@app (list bool) l l')) (@hd (list bool) (@nil bool) (@tl (list bool) (@app (list bool) l l')))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) l)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) l l'))) *) (* Goal: @eq (list bool) (@nth (list bool) i l (@nil bool)) (@nth (list bool) i (@app (list bool) l l') (@nil bool)) *) rewrite app_nth1; trivial; omega. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l l')) (@tl (list bool) (@app (list bool) l l'))) *) (* Goal: @eq (list bool) (smash_bs (@hd (list bool) (@nil bool) l) (@hd (list bool) (@nil bool) (@tl (list bool) l))) (smash_bs (@hd (list bool) (@nil bool) (@app (list bool) l l')) (@hd (list bool) (@nil bool) (@tl (list bool) (@app (list bool) l l')))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) l)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) l l'))) *) destruct l; simpl in *; try discriminate; trivial. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l l')) (@tl (list bool) (@app (list bool) l l'))) *) (* Goal: @eq (list bool) (smash_bs (@hd (list bool) (@nil bool) l) (@hd (list bool) (@nil bool) (@tl (list bool) l))) (smash_bs (@hd (list bool) (@nil bool) (@app (list bool) l l')) (@hd (list bool) (@nil bool) (@tl (list bool) (@app (list bool) l l')))) *) destruct l; simpl in *; try discriminate; trivial. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l l')) (@tl (list bool) (@app (list bool) l l'))) *) (* Goal: @eq (list bool) (smash_bs l (@hd (list bool) (@nil bool) l0)) (smash_bs l (@hd (list bool) (@nil bool) (@app (list bool) l0 l'))) *) destruct l0; simpl in *; try discriminate; trivial. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l)) (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) (@app (list bool) l l')) (@tl (list bool) (@app (list bool) l l'))) *) destruct l; simpl in *; try discriminate. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl)) *) (* Goal: @eq (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 l')) *) induction l; simpl. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl)) *) (* Goal: @eq (list bool) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 l')) (@app (list bool) l0 l'))) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 l')) (@app (list bool) l0 l')))) *) (* Goal: @eq (list bool) (Sem g l0) (Sem g (@app (list bool) l0 l')) *) eapply H3; eauto; omega. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl)) *) (* Goal: @eq (list bool) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 l')) (@app (list bool) l0 l'))) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l (@app (list bool) l0 l')) (@app (list bool) l0 l')))) *) rewrite <- IHl. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl)) *) (* Goal: @eq (list bool) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) (@app (list bool) l0 l'))) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) (@app (list bool) l0 l')))) *) replace (l :: sem_Rec (Sem g) (Sem h0) (Sem h1) l l0 :: l0 ++ l') with ((l :: sem_Rec (Sem g) (Sem h0) (Sem h1) l l0 :: l0) ++ l'); trivial. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl)) *) (* Goal: @eq (list bool) (if a then Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) else Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (if a then Sem h1 (@app (list bool) (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) l') else Sem h0 (@app (list bool) (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) l')) *) case a. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl)) *) (* Goal: @eq (list bool) (Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (Sem h0 (@app (list bool) (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) l')) *) (* Goal: @eq (list bool) (Sem h1 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (Sem h1 (@app (list bool) (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) l')) *) eapply H5; eauto; simpl; omega. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl)) *) (* Goal: @eq (list bool) (Sem h0 (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0))) (Sem h0 (@app (list bool) (@cons (list bool) l (@cons (list bool) (sem_Rec (Sem g) (Sem h0) (Sem h1) l l0) l0)) l')) *) eapply H4; eauto; simpl; omega. (* Goal: @eq (list bool) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl)) (Sem h (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl)) *) f_equal. (* Goal: @eq (list (list bool)) (@map Cobham (list bool) (fun e : Cobham => Sem e l) rl) (@map Cobham (list bool) (fun e : Cobham => Sem e (@app (list bool) l l')) rl) *) apply map_ext2; intros. (* Goal: @eq (list bool) (Sem a l) (Sem a (@app (list bool) l l')) *) eapply H2; trivial. Qed. Fixpoint rec_bounded' (e : Cobham) : Prop := match e with | Rec g h0 h1 j => rec_bounded' j /\ rec_bounded' g /\ rec_bounded' h0 /\ rec_bounded' h1 /\ (match (arity e) with | ok_arity n => forall l, length l = n -> length (Sem e l) <= length (Sem j l) | _ => True end) | Comp n h l => rec_bounded' h /\ andl rec_bounded' l | _ => True end. Fixpoint rec_bounded (e : Cobham) : Prop := match e with | Rec g h0 h1 j => rec_bounded j /\ rec_bounded g /\ rec_bounded h0 /\ rec_bounded h1 /\ (forall l, length (Sem e l) <= length (Sem j l)) | Comp n h l => rec_bounded h /\ andl rec_bounded l | _ => True end. Lemma rec_bounded_spec (e : Cobham) : rec_bounded e -> rec_bounded' e. Lemma rec_bounded'_spec : forall (e : Cobham) n, arity e = ok_arity n -> rec_bounded' e -> rec_bounded e. Proof. (* Goal: forall (e : Cobham) (n : nat) (_ : @eq Arity (arity e) (ok_arity n)) (_ : rec_bounded' e), rec_bounded e *) refine (Cobham_ind_inf (fun n e => rec_bounded' e -> rec_bounded e) _ _ _ _ _ _); simpl; auto; intros. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: and (rec_bounded j) (and (rec_bounded g) (and (rec_bounded h0) (and (rec_bounded h1) (forall l : list (list bool), le (@length bool (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l))) (@length bool (Sem j l)))))) *) decompose [and] H7; clear H7. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: and (rec_bounded j) (and (rec_bounded g) (and (rec_bounded h0) (and (rec_bounded h1) (forall l : list (list bool), le (@length bool (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l))) (@length bool (Sem j l)))))) *) rewrite H, H0, H1,H2 in H13. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: and (rec_bounded j) (and (rec_bounded g) (and (rec_bounded h0) (and (rec_bounded h1) (forall l : list (list bool), le (@length bool (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l))) (@length bool (Sem j l)))))) *) simpl in H13. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: and (rec_bounded j) (and (rec_bounded g) (and (rec_bounded h0) (and (rec_bounded h1) (forall l : list (list bool), le (@length bool (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l))) (@length bool (Sem j l)))))) *) rewrite <- beq_nat_refl in H13. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: and (rec_bounded j) (and (rec_bounded g) (and (rec_bounded h0) (and (rec_bounded h1) (forall l : list (list bool), le (@length bool (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l))) (@length bool (Sem j l)))))) *) simpl in H13. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: and (rec_bounded j) (and (rec_bounded g) (and (rec_bounded h0) (and (rec_bounded h1) (forall l : list (list bool), le (@length bool (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l))) (@length bool (Sem j l)))))) *) repeat (split; try tauto). (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: forall l : list (list bool), le (@length bool (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l))) (@length bool (Sem j l)) *) intros. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: le (@length bool (sem_Rec (Sem g) (Sem h0) (Sem h1) (@hd (list bool) (@nil bool) l) (@tl (list bool) l))) (@length bool (Sem j l)) *) rewrite <- simpl_Rec with (j := j). (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) l)) (@length bool (Sem j l)) *) destruct (le_lt_dec (length l) (S n)). (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) l)) (@length bool (Sem j l)) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) l)) (@length bool (Sem j l)) *) rewrite Sem_add_zero with (n := S n); trivial. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) l)) (@length bool (Sem j l)) *) (* Goal: @eq Arity (arity (Rec g h0 h1 j)) (ok_arity (S n)) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub (S n) (@length (list bool) l))))))) (@length bool (Sem j l)) *) rewrite Sem_add_zero with (e := j) (n := S n); trivial. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) l)) (@length bool (Sem j l)) *) (* Goal: @eq Arity (arity (Rec g h0 h1 j)) (ok_arity (S n)) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub (S n) (@length (list bool) l))))))) (@length bool (Sem j (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub (S n) (@length (list bool) l))))))) *) apply H13; trivial. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) l)) (@length bool (Sem j l)) *) (* Goal: @eq Arity (arity (Rec g h0 h1 j)) (ok_arity (S n)) *) (* Goal: @eq nat (@length (list bool) (@app (list bool) l (@map nat (list bool) (fun _ : nat => @nil bool) (seq O (Init.Nat.sub (S n) (@length (list bool) l)))))) (S n) *) rewrite app_length, map_length, seq_length. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) l)) (@length bool (Sem j l)) *) (* Goal: @eq Arity (arity (Rec g h0 h1 j)) (ok_arity (S n)) *) (* Goal: @eq nat (Init.Nat.add (@length (list bool) l) (Init.Nat.sub (S n) (@length (list bool) l))) (S n) *) omega. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) l)) (@length bool (Sem j l)) *) (* Goal: @eq Arity (arity (Rec g h0 h1 j)) (ok_arity (S n)) *) simpl. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) l)) (@length bool (Sem j l)) *) (* Goal: @eq Arity match arity g with | error_Rec a a0 a1 a2 => error_Rec (error_Rec a a0 a1 a2) (arity h0) (arity h1) (arity j) | error_Comp a l => error_Rec (error_Comp a l) (arity h0) (arity h1) (arity j) | error_Proj n n0 => error_Rec (error_Proj n n0) (arity h0) (arity h1) (arity j) | ok_arity gn => match arity h0 with | error_Rec a a0 a1 a2 => error_Rec (ok_arity gn) (error_Rec a a0 a1 a2) (arity h1) (arity j) | error_Comp a l => error_Rec (ok_arity gn) (error_Comp a l) (arity h1) (arity j) | error_Proj n n0 => error_Rec (ok_arity gn) (error_Proj n n0) (arity h1) (arity j) | ok_arity h0n => match arity h1 with | error_Rec a a0 a1 a2 => error_Rec (ok_arity gn) (ok_arity h0n) (error_Rec a a0 a1 a2) (arity j) | error_Comp a l => error_Rec (ok_arity gn) (ok_arity h0n) (error_Comp a l) (arity j) | error_Proj n n0 => error_Rec (ok_arity gn) (ok_arity h0n) (error_Proj n n0) (arity j) | ok_arity h1n => match arity j with | error_Rec a a0 a1 a2 => error_Rec (ok_arity gn) (ok_arity h0n) (ok_arity h1n) (error_Rec a a0 a1 a2) | error_Comp a l => error_Rec (ok_arity gn) (ok_arity h0n) (ok_arity h1n) (error_Comp a l) | error_Proj n n0 => error_Rec (ok_arity gn) (ok_arity h0n) (ok_arity h1n) (error_Proj n n0) | ok_arity jn => if andb (andb match h0n with | O => false | S (O as m') => false | S (S m'0 as m') => Nat.eqb gn m'0 end (Nat.eqb h1n h0n)) match h1n with | O => false | S m' => Nat.eqb jn m' end then ok_arity jn else error_Rec (ok_arity gn) (ok_arity h0n) (ok_arity h1n) (ok_arity jn) end end end end (ok_arity (S n)) *) rewrite H, H0, H1, H2. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) l)) (@length bool (Sem j l)) *) (* Goal: @eq Arity (if andb (andb (Nat.eqb n n) (Nat.eqb (S (S n)) (S (S n)))) (Nat.eqb (S n) (S n)) then ok_arity (S n) else error_Rec (ok_arity n) (ok_arity (S (S n))) (ok_arity (S (S n))) (ok_arity (S n))) (ok_arity (S n)) *) repeat rewrite <- beq_nat_refl; simpl; trivial. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) l)) (@length bool (Sem j l)) *) rewrite <- firstn_skipn with (n := S n) (l := l). (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) (@app (list bool) (@firstn (list bool) (S n) l) (@skipn (list bool) (S n) l)))) (@length bool (Sem j (@app (list bool) (@firstn (list bool) (S n) l) (@skipn (list bool) (S n) l)))) *) rewrite <- Sem_remove_zero with (n := S n); trivial. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) (* Goal: @eq Arity (arity (Rec g h0 h1 j)) (ok_arity (S n)) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) (@firstn (list bool) (S n) l))) (@length bool (Sem j (@app (list bool) (@firstn (list bool) (S n) l) (@skipn (list bool) (S n) l)))) *) rewrite <- Sem_remove_zero with (n := S n); trivial. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) (* Goal: @eq Arity (arity (Rec g h0 h1 j)) (ok_arity (S n)) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) (* Goal: le (@length bool (Sem (Rec g h0 h1 j) (@firstn (list bool) (S n) l))) (@length bool (Sem j (@firstn (list bool) (S n) l))) *) apply H13; trivial; trivial. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) (* Goal: @eq Arity (arity (Rec g h0 h1 j)) (ok_arity (S n)) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) (* Goal: @eq nat (@length (list bool) (@firstn (list bool) (S n) l)) (S n) *) rewrite firstn_length. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) (* Goal: @eq Arity (arity (Rec g h0 h1 j)) (ok_arity (S n)) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) (* Goal: @eq nat (Init.Nat.min (S n) (@length (list bool) l)) (S n) *) rewrite min_l; trivial; omega. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) (* Goal: @eq Arity (arity (Rec g h0 h1 j)) (ok_arity (S n)) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) rewrite firstn_length. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) (* Goal: @eq Arity (arity (Rec g h0 h1 j)) (ok_arity (S n)) *) (* Goal: @eq nat (S n) (Init.Nat.min (S n) (@length (list bool) l)) *) rewrite min_l; trivial; omega. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) (* Goal: @eq Arity (arity (Rec g h0 h1 j)) (ok_arity (S n)) *) simpl. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) (* Goal: @eq Arity match arity g with | error_Rec a a0 a1 a2 => error_Rec (error_Rec a a0 a1 a2) (arity h0) (arity h1) (arity j) | error_Comp a l => error_Rec (error_Comp a l) (arity h0) (arity h1) (arity j) | error_Proj n n0 => error_Rec (error_Proj n n0) (arity h0) (arity h1) (arity j) | ok_arity gn => match arity h0 with | error_Rec a a0 a1 a2 => error_Rec (ok_arity gn) (error_Rec a a0 a1 a2) (arity h1) (arity j) | error_Comp a l => error_Rec (ok_arity gn) (error_Comp a l) (arity h1) (arity j) | error_Proj n n0 => error_Rec (ok_arity gn) (error_Proj n n0) (arity h1) (arity j) | ok_arity h0n => match arity h1 with | error_Rec a a0 a1 a2 => error_Rec (ok_arity gn) (ok_arity h0n) (error_Rec a a0 a1 a2) (arity j) | error_Comp a l => error_Rec (ok_arity gn) (ok_arity h0n) (error_Comp a l) (arity j) | error_Proj n n0 => error_Rec (ok_arity gn) (ok_arity h0n) (error_Proj n n0) (arity j) | ok_arity h1n => match arity j with | error_Rec a a0 a1 a2 => error_Rec (ok_arity gn) (ok_arity h0n) (ok_arity h1n) (error_Rec a a0 a1 a2) | error_Comp a l => error_Rec (ok_arity gn) (ok_arity h0n) (ok_arity h1n) (error_Comp a l) | error_Proj n n0 => error_Rec (ok_arity gn) (ok_arity h0n) (ok_arity h1n) (error_Proj n n0) | ok_arity jn => if andb (andb match h0n with | O => false | S (O as m') => false | S (S m'0 as m') => Nat.eqb gn m'0 end (Nat.eqb h1n h0n)) match h1n with | O => false | S m' => Nat.eqb jn m' end then ok_arity jn else error_Rec (ok_arity gn) (ok_arity h0n) (ok_arity h1n) (ok_arity jn) end end end end (ok_arity (S n)) *) rewrite H, H0, H1, H2. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) (* Goal: @eq Arity (if andb (andb (Nat.eqb n n) (Nat.eqb (S (S n)) (S (S n)))) (Nat.eqb (S n) (S n)) then ok_arity (S n) else error_Rec (ok_arity n) (ok_arity (S (S n))) (ok_arity (S (S n))) (ok_arity (S n))) (ok_arity (S n)) *) repeat rewrite <- beq_nat_refl; simpl. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) (* Goal: @eq Arity (ok_arity (S n)) (ok_arity (S n)) *) trivial. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: @eq nat (S n) (@length (list bool) (@firstn (list bool) (S n) l)) *) rewrite firstn_length. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) (* Goal: @eq nat (S n) (Init.Nat.min (S n) (@length (list bool) l)) *) rewrite min_l; trivial; omega. (* Goal: and (rec_bounded h) (@andl Cobham rec_bounded rl) *) split. (* Goal: @andl Cobham rec_bounded rl *) (* Goal: rec_bounded h *) tauto. (* Goal: @andl Cobham rec_bounded rl *) apply forall_andl; intros. (* Goal: rec_bounded x *) destruct H3. (* Goal: rec_bounded x *) rewrite <- forall_andl in H5; auto. Qed. Fixpoint poly_Cobham (e : Cobham) := match e with | Zero => pcst 0 0 | Proj n i => pproj n i | Succ b => pplus (pcst 0 1) (pproj 1 0) | Smash => pplus (pcst 0 1) (pmult (pproj 2 0) (pproj 2 1)) | Rec g h0 h1 j => poly_Cobham j | Comp n h l => pplus (pcst n 0) (pcomp (poly_Cobham h) (map poly_Cobham l)) end. Lemma parity_poly_Cobham : forall (e : Cobham) n, arity e = ok_arity n -> parity (poly_Cobham e) = n. Proof. (* Goal: forall (e : Cobham) (n : nat) (_ : @eq Arity (arity e) (ok_arity n)), @eq nat (@fst nat (list mon) (poly_Cobham e)) n *) apply Cobham_ind_inf; simpl; auto; intros. (* Goal: @eq nat (Init.Nat.max n (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl)))) n *) apply max_l. (* Goal: le (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) n *) apply maxl_map. (* Goal: forall (x : prod nat (list mon)) (_ : @In (prod nat (list mon)) x (@map Cobham pol poly_Cobham rl)), @eq nat (@fst nat (list mon) x) n *) intros. (* Goal: @eq nat (@fst nat (list mon) x) n *) apply in_map_iff in H3. (* Goal: @eq nat (@fst nat (list mon) x) n *) destruct H3 as (? & ? & ?); subst. (* Goal: @eq nat (@fst nat (list mon) (poly_Cobham x0)) n *) apply H2; trivial. Qed. Lemma pWF_poly_Cobham : forall (e : Cobham) n, arity e = ok_arity n -> pWF (poly_Cobham e). Proof. (* Goal: forall (e : Cobham) (n : nat) (_ : @eq Arity (arity e) (ok_arity n)), pWF (poly_Cobham e) *) apply Cobham_ind_inf; simpl; auto; intros; try pWF. (* Goal: pWF x *) apply in_map_iff in H3. (* Goal: pWF x *) destruct H3 as (? & ? & ?); subst. (* Goal: pWF (poly_Cobham x0) *) apply H2; trivial. Qed. Lemma poly_Cobham_correct : forall (e : Cobham) xl, rec_bounded e -> length (Sem e xl) <= peval (poly_Cobham e) (map (@length _) xl).
Require Import Ensf_types. Definition first (x : Elt) : Elt := match x return Elt with | natural n => zero | couple a b => a | up e => zero | word w => zero end. Definition second (x : Elt) : Elt := match x return Elt with | natural n => zero | couple a b => b | up e => zero | word w => zero end. Lemma equal_couple : forall x y z t : Elt, couple x y = couple z t :>Elt -> x = z :>Elt /\ y = t :>Elt. Proof. (* Goal: forall (x y z t : Elt) (_ : @eq Elt (couple x y) (couple z t)), and (@eq Elt x z) (@eq Elt y t) *) intros x y z t H. (* Goal: and (@eq Elt x z) (@eq Elt y t) *) injection H; auto. Qed. Lemma couple_couple_inv1 : forall a b c d : Elt, couple a c = couple b d :>Elt -> a = b :>Elt. Proof. (* Goal: forall (a b c d : Elt) (_ : @eq Elt (couple a c) (couple b d)), @eq Elt a b *) intros a b c d H. (* Goal: @eq Elt a b *) injection H; auto. Qed. Lemma couple_couple_inv2 : forall a b c d : Elt, couple a c = couple b d :>Elt -> c = d :>Elt. Proof. (* Goal: forall (a b c d : Elt) (_ : @eq Elt (couple a c) (couple b d)), @eq Elt c d *) intros a b c d H. (* Goal: @eq Elt c d *) injection H; auto. Qed.
Require Export Metalib.LibDefaultSimp. Require Import Metalib.Metatheory. Require Import Omega. Definition lt_ge_dec (n m : nat) : {n < m} + {n >= m} := match Compare_dec.le_gt_dec m n with | left pf => right pf | right pf => left pf end. Ltac generalize_wrt x := repeat (progress (match goal with | J : _ |- _ => move J after x; generalize dependent J end)). Ltac apply_mutual_ind ind := let H := fresh in first [ intros H; induction H using ind | intros ? H; induction H using ind | intros ? ? H; induction H using ind | intros ? ? ? H; induction H using ind | intros ? ? ? ? H; induction H using ind | intros ? ? ? ? ? H; induction H using ind | intros ? ? ? ? ? ? H; induction H using ind | intros ? ? ? ? ? ? ? H; induction H using ind | intros ? ? ? ? ? ? ? ? H; induction H using ind ]. Ltac rename_last_into H := match goal with | J : _ |- _ => rename J into H end. Ltac specialize_all x := repeat (match goal with | H : _ |- _ => specialize (H x) end). Lemma remove_union_distrib : forall (s1 s2 : atoms) (x : atom), remove x (union s1 s2) [=] union (remove x s1) (remove x s2). Proof. (* Goal: forall (s1 s2 : AtomSetImpl.t) (x : Atom.atom), AtomSetImpl.Equal (AtomSetImpl.remove x (AtomSetImpl.union s1 s2)) (AtomSetImpl.union (AtomSetImpl.remove x s1) (AtomSetImpl.remove x s2)) *) fsetdec. Qed. Lemma Equal_union_compat : forall (s1 s2 s3 s4 : atoms), s1 [=] s3 -> s2 [=] s4 -> union s1 s2 [=] union s3 s4. Proof. (* Goal: forall (s1 s2 s3 s4 : AtomSetImpl.t) (_ : AtomSetImpl.Equal s1 s3) (_ : AtomSetImpl.Equal s2 s4), AtomSetImpl.Equal (AtomSetImpl.union s1 s2) (AtomSetImpl.union s3 s4) *) fsetdec. Qed. Lemma Subset_refl : forall (s : atoms), s [<=] s. Proof. (* Goal: forall s : AtomSetImpl.t, AtomSetImpl.Subset s s *) fsetdec. Qed. Lemma Subset_empty_any : forall (s : atoms), empty [<=] s. Proof. (* Goal: forall s : AtomSetImpl.t, AtomSetImpl.Subset AtomSetImpl.empty s *) fsetdec. Qed. Lemma Subset_union_compat : forall (s1 s2 s3 s4 : atoms), s1 [<=] s3 -> s2 [<=] s4 -> union s1 s2 [<=] union s3 s4. Proof. (* Goal: forall (s1 s2 s3 s4 : AtomSetImpl.t) (_ : AtomSetImpl.Subset s1 s3) (_ : AtomSetImpl.Subset s2 s4), AtomSetImpl.Subset (AtomSetImpl.union s1 s2) (AtomSetImpl.union s3 s4) *) fsetdec. Qed. Lemma Subset_union_left : forall (s1 s2 s3 : atoms), s1 [<=] s2 -> s1 [<=] union s2 s3. Proof. (* Goal: forall (s1 s2 s3 : AtomSetImpl.t) (_ : AtomSetImpl.Subset s1 s2), AtomSetImpl.Subset s1 (AtomSetImpl.union s2 s3) *) fsetdec. Qed. Lemma Subset_union_right : forall (s1 s2 s3 : atoms), s1 [<=] s3 -> s1 [<=] union s2 s3. Proof. (* Goal: forall (s1 s2 s3 : AtomSetImpl.t) (_ : AtomSetImpl.Subset s1 s3), AtomSetImpl.Subset s1 (AtomSetImpl.union s2 s3) *) fsetdec. Qed. Lemma Subset_union_lngen_open_upper : forall (s1 s2 s3 s4 s5 : atoms), s1 [<=] union s3 s4 -> s2 [<=] union s3 s5 -> union s1 s2 [<=] union s3 (union s4 s5). Proof. (* Goal: forall (s1 s2 s3 s4 s5 : AtomSetImpl.t) (_ : AtomSetImpl.Subset s1 (AtomSetImpl.union s3 s4)) (_ : AtomSetImpl.Subset s2 (AtomSetImpl.union s3 s5)), AtomSetImpl.Subset (AtomSetImpl.union s1 s2) (AtomSetImpl.union s3 (AtomSetImpl.union s4 s5)) *) fsetdec. Qed. Hint Resolve sym_eq : brute_force. Hint Extern 5 (_ = _ :> nat) => omega : brute_force. Hint Extern 5 (_ < _) => omega : brute_force. Hint Extern 5 (_ <= _) => omega : brute_force. Hint Rewrite @remove_union_distrib : lngen. Hint Resolve @Equal_union_compat : lngen. Hint Resolve @Subset_refl : lngen. Hint Resolve @Subset_empty_any : lngen. Hint Resolve @Subset_union_compat : lngen. Hint Resolve @Subset_union_left : lngen. Hint Resolve @Subset_union_right : lngen. Hint Resolve @Subset_union_lngen_open_upper : lngen.
Require Import Arith. Require Import Zbase. Definition succZ (x : Z) := match x return Z with | OZ => IZ | pos n => pos (S n) | neg n => match n return Z with | O => OZ | S m => neg m end end. Definition predZ (x : Z) := match x return Z with | OZ => neg 0 | pos n => match n return Z with | O => OZ | S m => pos m end | neg n => neg (S n) end. Lemma pred_succZ : forall x : Z, predZ (succZ x) = x. Proof. (* Goal: forall x : Z, @eq Z (predZ (succZ x)) x *) intro x; elim x; auto with arith. (* Goal: forall n : nat, @eq Z (predZ (succZ (neg n))) (neg n) *) intro n; elim n; auto with arith. Qed. Lemma succ_predZ : forall x : Z, succZ (predZ x) = x. Proof. (* Goal: forall x : Z, @eq Z (succZ (predZ x)) x *) intro x; elim x; auto with arith. (* Goal: forall n : nat, @eq Z (succZ (predZ (pos n))) (pos n) *) intro n; elim n; auto with arith. Qed. Lemma succ_pred_pred_succZ : forall x : Z, succZ (predZ x) = predZ (succZ x). Proof. (* Goal: forall x : Z, @eq Z (succZ (predZ x)) (predZ (succZ x)) *) intro x; try assumption. (* Goal: @eq Z (succZ (predZ x)) (predZ (succZ x)) *) rewrite (pred_succZ x); rewrite (succ_predZ x); trivial with arith. Qed. Lemma tech_pred_posZ : forall n : nat, 0 < n -> predZ (pos n) = pos (pred n). Proof. (* Goal: forall (n : nat) (_ : lt O n), @eq Z (predZ (pos n)) (pos (Init.Nat.pred n)) *) intro n; elim n; auto with arith. (* Goal: forall _ : lt O O, @eq Z (predZ (pos O)) (pos (Init.Nat.pred O)) *) intro H'; elim (lt_n_O 0); auto with arith. Qed. Lemma tech_succ_posOZ : forall n : nat, succZ (posOZ n) = pos n. Proof. (* Goal: forall n : nat, @eq Z (succZ (posOZ n)) (pos n) *) intro n; elim n; auto with arith. Qed.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrfun ssrbool eqtype ssrnat seq div choice fintype. From mathcomp Require Import bigop ssralg finset fingroup zmodp ssrint ssrnum. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Local Open Scope ring_scope. Import GRing.Theory Num.Theory. Local Notation mid x y := ((x + y) / 2%:R). Section LersifPo. Variable R : numDomainType. Definition lersif (x y : R) b := if b then x < y else x <= y. Local Notation "x <= y ?< 'if' b" := (lersif x y b) (at level 70, y at next level, format "x '[hv' <= y '/' ?< 'if' b ']'") : ring_scope. Lemma subr_lersifr0 b (x y : R) : (y - x <= 0 ?< if b) = (y <= x ?< if b). Proof. (* Goal: @eq bool (lersif (@GRing.add (Num.NumDomain.zmodType R) y (@GRing.opp (Num.NumDomain.zmodType R) x)) (GRing.zero (Num.NumDomain.zmodType R)) b) (lersif y x b) *) by case: b => /=; rewrite subr_lte0. Qed. Lemma subr_lersif0r b (x y : R) : (0 <= y - x ?< if b) = (x <= y ?< if b). Proof. (* Goal: @eq bool (lersif (GRing.zero (Num.NumDomain.zmodType R)) (@GRing.add (Num.NumDomain.zmodType R) y (@GRing.opp (Num.NumDomain.zmodType R) x)) b) (lersif x y b) *) by case: b => /=; rewrite subr_gte0. Qed. Definition subr_lersif0 := (subr_lersifr0, subr_lersif0r). Lemma lersif_trans x y z b1 b2 : x <= y ?< if b1 -> y <= z ?< if b2 -> x <= z ?< if b1 || b2. Proof. (* Goal: forall (_ : is_true (lersif x y b1)) (_ : is_true (lersif y z b2)), is_true (lersif x z (orb b1 b2)) *) by case: b1 b2 => [] []; apply (ltr_trans, ltr_le_trans, ler_lt_trans, ler_trans). Qed. Lemma lersif01 b : 0 <= 1 ?< if b. Proof. (* Goal: is_true (lersif (GRing.zero (Num.NumDomain.zmodType R)) (GRing.one (Num.NumDomain.ringType R)) b) *) by case: b; apply lter01. Qed. Lemma lersif_anti b1 b2 x y : (x <= y ?< if b1) && (y <= x ?< if b2) = if b1 || b2 then false else x == y. Proof. (* Goal: @eq bool (andb (lersif x y b1) (lersif y x b2)) (if orb b1 b2 then false else @eq_op (Num.NumDomain.eqType R) x y) *) by case: b1 b2 => [] []; rewrite lter_anti. Qed. Lemma lersifxx x b : (x <= x ?< if b) = ~~ b. Proof. (* Goal: @eq bool (lersif x x b) (negb b) *) by case: b; rewrite /= lterr. Qed. Lemma lersifNF x y b : y <= x ?< if ~~ b -> x <= y ?< if b = false. Proof. (* Goal: forall _ : is_true (lersif y x (negb b)), @eq bool (lersif x y b) false *) by case: b => /= [/ler_gtF|/ltr_geF]. Qed. Lemma lersifS x y b : x < y -> x <= y ?< if b. Proof. (* Goal: forall _ : is_true (@Num.Def.ltr R x y), is_true (lersif x y b) *) by case: b => //= /ltrW. Qed. Lemma lersifT x y : x <= y ?< if true = (x < y). Proof. by []. Qed. Proof. (* Goal: @eq bool (lersif x y true) (@Num.Def.ltr R x y) *) by []. Qed. Lemma lersif_oppl b x y : - x <= y ?< if b = (- y <= x ?< if b). Proof. (* Goal: @eq bool (lersif (@GRing.opp (Num.NumDomain.zmodType R) x) y b) (lersif (@GRing.opp (Num.NumDomain.zmodType R) y) x b) *) by case: b; apply lter_oppl. Qed. Lemma lersif_oppr b x y : x <= - y ?< if b = (y <= - x ?< if b). Proof. (* Goal: @eq bool (lersif x (@GRing.opp (Num.NumDomain.zmodType R) y) b) (lersif y (@GRing.opp (Num.NumDomain.zmodType R) x) b) *) by case: b; apply lter_oppr. Qed. Lemma lersif_0oppr b x : 0 <= - x ?< if b = (x <= 0 ?< if b). Proof. (* Goal: @eq bool (lersif (GRing.zero (Num.NumDomain.zmodType R)) (@GRing.opp (Num.NumDomain.zmodType R) x) b) (lersif x (GRing.zero (Num.NumDomain.zmodType R)) b) *) by case: b; apply (oppr_ge0, oppr_gt0). Qed. Lemma lersif_oppr0 b x : - x <= 0 ?< if b = (0 <= x ?< if b). Proof. (* Goal: @eq bool (lersif (@GRing.opp (Num.NumDomain.zmodType R) x) (GRing.zero (Num.NumDomain.zmodType R)) b) (lersif (GRing.zero (Num.NumDomain.zmodType R)) x b) *) by case: b; apply (oppr_le0, oppr_lt0). Qed. Lemma lersif_opp2 b : {mono -%R : x y /~ x <= y ?< if b}. Proof. (* Goal: @monomorphism_2 (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) bool (@GRing.opp (Num.NumDomain.zmodType R)) (fun y x : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => lersif x y b) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => lersif x y b) *) by case: b; apply lter_opp2. Qed. Definition lersif_oppE := (lersif_0oppr, lersif_oppr0, lersif_opp2). Lemma lersif_add2l b x : {mono +%R x : y z / y <= z ?< if b}. Proof. (* Goal: @monomorphism_2 (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) bool (@GRing.add (Num.NumDomain.zmodType R) x) (fun y z : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => lersif y z b) (fun y z : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => lersif y z b) *) by case: b => ? ?; apply lter_add2. Qed. Lemma lersif_add2r b x : {mono +%R^~ x : y z / y <= z ?< if b}. Proof. (* Goal: @monomorphism_2 (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) bool (fun x0 : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @GRing.add (Num.NumDomain.zmodType R) x0 x) (fun y z : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => lersif y z b) (fun y z : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => lersif y z b) *) by case: b => ? ?; apply lter_add2. Qed. Definition lersif_add2 := (lersif_add2l, lersif_add2r). Lemma lersif_subl_addr b x y z : (x - y <= z ?< if b) = (x <= z + y ?< if b). Proof. (* Goal: @eq bool (lersif (@GRing.add (Num.NumDomain.zmodType R) x (@GRing.opp (Num.NumDomain.zmodType R) y)) z b) (lersif x (@GRing.add (Num.NumDomain.zmodType R) z y) b) *) by case: b; apply lter_sub_addr. Qed. Lemma lersif_subr_addr b x y z : (x <= y - z ?< if b) = (x + z <= y ?< if b). Proof. (* Goal: @eq bool (lersif x (@GRing.add (Num.NumDomain.zmodType R) y (@GRing.opp (Num.NumDomain.zmodType R) z)) b) (lersif (@GRing.add (Num.NumDomain.zmodType R) x z) y b) *) by case: b; apply lter_sub_addr. Qed. Definition lersif_sub_addr := (lersif_subl_addr, lersif_subr_addr). Lemma lersif_subl_addl b x y z : (x - y <= z ?< if b) = (x <= y + z ?< if b). Proof. (* Goal: @eq bool (lersif (@GRing.add (Num.NumDomain.zmodType R) x (@GRing.opp (Num.NumDomain.zmodType R) y)) z b) (lersif x (@GRing.add (Num.NumDomain.zmodType R) y z) b) *) by case: b; apply lter_sub_addl. Qed. Lemma lersif_subr_addl b x y z : (x <= y - z ?< if b) = (z + x <= y ?< if b). Proof. (* Goal: @eq bool (lersif x (@GRing.add (Num.NumDomain.zmodType R) y (@GRing.opp (Num.NumDomain.zmodType R) z)) b) (lersif (@GRing.add (Num.NumDomain.zmodType R) z x) y b) *) by case: b; apply lter_sub_addl. Qed. Definition lersif_sub_addl := (lersif_subl_addl, lersif_subr_addl). Lemma lersif_andb x y : {morph lersif x y : p q / p || q >-> p && q}. Proof. (* Goal: @morphism_2 bool bool (lersif x y) (fun p q : bool => orb p q) (fun p q : bool => andb p q) *) by case=> [] [] /=; rewrite ?ler_eqVlt; case: (_ < _)%R; rewrite ?(orbT, orbF, andbF, andbb). Qed. Lemma lersif_orb x y : {morph lersif x y : p q / p && q >-> p || q}. Proof. (* Goal: @morphism_2 bool bool (lersif x y) (fun p q : bool => andb p q) (fun p q : bool => orb p q) *) by case=> [] [] /=; rewrite ?ler_eqVlt; case: (_ < _)%R; rewrite ?(orbT, orbF, orbb). Qed. Lemma lersif_imply b1 b2 r1 r2 : b2 ==> b1 -> r1 <= r2 ?< if b1 -> r1 <= r2 ?< if b2. Proof. (* Goal: forall (_ : is_true (implb b2 b1)) (_ : is_true (lersif r1 r2 b1)), is_true (lersif r1 r2 b2) *) by case: b1 b2 => [] [] //= _ /ltrW. Qed. Lemma lersifW b x y : x <= y ?< if b -> x <= y. Proof. (* Goal: forall _ : is_true (lersif x y b), is_true (@Num.Def.ler R x y) *) by case: b => // /ltrW. Qed. Lemma ltrW_lersif b x y : x < y -> x <= y ?< if b. Proof. (* Goal: forall _ : is_true (@Num.Def.ltr R x y), is_true (lersif x y b) *) by case: b => // /ltrW. Qed. Lemma lersif_pmul2l b x : 0 < x -> {mono *%R x : y z / y <= z ?< if b}. Proof. (* Goal: forall _ : is_true (@Num.Def.ltr R (GRing.zero (Num.NumDomain.zmodType R)) x), @monomorphism_2 (GRing.Ring.sort (Num.NumDomain.ringType R)) (GRing.Ring.sort (Num.NumDomain.ringType R)) bool (@GRing.mul (Num.NumDomain.ringType R) x) (fun y z : GRing.Ring.sort (Num.NumDomain.ringType R) => lersif y z b) (fun y z : GRing.Ring.sort (Num.NumDomain.ringType R) => lersif y z b) *) by case: b; apply lter_pmul2l. Qed. Lemma lersif_pmul2r b x : 0 < x -> {mono *%R^~ x : y z / y <= z ?< if b}. Proof. (* Goal: forall _ : is_true (@Num.Def.ltr R (GRing.zero (Num.NumDomain.zmodType R)) x), @monomorphism_2 (GRing.Ring.sort (Num.NumDomain.ringType R)) (GRing.Ring.sort (Num.NumDomain.ringType R)) bool (fun x0 : GRing.Ring.sort (Num.NumDomain.ringType R) => @GRing.mul (Num.NumDomain.ringType R) x0 x) (fun y z : GRing.Ring.sort (Num.NumDomain.ringType R) => lersif y z b) (fun y z : GRing.Ring.sort (Num.NumDomain.ringType R) => lersif y z b) *) by case: b; apply lter_pmul2r. Qed. Lemma lersif_nmul2l b x : x < 0 -> {mono *%R x : y z /~ y <= z ?< if b}. Proof. (* Goal: forall _ : is_true (@Num.Def.ltr R x (GRing.zero (Num.NumDomain.zmodType R))), @monomorphism_2 (GRing.Ring.sort (Num.NumDomain.ringType R)) (GRing.Ring.sort (Num.NumDomain.ringType R)) bool (@GRing.mul (Num.NumDomain.ringType R) x) (fun z y : GRing.Ring.sort (Num.NumDomain.ringType R) => lersif y z b) (fun y z : GRing.Ring.sort (Num.NumDomain.ringType R) => lersif y z b) *) by case: b; apply lter_nmul2l. Qed. Lemma lersif_nmul2r b x : x < 0 -> {mono *%R^~ x : y z /~ y <= z ?< if b}. Proof. (* Goal: forall _ : is_true (@Num.Def.ltr R x (GRing.zero (Num.NumDomain.zmodType R))), @monomorphism_2 (GRing.Ring.sort (Num.NumDomain.ringType R)) (GRing.Ring.sort (Num.NumDomain.ringType R)) bool (fun x0 : GRing.Ring.sort (Num.NumDomain.ringType R) => @GRing.mul (Num.NumDomain.ringType R) x0 x) (fun z y : GRing.Ring.sort (Num.NumDomain.ringType R) => lersif y z b) (fun y z : GRing.Ring.sort (Num.NumDomain.ringType R) => lersif y z b) *) by case: b; apply lter_nmul2r. Qed. Lemma real_lersifN x y b : x \is Num.real -> y \is Num.real -> Proof. (* Goal: forall (_ : is_true (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) (predPredType (Num.NumDomain.sort R)) (@has_quality O (Num.NumDomain.sort R) (@Num.Def.Rreal R))))) (_ : is_true (@in_mem (Num.NumDomain.sort R) y (@mem (Num.NumDomain.sort R) (predPredType (Num.NumDomain.sort R)) (@has_quality O (Num.NumDomain.sort R) (@Num.Def.Rreal R))))), @eq bool (lersif x y (negb b)) (negb (lersif y x b)) *) by case: b => [] xR yR /=; case: real_ltrgtP. Qed. Lemma real_lersif_norml b x y : x \is Num.real -> Proof. (* Goal: forall _ : is_true (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) (predPredType (Num.NumDomain.sort R)) (@has_quality O (Num.NumDomain.sort R) (@Num.Def.Rreal R)))), @eq bool (lersif (@Num.Def.normr R x) y b) (andb (lersif (@GRing.opp (Num.NumDomain.zmodType R) y) x b) (lersif x y b)) *) by case: b; apply real_lter_norml. Qed. Lemma real_lersif_normr b x y : y \is Num.real -> Proof. (* Goal: forall _ : is_true (@in_mem (Num.NumDomain.sort R) y (@mem (Num.NumDomain.sort R) (predPredType (Num.NumDomain.sort R)) (@has_quality O (Num.NumDomain.sort R) (@Num.Def.Rreal R)))), @eq bool (lersif x (@Num.Def.normr R y) b) (orb (lersif x y b) (lersif x (@GRing.opp (Num.NumDomain.zmodType R) y) b)) *) by case: b; apply real_lter_normr. Qed. Lemma lersif_nnormr b x y : y <= 0 ?< if ~~ b -> (`|x| <= y ?< if b) = false. Proof. (* Goal: forall _ : is_true (lersif y (GRing.zero (Num.NumDomain.zmodType R)) (negb b)), @eq bool (lersif (@Num.Def.normr R x) y b) false *) by case: b => /=; apply lter_nnormr. Qed. End LersifPo. Notation "x <= y ?< 'if' b" := (lersif x y b) (at level 70, y at next level, format "x '[hv' <= y '/' ?< 'if' b ']'") : ring_scope. Section LersifOrdered. Variable (R : realDomainType) (b : bool) (x y z e : R). Lemma lersifN : (x <= y ?< if ~~ b) = ~~ (y <= x ?< if b). Proof. (* Goal: @eq bool (@lersif (Num.RealDomain.numDomainType R) x y (negb b)) (negb (@lersif (Num.RealDomain.numDomainType R) y x b)) *) by rewrite real_lersifN ?num_real. Qed. Lemma lersif_norml : (`|x| <= y ?< if b) = (- y <= x ?< if b) && (x <= y ?< if b). Proof. (* Goal: @eq bool (@lersif (Num.RealDomain.numDomainType R) (@Num.Def.normr (Num.RealDomain.numDomainType R) x) y b) (andb (@lersif (Num.RealDomain.numDomainType R) (@GRing.opp (Num.RealDomain.zmodType R) y) x b) (@lersif (Num.RealDomain.numDomainType R) x y b)) *) by case: b; apply lter_norml. Qed. Lemma lersif_normr : (x <= `|y| ?< if b) = (x <= y ?< if b) || (x <= - y ?< if b). Proof. (* Goal: @eq bool (@lersif (Num.RealDomain.numDomainType R) x (@Num.Def.normr (Num.RealDomain.numDomainType R) y) b) (orb (@lersif (Num.RealDomain.numDomainType R) x y b) (@lersif (Num.RealDomain.numDomainType R) x (@GRing.opp (Num.RealDomain.zmodType R) y) b)) *) by case: b; apply lter_normr. Qed. Lemma lersif_distl : (`|x - y| <= e ?< if b) = (y - e <= x ?< if b) && (x <= y + e ?< if b). Proof. (* Goal: @eq bool (@lersif (Num.RealDomain.numDomainType R) (@Num.Def.normr (Num.RealDomain.numDomainType R) (@GRing.add (Num.RealDomain.zmodType R) x (@GRing.opp (Num.RealDomain.zmodType R) y))) e b) (andb (@lersif (Num.RealDomain.numDomainType R) (@GRing.add (Num.RealDomain.zmodType R) y (@GRing.opp (Num.RealDomain.zmodType R) e)) x b) (@lersif (Num.RealDomain.numDomainType R) x (@GRing.add (Num.RealDomain.zmodType R) y e) b)) *) by case: b; apply lter_distl. Qed. Lemma lersif_minr : (x <= Num.min y z ?< if b) = (x <= y ?< if b) && (x <= z ?< if b). Proof. (* Goal: @eq bool (@lersif (Num.RealDomain.numDomainType R) x (@Num.Def.minr (Num.RealDomain.numDomainType R) y z) b) (andb (@lersif (Num.RealDomain.numDomainType R) x y b) (@lersif (Num.RealDomain.numDomainType R) x z b)) *) by case: b; apply lter_minr. Qed. Lemma lersif_minl : (Num.min y z <= x ?< if b) = (y <= x ?< if b) || (z <= x ?< if b). Proof. (* Goal: @eq bool (@lersif (Num.RealDomain.numDomainType R) (@Num.Def.minr (Num.RealDomain.numDomainType R) y z) x b) (orb (@lersif (Num.RealDomain.numDomainType R) y x b) (@lersif (Num.RealDomain.numDomainType R) z x b)) *) by case: b; apply lter_minl. Qed. Lemma lersif_maxr : (x <= Num.max y z ?< if b) = (x <= y ?< if b) || (x <= z ?< if b). Proof. (* Goal: @eq bool (@lersif (Num.RealDomain.numDomainType R) x (@Num.Def.maxr (Num.RealDomain.numDomainType R) y z) b) (orb (@lersif (Num.RealDomain.numDomainType R) x y b) (@lersif (Num.RealDomain.numDomainType R) x z b)) *) by case: b; apply lter_maxr. Qed. Lemma lersif_maxl : (Num.max y z <= x ?< if b) = (y <= x ?< if b) && (z <= x ?< if b). Proof. (* Goal: @eq bool (@lersif (Num.RealDomain.numDomainType R) (@Num.Def.maxr (Num.RealDomain.numDomainType R) y z) x b) (andb (@lersif (Num.RealDomain.numDomainType R) y x b) (@lersif (Num.RealDomain.numDomainType R) z x b)) *) by case: b; apply lter_maxl. Qed. End LersifOrdered. Section LersifField. Variable (F : numFieldType) (b : bool) (z x y : F). Lemma lersif_pdivl_mulr : 0 < z -> x <= y / z ?< if b = (x * z <= y ?< if b). Proof. (* Goal: forall _ : is_true (@Num.Def.ltr (Num.NumField.numDomainType F) (GRing.zero (Num.NumDomain.zmodType (Num.NumField.numDomainType F))) z), @eq bool (@lersif (Num.NumField.numDomainType F) x (@GRing.mul (Num.NumField.ringType F) y (@GRing.inv (Num.NumField.unitRingType F) z)) b) (@lersif (Num.NumField.numDomainType F) (@GRing.mul (Num.NumField.ringType F) x z) y b) *) by case: b => ? /=; rewrite lter_pdivl_mulr. Qed. Lemma lersif_pdivr_mulr : 0 < z -> y / z <= x ?< if b = (y <= x * z ?< if b). Proof. (* Goal: forall _ : is_true (@Num.Def.ltr (Num.NumField.numDomainType F) (GRing.zero (Num.NumDomain.zmodType (Num.NumField.numDomainType F))) z), @eq bool (@lersif (Num.NumField.numDomainType F) (@GRing.mul (Num.NumField.ringType F) y (@GRing.inv (Num.NumField.unitRingType F) z)) x b) (@lersif (Num.NumField.numDomainType F) y (@GRing.mul (Num.NumField.ringType F) x z) b) *) by case: b => ? /=; rewrite lter_pdivr_mulr. Qed. Lemma lersif_pdivl_mull : 0 < z -> x <= z^-1 * y ?< if b = (z * x <= y ?< if b). Proof. (* Goal: forall _ : is_true (@Num.Def.ltr (Num.NumField.numDomainType F) (GRing.zero (Num.NumDomain.zmodType (Num.NumField.numDomainType F))) z), @eq bool (@lersif (Num.NumField.numDomainType F) x (@GRing.mul (GRing.UnitRing.ringType (Num.NumField.unitRingType F)) (@GRing.inv (Num.NumField.unitRingType F) z) y) b) (@lersif (Num.NumField.numDomainType F) (@GRing.mul (Num.NumField.ringType F) z x) y b) *) by case: b => ? /=; rewrite lter_pdivl_mull. Qed. Lemma lersif_pdivr_mull : 0 < z -> z^-1 * y <= x ?< if b = (y <= z * x ?< if b). Proof. (* Goal: forall _ : is_true (@Num.Def.ltr (Num.NumField.numDomainType F) (GRing.zero (Num.NumDomain.zmodType (Num.NumField.numDomainType F))) z), @eq bool (@lersif (Num.NumField.numDomainType F) (@GRing.mul (GRing.UnitRing.ringType (Num.NumField.unitRingType F)) (@GRing.inv (Num.NumField.unitRingType F) z) y) x b) (@lersif (Num.NumField.numDomainType F) y (@GRing.mul (Num.NumField.ringType F) z x) b) *) by case: b => ? /=; rewrite lter_pdivr_mull. Qed. Lemma lersif_ndivl_mulr : z < 0 -> x <= y / z ?< if b = (y <= x * z ?< if b). Proof. (* Goal: forall _ : is_true (@Num.Def.ltr (Num.NumField.numDomainType F) z (GRing.zero (Num.NumDomain.zmodType (Num.NumField.numDomainType F)))), @eq bool (@lersif (Num.NumField.numDomainType F) x (@GRing.mul (Num.NumField.ringType F) y (@GRing.inv (Num.NumField.unitRingType F) z)) b) (@lersif (Num.NumField.numDomainType F) y (@GRing.mul (Num.NumField.ringType F) x z) b) *) by case: b => ? /=; rewrite lter_ndivl_mulr. Qed. Lemma lersif_ndivr_mulr : z < 0 -> y / z <= x ?< if b = (x * z <= y ?< if b). Proof. (* Goal: forall _ : is_true (@Num.Def.ltr (Num.NumField.numDomainType F) z (GRing.zero (Num.NumDomain.zmodType (Num.NumField.numDomainType F)))), @eq bool (@lersif (Num.NumField.numDomainType F) (@GRing.mul (Num.NumField.ringType F) y (@GRing.inv (Num.NumField.unitRingType F) z)) x b) (@lersif (Num.NumField.numDomainType F) (@GRing.mul (Num.NumField.ringType F) x z) y b) *) by case: b => ? /=; rewrite lter_ndivr_mulr. Qed. Lemma lersif_ndivl_mull : z < 0 -> x <= z^-1 * y ?< if b = (y <=z * x ?< if b). Proof. (* Goal: forall _ : is_true (@Num.Def.ltr (Num.NumField.numDomainType F) z (GRing.zero (Num.NumDomain.zmodType (Num.NumField.numDomainType F)))), @eq bool (@lersif (Num.NumField.numDomainType F) x (@GRing.mul (GRing.UnitRing.ringType (Num.NumField.unitRingType F)) (@GRing.inv (Num.NumField.unitRingType F) z) y) b) (@lersif (Num.NumField.numDomainType F) y (@GRing.mul (Num.NumField.ringType F) z x) b) *) by case: b => ? /=; rewrite lter_ndivl_mull. Qed. Lemma lersif_ndivr_mull : z < 0 -> z^-1 * y <= x ?< if b = (z * x <= y ?< if b). Proof. (* Goal: forall _ : is_true (@Num.Def.ltr (Num.NumField.numDomainType F) z (GRing.zero (Num.NumDomain.zmodType (Num.NumField.numDomainType F)))), @eq bool (@lersif (Num.NumField.numDomainType F) (@GRing.mul (GRing.UnitRing.ringType (Num.NumField.unitRingType F)) (@GRing.inv (Num.NumField.unitRingType F) z) y) x b) (@lersif (Num.NumField.numDomainType F) (@GRing.mul (Num.NumField.ringType F) z x) y b) *) by case: b => ? /=; rewrite lter_ndivr_mull. Qed. End LersifField. Variant itv_bound (T : Type) : Type := BOpen_if of bool & T | BInfty. Notation BOpen := (BOpen_if true). Notation BClose := (BOpen_if false). Variant interval (T : Type) := Interval of itv_bound T & itv_bound T. Notation "`[ a , b ]" := (Interval (BClose a) (BClose b)) (at level 0, a, b at level 9 , format "`[ a , b ]") : ring_scope. Notation "`] a , b ]" := (Interval (BOpen a) (BClose b)) (at level 0, a, b at level 9 , format "`] a , b ]") : ring_scope. Notation "`[ a , b [" := (Interval (BClose a) (BOpen b)) (at level 0, a, b at level 9 , format "`[ a , b [") : ring_scope. Notation "`] a , b [" := (Interval (BOpen a) (BOpen b)) (at level 0, a, b at level 9 , format "`] a , b [") : ring_scope. Notation "`] '-oo' , b ]" := (Interval (BInfty _) (BClose b)) (at level 0, b at level 9 , format "`] '-oo' , b ]") : ring_scope. Notation "`] '-oo' , b [" := (Interval (BInfty _) (BOpen b)) (at level 0, b at level 9 , format "`] '-oo' , b [") : ring_scope. Notation "`[ a , '+oo' [" := (Interval (BClose a) (BInfty _)) (at level 0, a at level 9 , format "`[ a , '+oo' [") : ring_scope. Notation "`] a , '+oo' [" := (Interval (BOpen a) (BInfty _)) (at level 0, a at level 9 , format "`] a , '+oo' [") : ring_scope. Notation "`] -oo , '+oo' [" := (Interval (BInfty _) (BInfty _)) (at level 0, format "`] -oo , '+oo' [") : ring_scope. Section IntervalEq. Variable T : eqType. Definition eq_itv_bound (b1 b2 : itv_bound T) : bool := match b1, b2 with | BOpen_if a x, BOpen_if b y => (a == b) && (x == y) | BInfty, BInfty => true | _, _ => false end. Lemma eq_itv_boundP : Equality.axiom eq_itv_bound. Canonical itv_bound_eqMixin := EqMixin eq_itv_boundP. Canonical itv_bound_eqType := Eval hnf in EqType (itv_bound T) itv_bound_eqMixin. Definition eqitv (x y : interval T) : bool := let: Interval x x' := x in let: Interval y y' := y in (x == y) && (x' == y'). Lemma eqitvP : Equality.axiom eqitv. Canonical interval_eqMixin := EqMixin eqitvP. Canonical interval_eqType := Eval hnf in EqType (interval T) interval_eqMixin. End IntervalEq. Section IntervalPo. Variable R : numDomainType. Definition pred_of_itv (i : interval R) : pred R := [pred x | let: Interval l u := i in match l with | BOpen_if b lb => lb <= x ?< if b | BInfty => true end && match u with | BOpen_if b ub => x <= ub ?< if b | BInfty => true end]. Canonical Structure itvPredType := Eval hnf in mkPredType pred_of_itv. Definition itv_rewrite (i : interval R) x : Type := let: Interval l u := i in (match l with | BClose a => (a <= x) * (x < a = false) | BOpen a => (a <= x) * (a < x) * (x <= a = false) * (x < a = false) | BInfty => forall x : R, x == x end * match u with | BClose b => (x <= b) * (b < x = false) | BOpen b => (x <= b) * (x < b) * (b <= x = false) * (b < x = false) | BInfty => forall x : R, x == x end * match l, u with | BClose a, BClose b => (a <= b) * (b < a = false) * (a \in `[a, b]) * (b \in `[a, b]) | BClose a, BOpen b => (a <= b) * (a < b) * (b <= a = false) * (b < a = false) * (a \in `[a, b]) * (a \in `[a, b[)* (b \in `[a, b]) * (b \in `]a, b]) | BOpen a, BClose b => (a <= b) * (a < b) * (b <= a = false) * (b < a = false) * (a \in `[a, b]) * (a \in `[a, b[)* (b \in `[a, b]) * (b \in `]a, b]) | BOpen a, BOpen b => (a <= b) * (a < b) * (b <= a = false) * (b < a = false) * (a \in `[a, b]) * (a \in `[a, b[)* (b \in `[a, b]) * (b \in `]a, b]) | _, _ => forall x : R, x == x end)%type. Definition itv_decompose (i : interval R) x : Prop := let: Interval l u := i in ((match l with | BOpen_if b lb => (lb <= x ?< if b) : Prop | BInfty => True end : Prop) * (match u with | BOpen_if b ub => (x <= ub ?< if b) : Prop | BInfty => True end : Prop))%type. Lemma itv_dec : forall (x : R) (i : interval R), reflect (itv_decompose i x) (x \in i). Proof. (* Goal: forall (x : Num.NumDomain.sort R) (i : interval (Num.NumDomain.sort R)), Bool.reflect (itv_decompose i x) (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType i)) *) by move=> ? [[? ?|] [? ?|]]; apply: (iffP andP); case. Qed. Arguments itv_dec {x i}. Definition le_boundl (b1 b2 : itv_bound R) := match b1, b2 with | BOpen_if b1 x1, BOpen_if b2 x2 => x1 <= x2 ?< if ~~ b2 && b1 | BOpen_if _ _, BInfty => false | _, _ => true end. Definition le_boundr (b1 b2 : itv_bound R) := match b1, b2 with | BOpen_if b1 x1, BOpen_if b2 x2 => x1 <= x2 ?< if ~~ b1 && b2 | BInfty, BOpen_if _ _ => false | _, _ => true end. Lemma itv_boundlr bl br x : (x \in Interval bl br) = (le_boundl bl (BClose x)) && (le_boundr (BClose x) br). Proof. (* Goal: @eq bool (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) bl br))) (andb (le_boundl bl (@BOpen_if (Num.NumDomain.sort R) false x)) (le_boundr (@BOpen_if (Num.NumDomain.sort R) false x) br)) *) by case: bl br => [? ? |] []. Qed. Lemma le_boundl_refl : reflexive le_boundl. Proof. (* Goal: @reflexive (itv_bound (Num.NumDomain.sort R)) le_boundl *) by move=> [[] b|]; rewrite /le_boundl /= ?lerr. Qed. Hint Resolve le_boundl_refl : core. Lemma le_boundr_refl : reflexive le_boundr. Proof. (* Goal: @reflexive (itv_bound (Num.NumDomain.sort R)) le_boundr *) by move=> [[] b|]; rewrite /le_boundr /= ?lerr. Qed. Hint Resolve le_boundr_refl : core. Lemma le_boundl_trans : transitive le_boundl. Proof. (* Goal: @transitive (itv_bound (Num.NumDomain.sort R)) le_boundl *) by move=> [[] x|] [[] y|] [[] z|] lexy leyz //; apply: (lersif_imply _ (lersif_trans lexy leyz)). Qed. Lemma le_boundr_trans : transitive le_boundr. Proof. (* Goal: @transitive (itv_bound (Num.NumDomain.sort R)) le_boundr *) by move=> [[] x|] [[] y|] [[] z|] lexy leyz //; apply: (lersif_imply _ (lersif_trans lexy leyz)). Qed. Lemma le_boundl_bb x b1 b2 : le_boundl (BOpen_if b1 x) (BOpen_if b2 x) = (b1 ==> b2). Proof. (* Goal: @eq bool (le_boundl (@BOpen_if (Num.NumDomain.sort R) b1 x) (@BOpen_if (Num.NumDomain.sort R) b2 x)) (implb b1 b2) *) by rewrite /le_boundl lersifxx andbC negb_and negbK implybE. Qed. Lemma le_boundr_bb x b1 b2 : le_boundr (BOpen_if b1 x) (BOpen_if b2 x) = (b2 ==> b1). Proof. (* Goal: @eq bool (le_boundr (@BOpen_if (Num.NumDomain.sort R) b1 x) (@BOpen_if (Num.NumDomain.sort R) b2 x)) (implb b2 b1) *) by rewrite /le_boundr lersifxx andbC negb_and negbK implybE. Qed. Lemma le_boundl_anti b1 b2 : (le_boundl b1 b2 && le_boundl b2 b1) = (b1 == b2). Proof. (* Goal: @eq bool (andb (le_boundl b1 b2) (le_boundl b2 b1)) (@eq_op (itv_bound_eqType (Num.NumDomain.eqType R)) b1 b2) *) by case: b1 b2 => [[] lr1 |] [[] lr2 |] //; rewrite lersif_anti. Qed. Lemma le_boundr_anti b1 b2 : (le_boundr b1 b2 && le_boundr b2 b1) = (b1 == b2). Proof. (* Goal: @eq bool (andb (le_boundr b1 b2) (le_boundr b2 b1)) (@eq_op (itv_bound_eqType (Num.NumDomain.eqType R)) b1 b2) *) by case: b1 b2 => [[] lr1 |] [[] lr2 |] //; rewrite lersif_anti. Qed. Lemma itv_xx x bl br : Interval (BOpen_if bl x) (BOpen_if br x) =i if ~~ (bl || br) then pred1 x else pred0. Proof. (* Goal: @eq_mem (Num.NumDomain.sort R) (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) (@BOpen_if (Num.NumDomain.sort R) bl x) (@BOpen_if (Num.NumDomain.sort R) br x))) (@mem (Equality.sort (Num.NumDomain.eqType R)) (simplPredType (Equality.sort (Num.NumDomain.eqType R))) (if negb (orb bl br) then @pred1 (Num.NumDomain.eqType R) x else @pred0 (Equality.sort (Num.NumDomain.eqType R)))) *) by move: bl br => [] [] y /=; rewrite !inE lersif_anti. Qed. Lemma itv_gte ba xa bb xb : xb <= xa ?< if ~~ (ba || bb) -> Interval (BOpen_if ba xa) (BOpen_if bb xb) =i pred0. Proof. (* Goal: forall _ : is_true (@lersif R xb xa (negb (orb ba bb))), @eq_mem (Num.NumDomain.sort R) (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) (@BOpen_if (Num.NumDomain.sort R) ba xa) (@BOpen_if (Num.NumDomain.sort R) bb xb))) (@mem (Num.NumDomain.sort R) (simplPredType (Num.NumDomain.sort R)) (@pred0 (Num.NumDomain.sort R))) *) move=> ? y; rewrite itv_boundlr inE /=. (* Goal: @eq bool (andb (@lersif R xa y ba) (@lersif R y xb bb)) false *) by apply/negP => /andP [] lexay /(lersif_trans lexay); rewrite lersifNF. Qed. Lemma boundl_in_itv : forall ba xa b, xa \in Interval (BOpen_if ba xa) b = if ba then false else le_boundr (BClose xa) b. Proof. (* Goal: forall (ba : bool) (xa : Num.NumDomain.sort R) (b : itv_bound (Num.NumDomain.sort R)), @eq bool (@in_mem (Num.NumDomain.sort R) xa (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) (@BOpen_if (Num.NumDomain.sort R) ba xa) b))) (if ba then false else le_boundr (@BOpen_if (Num.NumDomain.sort R) false xa) b) *) by move=> [] xa [b xb|]; rewrite inE lersifxx. Qed. Lemma boundr_in_itv : forall bb xb a, xb \in Interval a (BOpen_if bb xb) = if bb then false else le_boundl a (BClose xb). Proof. (* Goal: forall (bb : bool) (xb : Num.NumDomain.sort R) (a : itv_bound (Num.NumDomain.sort R)), @eq bool (@in_mem (Num.NumDomain.sort R) xb (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) a (@BOpen_if (Num.NumDomain.sort R) bb xb)))) (if bb then false else le_boundl a (@BOpen_if (Num.NumDomain.sort R) false xb)) *) by move=> [] xb [b xa|]; rewrite inE lersifxx /= ?andbT ?andbF. Qed. Definition bound_in_itv := (boundl_in_itv, boundr_in_itv). Lemma itvP : forall (x : R) (i : interval R), x \in i -> itv_rewrite i x. Proof. (* Goal: forall (x : Num.NumDomain.sort R) (i : interval (Num.NumDomain.sort R)) (_ : is_true (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType i))), itv_rewrite i x *) move=> x [[[] a|] [[] b|]] /itv_dec // [? ?]; do ?split => //; rewrite ?bound_in_itv /le_boundl /le_boundr //=; do 1?[apply/negbTE; rewrite (ler_gtF, ltr_geF) //]; by [ rewrite ltrW | rewrite (@ler_trans _ x) // 1?ltrW | rewrite (@ltr_le_trans _ x) | rewrite (@ler_lt_trans _ x) // 1?ltrW ]. Qed. Hint Rewrite intP : core. Arguments itvP [x i]. Definition itv_intersection (x y : interval R) : interval R := let: Interval x x' := x in let: Interval y y' := y in Interval (if le_boundl x y then y else x) (if le_boundr x' y' then x' else y'). Definition itv_intersection1i : left_id `]-oo, +oo[ itv_intersection. Proof. (* Goal: @left_id (interval (Num.NumDomain.sort R)) (interval (Num.NumDomain.sort R)) (@Interval (Num.NumDomain.sort R) (BInfty (Num.NumDomain.sort R)) (BInfty (Num.NumDomain.sort R))) itv_intersection *) by case=> i []. Qed. Definition itv_intersectioni1 : right_id `]-oo, +oo[ itv_intersection. Proof. (* Goal: @right_id (interval (Num.NumDomain.sort R)) (interval (Num.NumDomain.sort R)) (@Interval (Num.NumDomain.sort R) (BInfty (Num.NumDomain.sort R)) (BInfty (Num.NumDomain.sort R))) itv_intersection *) by case=> [[lb lr |] [ub ur |]]. Qed. Lemma itv_intersectionii : idempotent itv_intersection. Proof. (* Goal: @idempotent (interval (Num.NumDomain.sort R)) itv_intersection *) by case=> [[[] lr |] [[] ur |]] //=; rewrite !lerr. Qed. Definition subitv (i1 i2 : interval R) := match i1, i2 with | Interval a1 b1, Interval a2 b2 => le_boundl a2 a1 && le_boundr b1 b2 end. Lemma subitvP : forall (i2 i1 : interval R), subitv i1 i2 -> {subset i1 <= i2}. Proof. (* Goal: forall (i2 i1 : interval (Num.NumDomain.sort R)) (_ : is_true (subitv i1 i2)), @sub_mem (Num.NumDomain.sort R) (@mem (Num.NumDomain.sort R) itvPredType i1) (@mem (Num.NumDomain.sort R) itvPredType i2) *) by move=> [[b2 l2|] [b2' u2|]] [[b1 l1|] [b1' u1|]] /andP [] /= ha hb x /andP [ha' hb']; apply/andP; split => //; (apply/lersif_imply: (lersif_trans ha ha'); case: b1 b2 ha ha' => [] []) || (apply/lersif_imply: (lersif_trans hb' hb); case: b1' b2' hb hb' => [] []). Qed. Lemma subitvPr (a b1 b2 : itv_bound R) : le_boundr b1 b2 -> {subset (Interval a b1) <= (Interval a b2)}. Proof. (* Goal: forall _ : is_true (le_boundr b1 b2), @sub_mem (Num.NumDomain.sort R) (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) a b1)) (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) a b2)) *) by move=> leb; apply: subitvP; rewrite /= leb andbT. Qed. Lemma subitvPl (a1 a2 b : itv_bound R) : le_boundl a2 a1 -> {subset (Interval a1 b) <= (Interval a2 b)}. Proof. (* Goal: forall _ : is_true (le_boundl a2 a1), @sub_mem (Num.NumDomain.sort R) (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) a1 b)) (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) a2 b)) *) by move=> lea; apply: subitvP; rewrite /= lea /=. Qed. Lemma lersif_in_itv ba bb xa xb x : x \in Interval (BOpen_if ba xa) (BOpen_if bb xb) -> xa <= xb ?< if ba || bb. Proof. (* Goal: forall _ : is_true (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) (@BOpen_if (Num.NumDomain.sort R) ba xa) (@BOpen_if (Num.NumDomain.sort R) bb xb)))), is_true (@lersif R xa xb (orb ba bb)) *) by case: ba bb => [] [] /itvP /= ->. Qed. Lemma ltr_in_itv ba bb xa xb x : ba || bb -> x \in Interval (BOpen_if ba xa) (BOpen_if bb xb) -> xa < xb. Proof. (* Goal: forall (_ : is_true (orb ba bb)) (_ : is_true (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) (@BOpen_if (Num.NumDomain.sort R) ba xa) (@BOpen_if (Num.NumDomain.sort R) bb xb))))), is_true (@Num.Def.ltr R xa xb) *) by move=> bab /lersif_in_itv; rewrite bab. Qed. Lemma ler_in_itv ba bb xa xb x : x \in Interval (BOpen_if ba xa) (BOpen_if bb xb) -> xa <= xb. Proof. (* Goal: forall _ : is_true (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) (@BOpen_if (Num.NumDomain.sort R) ba xa) (@BOpen_if (Num.NumDomain.sort R) bb xb)))), is_true (@Num.Def.ler R xa xb) *) by move/lersif_in_itv/lersifW. Qed. Lemma mem0_itvcc_xNx x : (0 \in `[-x, x]) = (0 <= x). Proof. (* Goal: @eq bool (@in_mem (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (GRing.zero (Num.NumDomain.zmodType R)) (@mem (Num.NumDomain.sort R) itvPredType (@Interval (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) false (@GRing.opp (Num.NumDomain.zmodType R) x)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) false x)))) (@Num.Def.ler R (GRing.zero (Num.NumDomain.zmodType R)) x) *) by rewrite !inE /= oppr_le0 andbb. Qed. Lemma mem0_itvoo_xNx x : 0 \in `](-x), x[ = (0 < x). Proof. (* Goal: @eq bool (@in_mem (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (GRing.zero (Num.NumDomain.zmodType R)) (@mem (Num.NumDomain.sort R) itvPredType (@Interval (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) true (@GRing.opp (Num.NumDomain.zmodType R) x)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) true x)))) (@Num.Def.ltr R (GRing.zero (Num.NumDomain.zmodType R)) x) *) by rewrite !inE /= oppr_lt0 andbb. Qed. Lemma itv_splitI : forall a b x, x \in Interval a b = (x \in Interval a (BInfty _)) && (x \in Interval (BInfty _) b). Proof. (* Goal: forall (a b : itv_bound (Num.NumDomain.sort R)) (x : Num.NumDomain.sort R), @eq bool (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) a b))) (andb (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) a (BInfty (Num.NumDomain.sort R))))) (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) (BInfty (Num.NumDomain.sort R)) b)))) *) by move=> [? ?|] [? ?|] ?; rewrite !inE ?andbT. Qed. Lemma oppr_itv ba bb (xa xb x : R) : (-x \in Interval (BOpen_if ba xa) (BOpen_if bb xb)) = (x \in Interval (BOpen_if bb (-xb)) (BOpen_if ba (-xa))). Proof. (* Goal: @eq bool (@in_mem (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@GRing.opp (Num.NumDomain.zmodType R) x) (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) (@BOpen_if (Num.NumDomain.sort R) ba xa) (@BOpen_if (Num.NumDomain.sort R) bb xb)))) (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType (@Interval (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) bb (@GRing.opp (Num.NumDomain.zmodType R) xb)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) ba (@GRing.opp (Num.NumDomain.zmodType R) xa))))) *) by rewrite !inE lersif_oppr andbC lersif_oppl. Qed. Lemma oppr_itvoo (a b x : R) : (-x \in `]a, b[) = (x \in `](-b), (-a)[). Proof. (* Goal: @eq bool (@in_mem (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@GRing.opp (Num.NumDomain.zmodType R) x) (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) (@BOpen_if (Num.NumDomain.sort R) true a) (@BOpen_if (Num.NumDomain.sort R) true b)))) (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType (@Interval (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) true (@GRing.opp (Num.NumDomain.zmodType R) b)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) true (@GRing.opp (Num.NumDomain.zmodType R) a))))) *) exact: oppr_itv. Qed. Lemma oppr_itvco (a b x : R) : (-x \in `[a, b[) = (x \in `](-b), (-a)]). Proof. (* Goal: @eq bool (@in_mem (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@GRing.opp (Num.NumDomain.zmodType R) x) (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) (@BOpen_if (Num.NumDomain.sort R) false a) (@BOpen_if (Num.NumDomain.sort R) true b)))) (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType (@Interval (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) true (@GRing.opp (Num.NumDomain.zmodType R) b)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) false (@GRing.opp (Num.NumDomain.zmodType R) a))))) *) exact: oppr_itv. Qed. Lemma oppr_itvoc (a b x : R) : (-x \in `]a, b]) = (x \in `[(-b), (-a)[). Proof. (* Goal: @eq bool (@in_mem (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@GRing.opp (Num.NumDomain.zmodType R) x) (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) (@BOpen_if (Num.NumDomain.sort R) true a) (@BOpen_if (Num.NumDomain.sort R) false b)))) (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType (@Interval (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) false (@GRing.opp (Num.NumDomain.zmodType R) b)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) true (@GRing.opp (Num.NumDomain.zmodType R) a))))) *) exact: oppr_itv. Qed. Lemma oppr_itvcc (a b x : R) : (-x \in `[a, b]) = (x \in `[(-b), (-a)]). Proof. (* Goal: @eq bool (@in_mem (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@GRing.opp (Num.NumDomain.zmodType R) x) (@mem (Num.NumDomain.sort R) itvPredType (@Interval (Num.NumDomain.sort R) (@BOpen_if (Num.NumDomain.sort R) false a) (@BOpen_if (Num.NumDomain.sort R) false b)))) (@in_mem (Num.NumDomain.sort R) x (@mem (Num.NumDomain.sort R) itvPredType (@Interval (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) false (@GRing.opp (Num.NumDomain.zmodType R) b)) (@BOpen_if (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) false (@GRing.opp (Num.NumDomain.zmodType R) a))))) *) exact: oppr_itv. Qed. End IntervalPo. Section IntervalOrdered. Variable R : realDomainType. Lemma le_boundl_total : total (@le_boundl R). Proof. (* Goal: @total (itv_bound (Num.NumDomain.sort (Num.RealDomain.numDomainType R))) (@le_boundl (Num.RealDomain.numDomainType R)) *) by move=> [[] l |] [[] r |] //=; case: (ltrgtP l r). Qed. Lemma le_boundr_total : total (@le_boundr R). Proof. (* Goal: @total (itv_bound (Num.NumDomain.sort (Num.RealDomain.numDomainType R))) (@le_boundr (Num.RealDomain.numDomainType R)) *) by move=> [[] l |] [[] r |] //=; case (ltrgtP l r). Qed. Lemma itv_splitU (xc : R) bc a b : xc \in Interval a b -> forall y, y \in Interval a b = (y \in Interval a (BOpen_if (~~ bc) xc)) || (y \in Interval (BOpen_if bc xc) b). Lemma itv_splitU2 (x : R) a b : x \in Interval a b -> forall y, y \in Interval a b = [|| (y \in Interval a (BOpen x)), (y == x) | (y \in Interval (BOpen x) b)]. Lemma itv_intersectionC : commutative (@itv_intersection R). Proof. (* Goal: @commutative (interval (Num.NumDomain.sort (Num.RealDomain.numDomainType R))) (interval (Num.NumDomain.sort (Num.RealDomain.numDomainType R))) (@itv_intersection (Num.RealDomain.numDomainType R)) *) move=> [x x'] [y y'] /=; congr Interval; do 2 case: ifP => //=. (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' x') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false), @eq (itv_bound (Num.RealDomain.sort R)) y' x' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' x')) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')), @eq (itv_bound (Num.RealDomain.sort R)) x' y' *) (* Goal: forall (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) y x) false) (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) x y) false), @eq (itv_bound (Num.RealDomain.sort R)) x y *) (* Goal: forall (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) y x)) (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) x y)), @eq (itv_bound (Num.RealDomain.sort R)) y x *) - (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' x') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false), @eq (itv_bound (Num.RealDomain.sort R)) y' x' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' x')) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')), @eq (itv_bound (Num.RealDomain.sort R)) x' y' *) (* Goal: forall (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) y x) false) (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) x y) false), @eq (itv_bound (Num.RealDomain.sort R)) x y *) (* Goal: forall (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) y x)) (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) x y)), @eq (itv_bound (Num.RealDomain.sort R)) y x *) by move=> leyx lexy; apply/eqP; rewrite -le_boundl_anti leyx lexy. (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' x') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false), @eq (itv_bound (Num.RealDomain.sort R)) y' x' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' x')) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')), @eq (itv_bound (Num.RealDomain.sort R)) x' y' *) (* Goal: forall (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) y x) false) (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) x y) false), @eq (itv_bound (Num.RealDomain.sort R)) x y *) - (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' x') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false), @eq (itv_bound (Num.RealDomain.sort R)) y' x' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' x')) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')), @eq (itv_bound (Num.RealDomain.sort R)) x' y' *) (* Goal: forall (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) y x) false) (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) x y) false), @eq (itv_bound (Num.RealDomain.sort R)) x y *) by case/orP: (le_boundl_total x y) => ->. (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' x') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false), @eq (itv_bound (Num.RealDomain.sort R)) y' x' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' x')) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')), @eq (itv_bound (Num.RealDomain.sort R)) x' y' *) - (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' x') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false), @eq (itv_bound (Num.RealDomain.sort R)) y' x' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' x')) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')), @eq (itv_bound (Num.RealDomain.sort R)) x' y' *) by move=> leyx' lexy'; apply/eqP; rewrite -le_boundr_anti leyx' lexy'. (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' x') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false), @eq (itv_bound (Num.RealDomain.sort R)) y' x' *) - (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' x') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false), @eq (itv_bound (Num.RealDomain.sort R)) y' x' *) by case/orP: (le_boundr_total x' y') => ->. Qed. Lemma itv_intersectionA : associative (@itv_intersection R). Proof. (* Goal: @associative (interval (Num.NumDomain.sort (Num.RealDomain.numDomainType R))) (@itv_intersection (Num.RealDomain.numDomainType R)) *) move=> [x x'] [y y'] [z z'] /=; congr Interval; do !case: ifP => //=; do 1?congruence. (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' z')), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' z')) (_ : is_true true), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: forall (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) x y) false) (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) x z)) (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) y z) false) (_ : @eq bool false false), @eq (itv_bound (Num.RealDomain.sort R)) x z *) (* Goal: forall (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) x y)) (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) y z)) (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) y z)) (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) x z) false), @eq (itv_bound (Num.RealDomain.sort R)) x z *) - (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' z')), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' z')) (_ : is_true true), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: forall (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) x y) false) (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) x z)) (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) y z) false) (_ : @eq bool false false), @eq (itv_bound (Num.RealDomain.sort R)) x z *) (* Goal: forall (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) x y)) (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) y z)) (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) y z)) (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) x z) false), @eq (itv_bound (Num.RealDomain.sort R)) x z *) by move=> lexy leyz; rewrite (le_boundl_trans lexy leyz). (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' z')), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' z')) (_ : is_true true), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: forall (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) x y) false) (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) x z)) (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) y z) false) (_ : @eq bool false false), @eq (itv_bound (Num.RealDomain.sort R)) x z *) - (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' z')), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' z')) (_ : is_true true), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: forall (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) x y) false) (_ : is_true (@le_boundl (Num.RealDomain.numDomainType R) x z)) (_ : @eq bool (@le_boundl (Num.RealDomain.numDomainType R) y z) false) (_ : @eq bool false false), @eq (itv_bound (Num.RealDomain.sort R)) x z *) move=> gtxy lexz gtyz _; apply/eqP; rewrite -le_boundl_anti lexz /=. (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' z')), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' z')) (_ : is_true true), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: is_true (@le_boundl (Num.RealDomain.numDomainType R) z x) *) move: (le_boundl_total y z) (le_boundl_total x y). (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' z')), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' z')) (_ : is_true true), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: forall (_ : is_true (orb (@le_boundl (Num.RealDomain.numDomainType R) y z) (@le_boundl (Num.RealDomain.numDomainType R) z y))) (_ : is_true (orb (@le_boundl (Num.RealDomain.numDomainType R) x y) (@le_boundl (Num.RealDomain.numDomainType R) y x))), is_true (@le_boundl (Num.RealDomain.numDomainType R) z x) *) by rewrite gtxy gtyz; apply: le_boundl_trans. (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' z')), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' z')) (_ : is_true true), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) - (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' z')), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) (* Goal: forall (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' y')) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) y' z')) (_ : is_true true), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) by move=> lexy' gtxz' leyz'; rewrite (le_boundr_trans lexy' leyz') in gtxz'. (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' z')), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) - (* Goal: forall (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) x' y') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : @eq bool (@le_boundr (Num.RealDomain.numDomainType R) y' z') false) (_ : is_true (@le_boundr (Num.RealDomain.numDomainType R) x' z')), @eq (itv_bound (Num.RealDomain.sort R)) x' z' *) move=> gtxy' gtyz' _ lexz'; apply/eqP; rewrite -le_boundr_anti lexz' /=. (* Goal: is_true (@le_boundr (Num.RealDomain.numDomainType R) z' x') *) move: (le_boundr_total y' z') (le_boundr_total x' y'). (* Goal: forall (_ : is_true (orb (@le_boundr (Num.RealDomain.numDomainType R) y' z') (@le_boundr (Num.RealDomain.numDomainType R) z' y'))) (_ : is_true (orb (@le_boundr (Num.RealDomain.numDomainType R) x' y') (@le_boundr (Num.RealDomain.numDomainType R) y' x'))), is_true (@le_boundr (Num.RealDomain.numDomainType R) z' x') *) by rewrite gtxy' gtyz'; apply: le_boundr_trans. Qed. Canonical itv_intersection_monoid := Monoid.Law itv_intersectionA (@itv_intersection1i R) (@itv_intersectioni1 R). Canonical itv_intersection_comoid := Monoid.ComLaw itv_intersectionC. End IntervalOrdered. Section IntervalField. Variable R : realFieldType. Lemma mid_in_itv : forall ba bb (xa xb : R), xa <= xb ?< if ba || bb -> mid xa xb \in Interval (BOpen_if ba xa) (BOpen_if bb xb). Proof. (* Goal: forall (ba bb : bool) (xa xb : Num.RealField.sort R) (_ : is_true (@lersif (Num.RealField.numDomainType R) xa xb (orb ba bb))), is_true (@in_mem (GRing.Ring.sort (Num.RealField.ringType R)) (@GRing.mul (Num.RealField.ringType R) (@GRing.add (Num.RealField.zmodType R) xa xb) (@GRing.inv (Num.RealField.unitRingType R) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (GRing.one (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (S (S O))))) (@mem (Num.NumDomain.sort (Num.RealField.numDomainType R)) (itvPredType (Num.RealField.numDomainType R)) (@Interval (Num.RealField.sort R) (@BOpen_if (Num.RealField.sort R) ba xa) (@BOpen_if (Num.RealField.sort R) bb xb)))) *) by move=> [] [] xa xb /= ?; apply/itv_dec=> /=; rewrite ?midf_lte // ?ltrW. Qed. Lemma mid_in_itvoo : forall (xa xb : R), xa < xb -> mid xa xb \in `]xa, xb[. Proof. (* Goal: forall (xa xb : Num.RealField.sort R) (_ : is_true (@Num.Def.ltr (Num.RealField.numDomainType R) xa xb)), is_true (@in_mem (GRing.Ring.sort (Num.RealField.ringType R)) (@GRing.mul (Num.RealField.ringType R) (@GRing.add (Num.RealField.zmodType R) xa xb) (@GRing.inv (Num.RealField.unitRingType R) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (GRing.one (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (S (S O))))) (@mem (Num.NumDomain.sort (Num.RealField.numDomainType R)) (itvPredType (Num.RealField.numDomainType R)) (@Interval (Num.RealField.sort R) (@BOpen_if (Num.RealField.sort R) true xa) (@BOpen_if (Num.RealField.sort R) true xb)))) *) by move=> xa xb ?; apply: mid_in_itv. Qed. Lemma mid_in_itvcc : forall (xa xb : R), xa <= xb -> mid xa xb \in `[xa, xb]. Proof. (* Goal: forall (xa xb : Num.RealField.sort R) (_ : is_true (@Num.Def.ler (Num.RealField.numDomainType R) xa xb)), is_true (@in_mem (GRing.Ring.sort (Num.RealField.ringType R)) (@GRing.mul (Num.RealField.ringType R) (@GRing.add (Num.RealField.zmodType R) xa xb) (@GRing.inv (Num.RealField.unitRingType R) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (GRing.one (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (S (S O))))) (@mem (Num.NumDomain.sort (Num.RealField.numDomainType R)) (itvPredType (Num.RealField.numDomainType R)) (@Interval (Num.RealField.sort R) (@BOpen_if (Num.RealField.sort R) false xa) (@BOpen_if (Num.RealField.sort R) false xb)))) *) by move=> xa xb ?; apply: mid_in_itv. Qed. End IntervalField.
Require Import utils. Require Import syntax. Require Import environments. Require Import typecheck. Require Import freevars. Require Import List. Require Import ApTypes. Require Import NF. Require Import valid. Require Import OSrules. Require Import envprops. Require Import rename. Require Import NFprops. Require Import TypeThms. Goal forall c c' : config, OSred c c' -> valid_env (cfgenv c) -> forall t : ty, TC (OS_Dom_ty (cfgenv c)) (cfgexp c) t -> valid_env (cfgenv c') /\ TC (OS_Dom_ty (cfgenv c')) (cfgexp c') t /\ NF (cfgexp c'). simple induction 1; simpl in |- *; intros. split. assumption. split. assumption. apply NF_Sno; apply Sno_o. split. assumption. split. assumption. apply NF_ttt. split. assumption. split. assumption. apply NF_fff. split. assumption. split. assumption. apply NF_F; apply F_abs. specialize inv_TC_prd with (1 := H3); simple induction 1; intros Q T. apply H1. assumption. rewrite Q; assumption. specialize inv_TC_prd with (1 := H3); simple induction 1; intros Q T. elim H1 with t. intro V; simple induction 1; intros Ts Nf. split. assumption. split. specialize inv_TC_succ with (1 := Ts); simple induction 1; intros. rewrite Q; assumption. apply NF_Sno; apply inv_Sno_s; apply inv_NF_Sno; assumption. assumption. rewrite Q; assumption. specialize inv_TC_is_o with (1 := H3); simple induction 1; intros Q T. elim H1 with nat_ty. intro V; simple induction 1; intros Tc Nf. split. assumption. split. rewrite Q; apply TC_ttt. apply NF_ttt. assumption. assumption. specialize inv_TC_is_o with (1 := H3); simple induction 1; intros Q T. elim H1 with nat_ty. intro V; simple induction 1; intros Tc Nf. split. assumption. split. rewrite Q; apply TC_fff. apply NF_fff. assumption. assumption. specialize inv_TC_succ with (1 := H3); simple induction 1; intros Q T. elim H1 with nat_ty. intro V; simple induction 1; intros Te1 Nf. split. assumption. split. rewrite Q; apply TC_succ; assumption. apply NF_Sno; apply Sno_s; apply NFenat_Snoe with (OS_Dom_ty A'); assumption. assumption. assumption. specialize inv_TC_var with (1 := H4); simpl in |- *; intro M. specialize If_T with (1 := M); intro T. cut (x = x). intro R; specialize T with (1 := R); rename T into Q. unfold OScons in H3. specialize inv_valid_cons with (1 := H3); simple induction 1; intros V Te. elim H2 with t. intro V'; simple induction 1; intros Ten NFen. split. unfold OScons in |- *; apply valid_cons; assumption. split. change (TC (nil ++ (x, t) :: OS_Dom_ty A') en t0) in |- *. apply TEp_nfvExt with (OS_Dom_ty A'). elim Q; assumption. red in |- *; intro F; apply H0. elim (TEDomDomty_OSDom A). apply TCHet_FVeinDomH with en t. replace (OS_Dom_ty A) with (OS_Dom_ty A'). assumption. symmetry in |- *; apply (dom_pres (cfg e A) (cfg en A')). assumption. assumption. reflexivity. assumption. assumption. assumption. reflexivity. specialize inv_TC_var with (1 := H5); simpl in |- *; intro M. specialize If_F with (1 := M) (2 := H0); intro M1. unfold OScons in H4. specialize inv_valid_cons with (1 := H4); simple induction 1; intros V Te. elim H3 with t0. intro V'; simple induction 1; intros Ten NFen. specialize dom_pres with (1 := H2); simpl in |- *; intro QA. split. unfold OScons in |- *; apply valid_cons. elim QA; assumption. assumption. split. change (TC (nil ++ (x, t) :: OS_Dom_ty A') en t0) in |- *. apply TEp_nfvExt with (OS_Dom_ty A'). assumption. red in |- *; intro F. apply H1. elim (TEDomDomty_OSDom A). apply TCHet_FVeinDomH with en t0. rewrite QA; assumption. assumption. reflexivity. assumption. assumption. apply TC_var; assumption. specialize inv_TC_appl with (1 := H6); simple induction 1; simple induction 1; intros T1 T2. specialize dom_pres with (1 := H0); simpl in |- *; intro Q1. specialize dom_pres with (1 := H3); simpl in |- *; intro Q2. specialize TEp_Ap with (a := e2) (e := en) (ne := en') (A := A) (n := n) (t := t) (1 := H2). intro Ap. elim H1 with (arr x t0). intro V'; simple induction 1; intros Ten NFen. elim Ap with (OS_Dom_ty A') x t0. intros Ten' XT. apply H4. assumption. apply TC_clos. elim XT; elim Q1; assumption. assumption. specialize ApNewVar with (a := e2) (fun_ := en) (b := en') (A := A) (n := n) (t := t) (1 := H2); intros M x0 F. elim (TEDomDomty_OSDom A). apply TCHet_FVeinDomH with en (arr x t0). rewrite Q1; assumption. assumption. assumption. assumption. assumption. specialize inv_TC_cond with (1 := H5). simple induction 1; intro T1; simple induction 1; intros T2 T3. elim H1 with bool_ty. intro V'; simple induction 1; intros Tt NFt. apply H3. assumption. specialize dom_pres with (1 := H0); simpl in |- *; intro Q1. elim Q1; assumption. assumption. assumption. specialize inv_TC_cond with (1 := H5). simple induction 1; intro T1; simple induction 1; intros T2 T3. elim H1 with bool_ty. intro V'; simple induction 1; intros Tf NFf. apply H3. assumption. specialize dom_pres with (1 := H0); simpl in |- *; intro Q1. elim Q1; assumption. assumption. assumption. specialize inv_TC_fix with (1 := H5). simple induction 1; intros Q Te. apply H3. assumption. apply TC_clos. pattern t at 2 in |- *; rewrite Q; assumption. apply TEp_RenExp with x e. assumption. specialize (Xmidvar nx x); simple induction 1; intro N. left; assumption. right; red in |- *; intro F; apply H0. elim (TEDomDomty_OSDom A). specialize TCHet_FVeinDomH with (1 := Te) (2 := F). simpl in |- *; simple induction 1; intro R. absurd (nx = x); assumption || symmetry in |- *; assumption. assumption. assumption. specialize inv_TC_clos with (1 := H5); simple induction 1; intros T1 Te. elim H1 with t0. intro VxA'; simple induction 1; intros Ten Fen. unfold OScons in VxA'; specialize inv_valid_cons with (1 := VxA'). simple induction 1; intros V' T'. split. assumption. split. apply TC_clos. assumption. assumption. apply NF_F; apply F_clos; apply NFe_Fe with ((x, t) :: OS_Dom_ty A) s; assumption. unfold OScons in |- *; apply valid_cons. assumption. assumption. assumption. specialize inv_TC_clos with (1 := H5); simple induction 1; intros T1 Te. elim H1 with t0. intro VxA'; simple induction 1; intros Ten NFen. unfold OScons in VxA'; specialize inv_valid_cons with (1 := VxA'). simple induction 1; intros V' T'. split. assumption. split. change (TC (nil ++ OS_Dom_ty A') en t0) in |- *. apply TEp_inv_nfvExt with (nil ++ (x, t) :: OS_Dom_ty A') x t. simpl in |- *; assumption. reflexivity. elim H3; intro Q. apply Snoe_notFVe. apply NFenat_Snoe with ((x, t) :: OS_Dom_ty A). assumption. elim Q; assumption. specialize NFebool_TF with (e := en) (1 := NFen) (H := (x, t) :: OS_Dom_ty A). simple induction 1. intro T; rewrite T; apply inv_FV_ttt. intro F; rewrite F; apply inv_FV_fff. elim Q; assumption. assumption. unfold OScons in |- *; apply valid_cons; assumption. assumption. Save subjr_NF. Goal forall (e e' : tm) (A A' : OS_env), OSred (cfg e A) (cfg e' A') -> valid_env A -> forall t : ty, TC (OS_Dom_ty A) e t -> TC (OS_Dom_ty A') e' t. intros. specialize (subjr_NF (cfg e A) (cfg e' A')) with (1 := H) (2 := H0) (3 := H1). simpl in |- *; simple induction 1; intro; simple induction 1; intros; assumption. Save subjr_red. Goal forall (e e' : tm) (A A' : OS_env), OSred (cfg e A) (cfg e' A') -> valid_config (cfg e A) -> NF e'. intros e e' A A' R VC. elim VC; simpl in |- *; intros V t T. specialize (subjr_NF (cfg e A) (cfg e' A')) with (1 := R) (2 := V) (3 := T). simpl in |- *; simple induction 1; intro; simple induction 1; intros; assumption. Save NormalForms.
Set Implicit Arguments. Unset Strict Implicit. Section General_definitions. Variable E : Set. Definition onto (f : E -> E) := forall y : E, {x : E | f x = y}. Variable o : E -> E -> E. Variable e : E. Variable s : E -> E. Definition associative := forall x y z : E, o x (o y z) = o (o x y) z. Definition left_neutral := forall x : E, o e x = x. Definition right_neutral := forall x : E, o x e = x. Definition left_symmetric := forall x : E, o (s x) x = e. Definition right_symmetric := forall x : E, o x (s x) = e. End General_definitions. Record group (E : Set) : Set := mkgroup {group_law : E -> E -> E; group_assoc : associative group_law; group_neutral : E; group_sym : E -> E; group_l_neutral : left_neutral group_law group_neutral; group_r_neutral : right_neutral group_law group_neutral; group_l_sym : left_symmetric group_law group_neutral group_sym; group_r_sym : right_symmetric group_law group_neutral group_sym}. Section some_properties_of_groups. Variable E : Set. Variable G : group E. Let o := group_law G. Let s := group_sym G. Let e := group_neutral G. Let assoc := group_assoc G. Let l_neutral := group_l_neutral G. Proof. (* Goal: @left_neutral E o e *) rewrite e_eq_e'; auto. Qed. Let r_neutral := group_r_neutral G. Proof. (* Goal: @right_neutral E o e *) unfold right_neutral, e in |- *; case Ea. (* Goal: forall (x : E) (_ : @eq E (o a x) a) (x0 : E), @eq E (o x0 x) x0 *) intros e0 eg x. (* Goal: @eq E (o x e0) x *) case (o_onto_l a x); intros u eg'. (* Goal: @eq E (o x e0) x *) rewrite <- eg'. (* Goal: @eq E (o (o u a) e0) (o u a) *) rewrite <- (o_assoc u a e0). (* Goal: @eq E (o u (o a e0)) (o u a) *) rewrite eg; auto. Qed. Let l_sym := group_l_sym G. Proof. (* Goal: @left_symmetric E o e s *) unfold left_symmetric, s in |- *; intros. (* Goal: @eq E (o (let (y, _) := lsym x in y) x) e *) case (lsym x); auto. Qed. Let r_sym := group_r_sym G. Proof. (* Goal: @right_symmetric E o e s *) unfold right_symmetric in |- *; intro x. (* Goal: @eq E (o x (s x)) e *) rewrite s_eq_s'. (* Goal: @eq E (o x (s' x)) e *) unfold s' in |- *; case (rsym x); auto. Qed. Hint Resolve assoc l_sym l_neutral r_sym r_neutral. Hint Unfold o s e. Lemma solve_equation : forall x y : E, o x y = e -> y = s x. Proof. (* Goal: forall (x y : E) (_ : @eq E (o x y) e), @eq E y (s x) *) intros x y H. (* Goal: @eq E y (s x) *) transitivity (o e y). (* Goal: @eq E (o e y) (s x) *) (* Goal: @eq E y (o e y) *) symmetry in |- *; auto. (* Goal: @eq E (o e y) (s x) *) transitivity (o (s x) (o x y)). (* Goal: @eq E (o (s x) (o x y)) (s x) *) (* Goal: @eq E (o e y) (o (s x) (o x y)) *) transitivity (o (o (s x) x) y). (* Goal: @eq E (o (s x) (o x y)) (s x) *) (* Goal: @eq E (o (o (s x) x) y) (o (s x) (o x y)) *) (* Goal: @eq E (o e y) (o (o (s x) x) y) *) unfold o, e, s in |- *; rewrite (l_sym x); auto. (* Goal: @eq E (o (s x) (o x y)) (s x) *) (* Goal: @eq E (o (o (s x) x) y) (o (s x) (o x y)) *) auto. (* Goal: @eq E (o (s x) (o x y)) (s x) *) rewrite H; auto. Qed. Hint Resolve solve_equation. Lemma ssx : forall x : E, x = s (s x). Proof. (* Goal: forall x : E, @eq E x (s (s x)) *) auto. Qed. End some_properties_of_groups. Section The_exercise_itself. Variable E : Set. Variable a : E. Variable o : E -> E -> E. Hypothesis o_assoc : associative o. Hypothesis o_onto_r : forall x : E, onto (fun y : E => o x y). Hypothesis o_onto_l : forall x : E, onto (fun y : E => o y x). Hint Resolve o_assoc o_onto_r o_onto_l. Lemma Ea : {ea : E | o a ea = a}. Proof. (* Goal: @sig E (fun ea : E => @eq E (o a ea) a) *) case (o_onto_r a a); intros x H; exists x; auto. Qed. Definition e := let (e, _) := Ea in e. Lemma r_neutral : right_neutral o e. Hint Resolve r_neutral. Lemma E'a : {e'a : E | o e'a a = a}. Proof. (* Goal: @sig E (fun e'a : E => @eq E (o e'a a) a) *) case (o_onto_l a a); intros x H; exists x; auto. Qed. Definition e' := let (e', _) := E'a in e'. Lemma e'_l_neutral : left_neutral o e'. Proof. (* Goal: @left_neutral E o e' *) unfold left_neutral, e' in |- *; case E'a. (* Goal: forall (x : E) (_ : @eq E (o x a) a) (x0 : E), @eq E (o x x0) x0 *) intros e'0 eg x. (* Goal: @eq E (o e'0 x) x *) case (o_onto_r a x); intros u eg'. (* Goal: @eq E (o e'0 x) x *) rewrite <- eg'. (* Goal: @eq E (o e'0 (o a u)) (o a u) *) rewrite (o_assoc e'0 a u). (* Goal: @eq E (o (o e'0 a) u) (o a u) *) rewrite eg; auto. Qed. Hint Resolve e'_l_neutral. Lemma e_eq_e' : e = e'. Proof. (* Goal: @eq E e e' *) transitivity (o e' e). (* Goal: @eq E (o e' e) e' *) (* Goal: @eq E e (o e' e) *) symmetry in |- *; auto. (* Goal: @eq E (o e' e) e' *) auto. Qed. Lemma l_neutral : left_neutral o e. Hint Resolve l_neutral. Lemma lsym : forall x : E, {y : E | o y x = e}. Proof. (* Goal: forall x : E, @sig E (fun y : E => @eq E (o y x) e) *) intro x. (* Goal: @sig E (fun y : E => @eq E (o y x) e) *) case (o_onto_l x e); intros u H; exists u; auto. Qed. Definition s (x : E) := let (y, _) return E := lsym x in y. Lemma l_sym : left_symmetric o e s. Hint Resolve l_sym. Lemma rsym : forall x : E, {y : E | o x y = e}. Proof. (* Goal: forall x : E, @sig E (fun y : E => @eq E (o x y) e) *) intro x. (* Goal: @sig E (fun y : E => @eq E (o x y) e) *) case (o_onto_r x e); intros u H; exists u; auto. Qed. Definition s' (x : E) := let (y, _) return E := rsym x in y. Lemma s_eq_s' : forall x : E, s x = s' x. Proof. (* Goal: forall x : E, @eq E (s x) (s' x) *) intro x; unfold s, s' in |- *; case (rsym x); case (lsym x). (* Goal: forall (x0 : E) (_ : @eq E (o x0 x) e) (x1 : E) (_ : @eq E (o x x1) e), @eq E x0 x1 *) intros y eg y' eg'. (* Goal: @eq E y y' *) transitivity (o y e). (* Goal: @eq E (o y e) y' *) (* Goal: @eq E y (o y e) *) auto. (* Goal: @eq E (o y e) y' *) rewrite <- eg'. (* Goal: @eq E (o y (o x y')) y' *) rewrite (o_assoc y x y'). (* Goal: @eq E (o (o y x) y') y' *) rewrite eg; auto. Qed. Lemma r_sym : right_symmetric o e s. Hint Resolve r_sym. Theorem E_is_a_group : group E. Proof. (* Goal: group E *) apply mkgroup with o e s; auto. Qed. End The_exercise_itself.
Set Implicit Arguments. Unset Strict Implicit. Require Export Parts2. Comments "We prove that if there is an injection from A to B, and an injection from B to A". Comments "then there is a bijection between A and B.". Section Cantor_Bernstein. Variable E F : Setoid. Variable f : MAP E F. Variable g : MAP F E. Hypothesis finj : injective f. Hypothesis ginj : injective g. Let h (X : part_set E) := compl (image g (compl (image f X))). Let h_incr : forall A B : part_set E, included A B -> included (h A) (h B). Proof. (* Goal: forall (A B : Carrier (part_set E)) (_ : @included E A B), @included E (h A) (h B) *) unfold h in |- *. (* Goal: forall (A B : Carrier (part_set E)) (_ : @included E A B), @included E (@compl E (@image F E g (@compl F (@image E F f A)))) (@compl E (@image F E g (@compl F (@image E F f B)))) *) auto with algebra. Qed. Hint Resolve h_incr: algebra. Let PX : part_set (part_set E). Proof. (* Goal: Carrier (part_set (part_set E)) *) apply (Build_Predicate (Pred_fun:=fun A : part_set E => included A (h A))). (* Goal: @pred_compatible (part_set E) (fun A : Carrier (part_set E) => @included E A (h A)) *) red in |- *. (* Goal: forall (x y : Carrier (part_set E)) (_ : @included E x (h x)) (_ : @Equal (part_set E) y x), @included E y (h y) *) intros x y H' H'0; try assumption. (* Goal: @included E y (h y) *) apply included_comp with x (h x); auto with algebra. (* Goal: @Equal (part_set E) (h x) (h y) *) unfold h in |- *. (* Goal: @Equal (part_set E) (@compl E (@image F E g (@compl F (@image E F f x)))) (@compl E (@image F E g (@compl F (@image E F f y)))) *) auto with algebra. Qed. Let X := union_part PX. Let XhX : included X (h X). Proof. (* Goal: @included E X (h X) *) unfold X in |- *. (* Goal: @included E (@union_part E PX) (h (@union_part E PX)) *) apply union_part_upper_bound. (* Goal: forall (A : Carrier (part_set E)) (_ : @in_part (part_set E) A PX), @included E A (h (@union_part E PX)) *) intros A H'; try assumption. (* Goal: @included E A (h (@union_part E PX)) *) apply included_trans with (h A); auto with algebra. Qed. Let hXX : included (h X) X. Proof. (* Goal: @included E (h X) X *) unfold X in |- *. (* Goal: @included E (h (@union_part E PX)) (@union_part E PX) *) apply union_part_included. (* Goal: @in_part (part_set E) (h (@union_part E PX)) PX *) simpl in |- *. (* Goal: @included E (h (@union_part E PX)) (h (h (@union_part E PX))) *) apply h_incr. (* Goal: @included E (@union_part E PX) (h (@union_part E PX)) *) exact XhX. Qed. Let PXeq : Equal (h X) X. Proof. (* Goal: @Equal (part_set E) (h X) X *) apply included_antisym. (* Goal: @included E X (h X) *) (* Goal: @included E (h X) X *) exact hXX. (* Goal: @included E X (h X) *) exact XhX. Qed. Hint Resolve PXeq hXX XhX: algebra. Let img : Equal (image g (compl (image f X))) (compl X). Proof. (* Goal: @Equal (part_set E) (@image F E g (@compl F (@image E F f X))) (@compl E X) *) apply Trans with (compl (h X)); auto with algebra. (* Goal: @Equal (part_set E) (@image F E g (@compl F (@image E F f X))) (@compl E (h X)) *) unfold h in |- *; auto with algebra. Qed. Hint Resolve img: algebra. Hypothesis partial_section : forall (E F : Setoid) (f : MAP E F), injective f -> exists g : MAP F E, Equal (comp_map_map g f) (Id E). Hypothesis map_extend : forall (E F : Setoid) (f g : MAP E F) (A : part_set E), exists b : MAP E F, (forall x : E, in_part x A -> Equal (b x) (f x)) /\ (forall x : E, ~ in_part x A -> Equal (b x) (g x)). Theorem Cantor_Berstein : exists b : MAP E F, bijective b. Proof. (* Goal: @ex (Carrier (MAP E F)) (fun b : Carrier (MAP E F) => @bijective E F b) *) case (partial_section ginj). (* Goal: forall (x : Carrier (MAP E F)) (_ : @Equal (MAP F F) (@comp_map_map F E F x g) (Id F)), @ex (Carrier (MAP E F)) (fun b : Carrier (MAP E F) => @bijective E F b) *) intros g1 H'; try assumption. (* Goal: @ex (Carrier (MAP E F)) (fun b : Carrier (MAP E F) => @bijective E F b) *) case (map_extend f g1 X). (* Goal: forall (x : Carrier (MAP E F)) (_ : and (forall (x0 : Carrier E) (_ : @in_part E x0 X), @Equal F (@Ap E F x x0) (@Ap E F f x0)) (forall (x0 : Carrier E) (_ : not (@in_part E x0 X)), @Equal F (@Ap E F x x0) (@Ap E F g1 x0))), @ex (Carrier (MAP E F)) (fun b : Carrier (MAP E F) => @bijective E F b) *) intros b H'1; try assumption. (* Goal: @ex (Carrier (MAP E F)) (fun b : Carrier (MAP E F) => @bijective E F b) *) exists b; try assumption. (* Goal: @bijective E F b *) elim H'1; intros H'2 H'3; try exact H'2; clear H'1. (* Goal: @bijective E F b *) red in |- *. (* Goal: and (@injective E F b) (@surjective E F b) *) split; [ try assumption | idtac ]. (* Goal: @surjective E F b *) (* Goal: @injective E F b *) red in |- *. (* Goal: @surjective E F b *) (* Goal: forall (x y : Carrier E) (_ : @Equal F (@Ap E F b x) (@Ap E F b y)), @Equal E x y *) intros x y H'0; try assumption. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) case (compl_not_compl X x); intros. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @Equal E x y *) case (compl_not_compl X y); intros. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @Equal E x y *) (* Goal: @Equal E x y *) apply finj. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @Equal E x y *) (* Goal: @Equal F (@Ap E F f x) (@Ap E F f y) *) apply Trans with (b y); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @Equal E x y *) (* Goal: @Equal F (@Ap E F f x) (@Ap E F b y) *) apply Trans with (b x); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @Equal E x y *) (* Goal: @Equal F (@Ap E F f x) (@Ap E F b x) *) apply Sym; auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @Equal E x y *) cut (in_part y (image g (compl (image f X)))). (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: forall _ : @in_part E y (@image F E g (@compl F (@image E F f X))), @Equal E x y *) intros H'1; try assumption. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E x y *) generalize (image_in H'1). (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: forall _ : @ex (Carrier F) (fun x : Carrier F => and (@in_part F x (@compl F (@image E F f X))) (@Equal E y (@Ap F E g x))), @Equal E x y *) intros H'4; try assumption. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E x y *) elim H'4; intros x0 E0; try exact E0; clear H'4. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E x y *) elim E0; intros H'4 H'5; try exact H'5; clear E0. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E x y *) absurd (in_part x0 (compl (image f X))); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: not (@in_part F x0 (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap (Id F) x0); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: not (@in_part F (@Ap F F (Id F) x0) (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap (comp_map_map g1 g) x0); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: not (@in_part F (@Ap F F (@comp_map_map F E F g1 g) x0) (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap g1 (Ap g x0)); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: not (@in_part F (@Ap E F g1 (@Ap F E g x0)) (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap g1 y); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: not (@in_part F (@Ap E F g1 y) (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap b y); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap E F g1 y) (@Ap E F b y) *) (* Goal: not (@in_part F (@Ap E F b y) (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap b x); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap E F g1 y) (@Ap E F b y) *) (* Goal: not (@in_part F (@Ap E F b x) (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap f x); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap E F g1 y) (@Ap E F b y) *) apply Sym; auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) apply in_part_comp_r with (compl X); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) case (compl_not_compl X y); intros. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @Equal E x y *) cut (in_part x (image g (compl (image f X)))). (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: forall _ : @in_part E x (@image F E g (@compl F (@image E F f X))), @Equal E x y *) intros H'1; try assumption. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E x y *) generalize (image_in H'1). (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: forall _ : @ex (Carrier F) (fun x0 : Carrier F => and (@in_part F x0 (@compl F (@image E F f X))) (@Equal E x (@Ap F E g x0))), @Equal E x y *) intros H'4; try assumption. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E x y *) elim H'4; intros x0 E0; try exact E0; clear H'4. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E x y *) elim E0; intros H'4 H'5; try exact H'5; clear E0. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E x y *) absurd (in_part x0 (compl (image f X))); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: not (@in_part F x0 (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap (Id F) x0); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: not (@in_part F (@Ap F F (Id F) x0) (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap (comp_map_map g1 g) x0); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: not (@in_part F (@Ap F F (@comp_map_map F E F g1 g) x0) (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap g1 (Ap g x0)); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: not (@in_part F (@Ap E F g1 (@Ap F E g x0)) (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap g1 x); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: not (@in_part F (@Ap E F g1 x) (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap b x); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap E F g1 x) (@Ap E F b x) *) (* Goal: not (@in_part F (@Ap E F b x) (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap b y); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap E F g1 x) (@Ap E F b x) *) (* Goal: not (@in_part F (@Ap E F b y) (@compl F (@image E F f X))) *) apply not_in_comp_l with (Ap f y); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap E F g1 x) (@Ap E F b x) *) apply Sym; auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) apply in_part_comp_r with (compl X); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @Equal E x y *) cut (in_part x (image g (compl (image f X)))). (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: forall _ : @in_part E x (@image F E g (@compl F (@image E F f X))), @Equal E x y *) cut (in_part y (image g (compl (image f X)))). (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: forall (_ : @in_part E y (@image F E g (@compl F (@image E F f X)))) (_ : @in_part E x (@image F E g (@compl F (@image E F f X)))), @Equal E x y *) intros H'1 H'4; try assumption. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E x y *) generalize (image_in H'1). (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: forall _ : @ex (Carrier F) (fun x : Carrier F => and (@in_part F x (@compl F (@image E F f X))) (@Equal E y (@Ap F E g x))), @Equal E x y *) generalize (image_in H'4). (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: forall (_ : @ex (Carrier F) (fun x0 : Carrier F => and (@in_part F x0 (@compl F (@image E F f X))) (@Equal E x (@Ap F E g x0)))) (_ : @ex (Carrier F) (fun x : Carrier F => and (@in_part F x (@compl F (@image E F f X))) (@Equal E y (@Ap F E g x)))), @Equal E x y *) intros H'5 H'6; try assumption. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E x y *) elim H'6; intros x0 E0; elim E0; intros H'7 H'8; try exact H'7; clear E0 H'6. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E x y *) elim H'5; intros x1 E0; elim E0; intros H'6 H'9; try exact H'6; clear E0 H'5. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E x y *) apply Trans with (Ap g x1); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E (@Ap F E g x1) y *) apply Trans with (Ap g x0); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal E (@Ap F E g x1) (@Ap F E g x0) *) cut (Equal x1 x0). (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F x1 x0 *) (* Goal: forall _ : @Equal F x1 x0, @Equal E (@Ap F E g x1) (@Ap F E g x0) *) auto with algebra. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F x1 x0 *) cut (Equal (Ap (Id F) x1) (Ap (Id F) x0)). (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap F F (Id F) x1) (@Ap F F (Id F) x0) *) (* Goal: forall _ : @Equal F (@Ap F F (Id F) x1) (@Ap F F (Id F) x0), @Equal F x1 x0 *) auto with algebra. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap F F (Id F) x1) (@Ap F F (Id F) x0) *) cut (Equal (Ap (comp_map_map g1 g) x1) (Ap (comp_map_map g1 g) x0)). (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap F F (@comp_map_map F E F g1 g) x1) (@Ap F F (@comp_map_map F E F g1 g) x0) *) (* Goal: forall _ : @Equal F (@Ap F F (@comp_map_map F E F g1 g) x1) (@Ap F F (@comp_map_map F E F g1 g) x0), @Equal F (@Ap F F (Id F) x1) (@Ap F F (Id F) x0) *) intros H'5; try assumption. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap F F (@comp_map_map F E F g1 g) x1) (@Ap F F (@comp_map_map F E F g1 g) x0) *) (* Goal: @Equal F (@Ap F F (Id F) x1) (@Ap F F (Id F) x0) *) apply Trans with (Ap (comp_map_map g1 g) x0); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap F F (@comp_map_map F E F g1 g) x1) (@Ap F F (@comp_map_map F E F g1 g) x0) *) (* Goal: @Equal F (@Ap F F (Id F) x1) (@Ap F F (@comp_map_map F E F g1 g) x0) *) apply Trans with (Ap (comp_map_map g1 g) x1); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap F F (@comp_map_map F E F g1 g) x1) (@Ap F F (@comp_map_map F E F g1 g) x0) *) simpl in |- *. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@comp_map_fun F E F g1 g x1) (@comp_map_fun F E F g1 g x0) *) unfold comp_map_fun in |- *. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap E F g1 (@Ap F E g x1)) (@Ap E F g1 (@Ap F E g x0)) *) apply Trans with (Ap g1 x); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap E F g1 x) (@Ap E F g1 (@Ap F E g x0)) *) apply Trans with (Ap g1 y); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap E F g1 x) (@Ap E F g1 y) *) apply Trans with (Ap b x); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap E F b x) (@Ap E F g1 y) *) (* Goal: @Equal F (@Ap E F g1 x) (@Ap E F b x) *) apply Sym; auto with algebra. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) (* Goal: @Equal F (@Ap E F b x) (@Ap E F g1 y) *) apply Trans with (Ap b y); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) (* Goal: @in_part E y (@image F E g (@compl F (@image E F f X))) *) apply in_part_comp_r with (compl X); auto with algebra. (* Goal: @surjective E F b *) (* Goal: @in_part E x (@image F E g (@compl F (@image E F f X))) *) apply in_part_comp_r with (compl X); auto with algebra. (* Goal: @surjective E F b *) red in |- *. (* Goal: forall y : Carrier F, @ex (Carrier E) (fun x : Carrier E => @Equal F y (@Ap E F b x)) *) intros y; try assumption. (* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F y (@Ap E F b x)) *) case (compl_not_compl (image f X) y); intros. (* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F y (@Ap E F b x)) *) (* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F y (@Ap E F b x)) *) generalize (image_in H). (* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F y (@Ap E F b x)) *) (* Goal: forall _ : @ex (Carrier E) (fun x : Carrier E => and (@in_part E x X) (@Equal F y (@Ap E F f x))), @ex (Carrier E) (fun x : Carrier E => @Equal F y (@Ap E F b x)) *) intros H'0; try assumption. (* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F y (@Ap E F b x)) *) (* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F y (@Ap E F b x)) *) elim H'0; intros x E0; elim E0; intros H'1 H'4; try exact H'1; clear E0 H'0. (* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F y (@Ap E F b x)) *) (* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F y (@Ap E F b x)) *) exists x; try assumption. (* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F y (@Ap E F b x)) *) (* Goal: @Equal F y (@Ap E F b x) *) apply Trans with (Ap f x); auto with algebra. (* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F y (@Ap E F b x)) *) (* Goal: @Equal F (@Ap E F f x) (@Ap E F b x) *) apply Sym; auto with algebra. (* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F y (@Ap E F b x)) *) exists (g y); try assumption. (* Goal: @Equal F y (@Ap E F b (@Ap F E g y)) *) apply Trans with (Ap g1 (Ap g y)); auto with algebra. (* Goal: @Equal F (@Ap E F g1 (@Ap F E g y)) (@Ap E F b (@Ap F E g y)) *) (* Goal: @Equal F y (@Ap E F g1 (@Ap F E g y)) *) apply Sym. (* Goal: @Equal F (@Ap E F g1 (@Ap F E g y)) (@Ap E F b (@Ap F E g y)) *) (* Goal: @Equal F (@Ap E F g1 (@Ap F E g y)) y *) apply Trans with (Ap (Id F) y); auto with algebra. (* Goal: @Equal F (@Ap E F g1 (@Ap F E g y)) (@Ap E F b (@Ap F E g y)) *) (* Goal: @Equal F (@Ap E F g1 (@Ap F E g y)) (@Ap F F (Id F) y) *) apply Trans with (Ap (comp_map_map g1 g) y); auto with algebra. (* Goal: @Equal F (@Ap E F g1 (@Ap F E g y)) (@Ap E F b (@Ap F E g y)) *) apply Sym. (* Goal: @Equal F (@Ap E F b (@Ap F E g y)) (@Ap E F g1 (@Ap F E g y)) *) apply H'3. (* Goal: not (@in_part E (@Ap F E g y) X) *) cut (in_part (Ap g y) (compl X)). (* Goal: @in_part E (@Ap F E g y) (@compl E X) *) (* Goal: forall _ : @in_part E (@Ap F E g y) (@compl E X), not (@in_part E (@Ap F E g y) X) *) auto with algebra. (* Goal: @in_part E (@Ap F E g y) (@compl E X) *) apply in_part_comp_r with (image g (compl (image f X))); auto with algebra. Qed. End Cantor_Bernstein.
Require Import nat_trees. Require Import search_trees. Require Import DeleteMax. Require Import Arith. Require Import Compare_dec. Inductive RM (n : nat) (t t' : nat_tree) : Prop := rm_intro : ~ occ t' n -> (forall p : nat, occ t' p -> occ t p) -> (forall p : nat, occ t p -> occ t' p \/ n = p) -> search t' -> RM n t t'. Hint Resolve rm_intro: searchtrees. Remark RM_0 : forall n : nat, RM n NIL NIL. Proof. (* Goal: forall n : nat, RM n NIL NIL *) intro n; apply rm_intro; auto with searchtrees arith. Qed. Hint Resolve RM_0: searchtrees. Remark RM_1 : forall n : nat, RM n (bin n NIL NIL) NIL. Proof. (* Goal: forall n : nat, RM n (bin n NIL NIL) NIL *) intros; apply rm_intro; auto with searchtrees arith. (* Goal: forall (p : nat) (_ : occ (bin n NIL NIL) p), or (occ NIL p) (@eq nat n p) *) intros p H; elim (occ_inv n _ _ _ H); auto with searchtrees arith. (* Goal: forall _ : or (occ NIL p) (occ NIL p), or (occ NIL p) (@eq nat n p) *) tauto. Qed. Hint Resolve RM_1: searchtrees. Remark rm_left : forall (n p : nat) (t1 t2 t' : nat_tree), p < n -> search (bin n t1 t2) -> RM p t1 t' -> RM p (bin n t1 t2) (bin n t' t2). Proof. (* Goal: forall (n p : nat) (t1 t2 t' : nat_tree) (_ : lt p n) (_ : search (bin n t1 t2)) (_ : RM p t1 t'), RM p (bin n t1 t2) (bin n t' t2) *) intros n p t1 t2 t' H H0 H1. (* Goal: RM p (bin n t1 t2) (bin n t' t2) *) apply rm_intro. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t' t2) p), occ (bin n t1 t2) p *) (* Goal: not (occ (bin n t' t2) p) *) unfold not in |- *; intro H2. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t' t2) p), occ (bin n t1 t2) p *) (* Goal: False *) elim (occ_inv n p t' t2). (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t' t2) p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t' t2) p *) (* Goal: forall _ : or (occ t' p) (occ t2 p), False *) (* Goal: forall _ : @eq nat n p, False *) intro eg; absurd (p < p); auto with searchtrees arith. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t' t2) p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t' t2) p *) (* Goal: forall _ : or (occ t' p) (occ t2 p), False *) (* Goal: lt p p *) pattern p at 2 in |- *; elim eg; auto with searchtrees arith. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t' t2) p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t' t2) p *) (* Goal: forall _ : or (occ t' p) (occ t2 p), False *) intro D; elim D; intro H3. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t' t2) p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t' t2) p *) (* Goal: False *) (* Goal: False *) elim H1; auto with searchtrees arith. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t' t2) p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t' t2) p *) (* Goal: False *) absurd (occ t2 p); auto with searchtrees arith. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t' t2) p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t' t2) p *) (* Goal: not (occ t2 p) *) apply not_right with n t1; auto with searchtrees arith. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t' t2) p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t' t2) p *) auto with searchtrees arith. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t' t2) p), occ (bin n t1 t2) p *) intros p0 H2. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: occ (bin n t1 t2) p0 *) elim (occ_inv n p0 t' t2). (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: occ (bin n t' t2) p0 *) (* Goal: forall _ : or (occ t' p0) (occ t2 p0), occ (bin n t1 t2) p0 *) (* Goal: forall _ : @eq nat n p0, occ (bin n t1 t2) p0 *) simple induction 1; auto with searchtrees arith. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: occ (bin n t' t2) p0 *) (* Goal: forall _ : or (occ t' p0) (occ t2 p0), occ (bin n t1 t2) p0 *) simple induction 1; auto with searchtrees arith. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: occ (bin n t' t2) p0 *) (* Goal: forall _ : occ t' p0, occ (bin n t1 t2) p0 *) intro; elim H1; auto with searchtrees arith. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: occ (bin n t' t2) p0 *) auto with searchtrees arith. (* Goal: search (bin n t' t2) *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) intros. (* Goal: search (bin n t' t2) *) (* Goal: or (occ (bin n t' t2) p0) (@eq nat p p0) *) elim (occ_inv n p0 t1 t2). (* Goal: search (bin n t' t2) *) (* Goal: occ (bin n t1 t2) p0 *) (* Goal: forall _ : or (occ t1 p0) (occ t2 p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: forall _ : @eq nat n p0, or (occ (bin n t' t2) p0) (@eq nat p p0) *) simple induction 1; auto with searchtrees arith. (* Goal: search (bin n t' t2) *) (* Goal: occ (bin n t1 t2) p0 *) (* Goal: forall _ : or (occ t1 p0) (occ t2 p0), or (occ (bin n t' t2) p0) (@eq nat p p0) *) simple induction 1; intro H4. (* Goal: search (bin n t' t2) *) (* Goal: occ (bin n t1 t2) p0 *) (* Goal: or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: or (occ (bin n t' t2) p0) (@eq nat p p0) *) elim H1. (* Goal: search (bin n t' t2) *) (* Goal: occ (bin n t1 t2) p0 *) (* Goal: or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: forall (_ : not (occ t' p)) (_ : forall (p : nat) (_ : occ t' p), occ t1 p) (_ : forall (p0 : nat) (_ : occ t1 p0), or (occ t' p0) (@eq nat p p0)) (_ : search t'), or (occ (bin n t' t2) p0) (@eq nat p p0) *) intros H5 H6 H7 H8. (* Goal: search (bin n t' t2) *) (* Goal: occ (bin n t1 t2) p0 *) (* Goal: or (occ (bin n t' t2) p0) (@eq nat p p0) *) (* Goal: or (occ (bin n t' t2) p0) (@eq nat p p0) *) elim (H7 p0 H4); auto with searchtrees arith. (* Goal: search (bin n t' t2) *) (* Goal: occ (bin n t1 t2) p0 *) (* Goal: or (occ (bin n t' t2) p0) (@eq nat p p0) *) auto with searchtrees arith. (* Goal: search (bin n t' t2) *) (* Goal: occ (bin n t1 t2) p0 *) auto with searchtrees arith. (* Goal: search (bin n t' t2) *) apply bin_search. (* Goal: min n t2 *) (* Goal: maj n t' *) (* Goal: search t2 *) (* Goal: search t' *) elim H1; auto with searchtrees arith. (* Goal: min n t2 *) (* Goal: maj n t' *) (* Goal: search t2 *) apply search_r with n t1; auto with searchtrees arith. (* Goal: min n t2 *) (* Goal: maj n t' *) apply maj_intro; intros q H2. (* Goal: min n t2 *) (* Goal: lt q n *) cut (occ t1 q). (* Goal: min n t2 *) (* Goal: occ t1 q *) (* Goal: forall _ : occ t1 q, lt q n *) intro; elim (maj_l n t1 t2 H0); intros; auto with searchtrees arith. (* Goal: min n t2 *) (* Goal: occ t1 q *) auto with searchtrees arith. (* Goal: min n t2 *) (* Goal: occ t1 q *) elim H1; auto with searchtrees arith. (* Goal: min n t2 *) apply min_r with t1; auto with searchtrees arith. Qed. Hint Resolve rm_left: searchtrees. Remark rm_right : forall (n p : nat) (t1 t2 t' : nat_tree), n < p -> search (bin n t1 t2) -> RM p t2 t' -> RM p (bin n t1 t2) (bin n t1 t'). Proof. (* Goal: forall (n p : nat) (t1 t2 t' : nat_tree) (_ : lt n p) (_ : search (bin n t1 t2)) (_ : RM p t2 t'), RM p (bin n t1 t2) (bin n t1 t') *) intros n p t1 t2 t' H H0 H1. (* Goal: RM p (bin n t1 t2) (bin n t1 t') *) apply rm_intro. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t1 t') p), occ (bin n t1 t2) p *) (* Goal: not (occ (bin n t1 t') p) *) unfold not in |- *; intro H2. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t1 t') p), occ (bin n t1 t2) p *) (* Goal: False *) elim (occ_inv n p t1 t'). (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t1 t') p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t1 t') p *) (* Goal: forall _ : or (occ t1 p) (occ t' p), False *) (* Goal: forall _ : @eq nat n p, False *) intro eg; absurd (p < p); auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t1 t') p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t1 t') p *) (* Goal: forall _ : or (occ t1 p) (occ t' p), False *) (* Goal: lt p p *) pattern p at 1 in |- *; elim eg; auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t1 t') p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t1 t') p *) (* Goal: forall _ : or (occ t1 p) (occ t' p), False *) intro D; elim D; intro H3. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t1 t') p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t1 t') p *) (* Goal: False *) (* Goal: False *) elim H1; auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t1 t') p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t1 t') p *) (* Goal: False *) (* Goal: forall (_ : not (occ t' p)) (_ : forall (p : nat) (_ : occ t' p), occ t2 p) (_ : forall (p0 : nat) (_ : occ t2 p0), or (occ t' p0) (@eq nat p p0)) (_ : search t'), False *) absurd (occ t1 p). (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t1 t') p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t1 t') p *) (* Goal: False *) (* Goal: occ t1 p *) (* Goal: not (occ t1 p) *) apply not_left with n t2; auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t1 t') p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t1 t') p *) (* Goal: False *) (* Goal: occ t1 p *) auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t1 t') p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t1 t') p *) (* Goal: False *) elim H1; auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t1 t') p), occ (bin n t1 t2) p *) (* Goal: occ (bin n t1 t') p *) auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: forall (p : nat) (_ : occ (bin n t1 t') p), occ (bin n t1 t2) p *) intros p0 H2. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: occ (bin n t1 t2) p0 *) elim (occ_inv n p0 t1 t'). (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: occ (bin n t1 t') p0 *) (* Goal: forall _ : or (occ t1 p0) (occ t' p0), occ (bin n t1 t2) p0 *) (* Goal: forall _ : @eq nat n p0, occ (bin n t1 t2) p0 *) simple induction 1; auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: occ (bin n t1 t') p0 *) (* Goal: forall _ : or (occ t1 p0) (occ t' p0), occ (bin n t1 t2) p0 *) simple induction 1; auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: occ (bin n t1 t') p0 *) (* Goal: forall _ : occ t' p0, occ (bin n t1 t2) p0 *) intro; elim H1; auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: occ (bin n t1 t') p0 *) auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: forall (p0 : nat) (_ : occ (bin n t1 t2) p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) intros. (* Goal: search (bin n t1 t') *) (* Goal: or (occ (bin n t1 t') p0) (@eq nat p p0) *) elim (occ_inv n p0 t1 t2). (* Goal: search (bin n t1 t') *) (* Goal: occ (bin n t1 t2) p0 *) (* Goal: forall _ : or (occ t1 p0) (occ t2 p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) (* Goal: forall _ : @eq nat n p0, or (occ (bin n t1 t') p0) (@eq nat p p0) *) simple induction 1; auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: occ (bin n t1 t2) p0 *) (* Goal: forall _ : or (occ t1 p0) (occ t2 p0), or (occ (bin n t1 t') p0) (@eq nat p p0) *) simple induction 1; auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: occ (bin n t1 t2) p0 *) (* Goal: forall _ : occ t2 p0, or (occ (bin n t1 t') p0) (@eq nat p p0) *) intro H4. (* Goal: search (bin n t1 t') *) (* Goal: occ (bin n t1 t2) p0 *) (* Goal: or (occ (bin n t1 t') p0) (@eq nat p p0) *) elim H1; intros H5 H6 H7 H8. (* Goal: search (bin n t1 t') *) (* Goal: occ (bin n t1 t2) p0 *) (* Goal: or (occ (bin n t1 t') p0) (@eq nat p p0) *) elim (H7 p0 H4); auto with searchtrees arith. (* Goal: search (bin n t1 t') *) (* Goal: occ (bin n t1 t2) p0 *) auto with searchtrees arith. (* Goal: search (bin n t1 t') *) apply bin_search. (* Goal: min n t' *) (* Goal: maj n t1 *) (* Goal: search t' *) (* Goal: search t1 *) apply search_l with n t2; auto with searchtrees arith. (* Goal: min n t' *) (* Goal: maj n t1 *) (* Goal: search t' *) elim H1; auto with searchtrees arith. (* Goal: min n t' *) (* Goal: maj n t1 *) apply maj_l with t2; auto with searchtrees arith. (* Goal: min n t' *) apply min_intro; intros q H2. (* Goal: lt n q *) cut (occ t2 q). (* Goal: occ t2 q *) (* Goal: forall _ : occ t2 q, lt n q *) intro. (* Goal: occ t2 q *) (* Goal: lt n q *) elim (min_r n t1 t2 H0); auto with searchtrees arith. (* Goal: occ t2 q *) elim H1; auto with searchtrees arith. Qed. Hint Resolve rm_right: searchtrees. Remark rm_NILt : forall (n : nat) (t : nat_tree), search (bin n NIL t) -> RM n (bin n NIL t) t. Proof. (* Goal: forall (n : nat) (t : nat_tree) (_ : search (bin n NIL t)), RM n (bin n NIL t) t *) intros; apply rm_intro. (* Goal: search t *) (* Goal: forall (p : nat) (_ : occ (bin n NIL t) p), or (occ t p) (@eq nat n p) *) (* Goal: forall (p : nat) (_ : occ t p), occ (bin n NIL t) p *) (* Goal: not (occ t n) *) apply not_right with n NIL; auto with searchtrees arith. (* Goal: search t *) (* Goal: forall (p : nat) (_ : occ (bin n NIL t) p), or (occ t p) (@eq nat n p) *) (* Goal: forall (p : nat) (_ : occ t p), occ (bin n NIL t) p *) auto with searchtrees arith. (* Goal: search t *) (* Goal: forall (p : nat) (_ : occ (bin n NIL t) p), or (occ t p) (@eq nat n p) *) intros p H1; elim (occ_inv n p NIL t H1); intro H2. (* Goal: search t *) (* Goal: or (occ t p) (@eq nat n p) *) (* Goal: or (occ t p) (@eq nat n p) *) right; auto with searchtrees arith. (* Goal: search t *) (* Goal: or (occ t p) (@eq nat n p) *) elim H2; intro. (* Goal: search t *) (* Goal: or (occ t p) (@eq nat n p) *) (* Goal: or (occ t p) (@eq nat n p) *) absurd (occ NIL p); auto with searchtrees arith. (* Goal: search t *) (* Goal: or (occ t p) (@eq nat n p) *) left; auto with searchtrees arith. (* Goal: search t *) apply search_r with n NIL; auto with searchtrees arith. Qed. Hint Resolve rm_NILt: searchtrees. Section rm_root. Variable n p : nat. Variable t1 t2 t' : nat_tree. Hypothesis S : search (bin n (bin p t1 t2) t'). Variable q : nat. Variable t0 : nat_tree. Hypothesis R : RMAX (bin p t1 t2) t0 q. Hint Resolve S: searchtrees. Remark rm_2 : q < n. Proof. (* Goal: lt q n *) elim R. (* Goal: forall (_ : occ (bin p t1 t2) q) (_ : forall (p0 : nat) (_ : occ (bin p t1 t2) p0), le p0 q) (_ : forall (q : nat) (_ : occ t0 q), occ (bin p t1 t2) q) (_ : forall (q0 : nat) (_ : occ (bin p t1 t2) q0), or (occ t0 q0) (@eq nat q q0)) (_ : not (occ t0 q)) (_ : search t0), lt q n *) intros. (* Goal: lt q n *) elim (maj_l n (bin p t1 t2) t'). (* Goal: search (bin n (bin p t1 t2) t') *) (* Goal: forall _ : forall (q : nat) (_ : occ (bin p t1 t2) q), lt q n, lt q n *) auto with searchtrees arith. (* Goal: search (bin n (bin p t1 t2) t') *) auto with searchtrees arith. Qed. Hint Resolve rm_2: searchtrees. Remark rm_3 : ~ occ (bin q t0 t') n. Proof. (* Goal: not (occ (bin q t0 t') n) *) unfold not in |- *; intro H. (* Goal: False *) elim (occ_inv q n t0 t'). (* Goal: occ (bin q t0 t') n *) (* Goal: forall _ : or (occ t0 n) (occ t' n), False *) (* Goal: forall _ : @eq nat q n, False *) intro eg; absurd (q < q); auto with searchtrees arith. (* Goal: occ (bin q t0 t') n *) (* Goal: forall _ : or (occ t0 n) (occ t' n), False *) (* Goal: lt q q *) pattern q at 2 in |- *; rewrite eg; auto with searchtrees arith. (* Goal: occ (bin q t0 t') n *) (* Goal: forall _ : or (occ t0 n) (occ t' n), False *) intro D; elim D; intro H'. (* Goal: occ (bin q t0 t') n *) (* Goal: False *) (* Goal: False *) elim R; intros H0 H1 H2 H3 H4 H5. (* Goal: occ (bin q t0 t') n *) (* Goal: False *) (* Goal: False *) absurd (occ (bin p t1 t2) n); auto with searchtrees arith. (* Goal: occ (bin q t0 t') n *) (* Goal: False *) (* Goal: not (occ (bin p t1 t2) n) *) apply not_left with n t'; auto with searchtrees arith. (* Goal: occ (bin q t0 t') n *) (* Goal: False *) absurd (occ t' n); auto with searchtrees arith. (* Goal: occ (bin q t0 t') n *) (* Goal: not (occ t' n) *) apply not_right with n (bin p t1 t2); auto with searchtrees arith. (* Goal: occ (bin q t0 t') n *) auto with searchtrees arith. Qed. Hint Resolve rm_3: searchtrees. Remark rm_4 : forall p0 : nat, occ (bin q t0 t') p0 -> occ (bin n (bin p t1 t2) t') p0. Proof. (* Goal: forall (p0 : nat) (_ : occ (bin q t0 t') p0), occ (bin n (bin p t1 t2) t') p0 *) intros p0 H. (* Goal: occ (bin n (bin p t1 t2) t') p0 *) elim (occ_inv q p0 t0 t' H). (* Goal: forall _ : or (occ t0 p0) (occ t' p0), occ (bin n (bin p t1 t2) t') p0 *) (* Goal: forall _ : @eq nat q p0, occ (bin n (bin p t1 t2) t') p0 *) intro eg. (* Goal: forall _ : or (occ t0 p0) (occ t' p0), occ (bin n (bin p t1 t2) t') p0 *) (* Goal: occ (bin n (bin p t1 t2) t') p0 *) elim R; rewrite eg; auto with searchtrees arith. (* Goal: forall _ : or (occ t0 p0) (occ t' p0), occ (bin n (bin p t1 t2) t') p0 *) simple induction 1; auto with searchtrees arith. (* Goal: forall _ : occ t0 p0, occ (bin n (bin p t1 t2) t') p0 *) intro H'. (* Goal: occ (bin n (bin p t1 t2) t') p0 *) elim R; auto with searchtrees arith. Qed. Hint Resolve rm_4: searchtrees. Remark rm_5 : forall p0 : nat, occ (bin n (bin p t1 t2) t') p0 -> occ (bin q t0 t') p0 \/ n = p0. Proof. (* Goal: forall (p0 : nat) (_ : occ (bin n (bin p t1 t2) t') p0), or (occ (bin q t0 t') p0) (@eq nat n p0) *) intros p0 H. (* Goal: or (occ (bin q t0 t') p0) (@eq nat n p0) *) elim (occ_inv n p0 (bin p t1 t2) t'). (* Goal: occ (bin n (bin p t1 t2) t') p0 *) (* Goal: forall _ : or (occ (bin p t1 t2) p0) (occ t' p0), or (occ (bin q t0 t') p0) (@eq nat n p0) *) (* Goal: forall _ : @eq nat n p0, or (occ (bin q t0 t') p0) (@eq nat n p0) *) simple induction 1; auto with searchtrees arith. (* Goal: occ (bin n (bin p t1 t2) t') p0 *) (* Goal: forall _ : or (occ (bin p t1 t2) p0) (occ t' p0), or (occ (bin q t0 t') p0) (@eq nat n p0) *) simple induction 1. (* Goal: occ (bin n (bin p t1 t2) t') p0 *) (* Goal: forall _ : occ t' p0, or (occ (bin q t0 t') p0) (@eq nat n p0) *) (* Goal: forall _ : occ (bin p t1 t2) p0, or (occ (bin q t0 t') p0) (@eq nat n p0) *) intro H1. (* Goal: occ (bin n (bin p t1 t2) t') p0 *) (* Goal: forall _ : occ t' p0, or (occ (bin q t0 t') p0) (@eq nat n p0) *) (* Goal: or (occ (bin q t0 t') p0) (@eq nat n p0) *) elim R; intros H2 H3 H4 H5 H6 H7. (* Goal: occ (bin n (bin p t1 t2) t') p0 *) (* Goal: forall _ : occ t' p0, or (occ (bin q t0 t') p0) (@eq nat n p0) *) (* Goal: or (occ (bin q t0 t') p0) (@eq nat n p0) *) elim (H5 p0 H1). (* Goal: occ (bin n (bin p t1 t2) t') p0 *) (* Goal: forall _ : occ t' p0, or (occ (bin q t0 t') p0) (@eq nat n p0) *) (* Goal: forall _ : @eq nat q p0, or (occ (bin q t0 t') p0) (@eq nat n p0) *) (* Goal: forall _ : occ t0 p0, or (occ (bin q t0 t') p0) (@eq nat n p0) *) intro; left; auto with searchtrees arith. (* Goal: occ (bin n (bin p t1 t2) t') p0 *) (* Goal: forall _ : occ t' p0, or (occ (bin q t0 t') p0) (@eq nat n p0) *) (* Goal: forall _ : @eq nat q p0, or (occ (bin q t0 t') p0) (@eq nat n p0) *) simple induction 1; left; auto with searchtrees arith. (* Goal: occ (bin n (bin p t1 t2) t') p0 *) (* Goal: forall _ : occ t' p0, or (occ (bin q t0 t') p0) (@eq nat n p0) *) intro; left; auto with searchtrees arith. (* Goal: occ (bin n (bin p t1 t2) t') p0 *) auto with searchtrees arith. Qed. Hint Resolve rm_5: searchtrees. Remark rm_6 : search (bin q t0 t'). Proof. (* Goal: search (bin q t0 t') *) apply bin_search. (* Goal: min q t' *) (* Goal: maj q t0 *) (* Goal: search t' *) (* Goal: search t0 *) elim R; auto with searchtrees arith. (* Goal: min q t' *) (* Goal: maj q t0 *) (* Goal: search t' *) apply search_r with n (bin p t1 t2); auto with searchtrees arith. (* Goal: min q t' *) (* Goal: maj q t0 *) elim R; intros H H0 H1 H2 H3 H4. (* Goal: min q t' *) (* Goal: maj q t0 *) apply maj_intro. (* Goal: min q t' *) (* Goal: forall (q0 : nat) (_ : occ t0 q0), lt q0 q *) intros q0 H5; elim (le_lt_or_eq q0 q (H0 q0 (H1 q0 H5))). (* Goal: min q t' *) (* Goal: forall _ : @eq nat q0 q, lt q0 q *) (* Goal: forall _ : lt q0 q, lt q0 q *) auto with searchtrees arith. (* Goal: min q t' *) (* Goal: forall _ : @eq nat q0 q, lt q0 q *) intro eg; absurd (occ t0 q0). (* Goal: min q t' *) (* Goal: occ t0 q0 *) (* Goal: not (occ t0 q0) *) rewrite eg; auto with searchtrees arith. (* Goal: min q t' *) (* Goal: occ t0 q0 *) auto with searchtrees arith. (* Goal: min q t' *) apply min_intro. (* Goal: forall (q0 : nat) (_ : occ t' q0), lt q q0 *) intros q0 H. (* Goal: lt q q0 *) apply lt_trans with n. (* Goal: lt n q0 *) (* Goal: lt q n *) elim R; auto with searchtrees arith. (* Goal: lt n q0 *) elim (min_r n (bin p t1 t2) t'). (* Goal: search (bin n (bin p t1 t2) t') *) (* Goal: forall _ : forall (q : nat) (_ : occ t' q), lt n q, lt n q0 *) auto with searchtrees arith. (* Goal: search (bin n (bin p t1 t2) t') *) auto with searchtrees arith. Qed. Hint Resolve rm_6: searchtrees. Lemma rm_root_lemma : RM n (bin n (bin p t1 t2) t') (bin q t0 t'). Proof. (* Goal: RM n (bin n (bin p t1 t2) t') (bin q t0 t') *) apply rm_intro; auto with searchtrees arith. Qed. End rm_root. Theorem rm : forall (n : nat) (t : nat_tree), search t -> {t' : nat_tree | RM n t t'}. Proof. (* Goal: forall (n : nat) (t : nat_tree) (_ : search t), @sig nat_tree (fun t' : nat_tree => RM n t t') *) simple induction t; [ intros s; exists NIL | intros p; elim (le_gt_dec n p); intros h; [ elim (le_lt_eq_dec n p h); intros h'; [ intros t1 hr1 t2 hr2 s; elim hr1; [ intros t3 h3; exists (bin p t3 t2) | idtac ] | intros t1; case t1; [ intros hr1 t2 hr2 s; exists t2 | intros p' t1' t2' hr1 t2 hr2 s; elim (rmax (bin p' t1' t2')); [ intros q ex; elim ex; intros t' H; exists (bin q t' t2) | idtac | idtac ] ] ] | intros t1 hr1 t2 hr2 s; elim hr2; [ intros t3 h3; exists (bin p t1 t3) | idtac ] ] ]; auto with searchtrees arith. (* Goal: search t2 *) (* Goal: search (bin p' t1' t2') *) (* Goal: RM n (bin p (bin p' t1' t2') t2) (bin q t' t2) *) (* Goal: RM n (bin p NIL t2) t2 *) (* Goal: search t1 *) eapply search_l; eauto with searchtrees arith. (* Goal: search t2 *) (* Goal: search (bin p' t1' t2') *) (* Goal: RM n (bin p (bin p' t1' t2') t2) (bin q t' t2) *) (* Goal: RM n (bin p NIL t2) t2 *) rewrite h'; apply rm_NILt; auto with searchtrees arith. (* Goal: search t2 *) (* Goal: search (bin p' t1' t2') *) (* Goal: RM n (bin p (bin p' t1' t2') t2) (bin q t' t2) *) rewrite h'; apply rm_root_lemma; auto with searchtrees arith. (* Goal: search t2 *) (* Goal: search (bin p' t1' t2') *) eapply search_l; eauto with searchtrees arith. (* Goal: search t2 *) eapply search_r; eauto with searchtrees arith. Qed.
Set Implicit Arguments. Unset Strict Implicit. Require Export Group_cat. Require Export Sgroup_facts. Require Export Monoid_facts. Section Lemmas. Variable G : GROUP. Lemma GROUP_comp : forall x x' : G, Equal x x' -> Equal (group_inverse _ x) (group_inverse _ x'). Proof. (* Goal: forall (x x' : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x x'), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G x) (group_inverse G x') *) unfold group_inverse in |- *. (* Goal: forall (x x' : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x x'), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G))) (@group_inverse_map (group_monoid G) (group_on_def G)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G))) (@group_inverse_map (group_monoid G) (group_on_def G)) x') *) auto with algebra. Qed. Lemma GROUP_inverse_r : forall x : G, Equal (sgroup_law _ x (group_inverse _ x)) (monoid_unit G). Proof. (* Goal: forall x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *) intros; apply (group_inverse_r_prf G x); auto with algebra. Qed. Lemma GROUP_inverse_l : forall x : G, Equal (sgroup_law _ (group_inverse _ x) x) (monoid_unit G). Proof. (* Goal: forall x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x) x) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *) intros; apply (group_inverse_l_prf G x); auto with algebra. Qed. Hint Resolve GROUP_comp GROUP_inverse_r GROUP_inverse_l: algebra. Lemma GROUP_unit_inverse : Equal (group_inverse _ (monoid_unit G)) (monoid_unit G). Proof. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *) apply Trans with (sgroup_law _ (group_inverse _ (monoid_unit G)) (monoid_unit G)); auto with algebra. Qed. Lemma GROUP_reg_left : forall x y z : G, Equal (sgroup_law _ x y) (sgroup_law _ x z) -> Equal y z. Proof. (* Goal: forall (x y z : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x y) (sgroup_law (monoid_sgroup (group_monoid G)) x z)), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) y z *) intros x y z H'; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) y z *) apply Trans with (sgroup_law _ (sgroup_law _ (group_inverse _ x) x) y); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x) x) y) z *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) y (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x) x) y) *) apply Trans with (sgroup_law _ (monoid_unit G) y); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x) x) y) z *) apply Trans with (sgroup_law _ (group_inverse _ x) (sgroup_law _ x y)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x) (sgroup_law (monoid_sgroup (group_monoid G)) x y)) z *) apply Trans with (sgroup_law _ (group_inverse _ x) (sgroup_law _ x z)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x) (sgroup_law (monoid_sgroup (group_monoid G)) x z)) z *) apply Trans with (sgroup_law _ (sgroup_law _ (group_inverse _ x) x) z); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x) x) z) z *) apply Trans with (sgroup_law _ (monoid_unit G) z); auto with algebra. Qed. Lemma GROUP_reg_right : forall x y z : G, Equal (sgroup_law _ y x) (sgroup_law _ z x) -> Equal y z. Proof. (* Goal: forall (x y z : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) y x) (sgroup_law (monoid_sgroup (group_monoid G)) z x)), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) y z *) intros x y z H'; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) y z *) apply Trans with (sgroup_law _ y (sgroup_law _ x (group_inverse _ x))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x))) z *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) y (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x))) *) apply Trans with (sgroup_law _ y (monoid_unit G)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x))) z *) apply Trans with (sgroup_law _ (sgroup_law _ y x) (group_inverse _ x)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y x) (group_inverse G x)) z *) apply Trans with (sgroup_law _ (sgroup_law _ z x) (group_inverse _ x)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z x) (group_inverse G x)) z *) apply Trans with (sgroup_law _ z (sgroup_law _ x (group_inverse _ x))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x))) z *) apply Trans with (sgroup_law _ z (monoid_unit G)); auto with algebra. Qed. Lemma GROUP_inverse_inverse : forall x : G, Equal (group_inverse _ (group_inverse _ x)) x. Proof. (* Goal: forall x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (group_inverse G x)) x *) intros x; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (group_inverse G x)) x *) apply GROUP_reg_right with (group_inverse _ x). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (group_inverse G x)) (group_inverse G x)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x)) *) apply Trans with (monoid_unit G); auto with algebra. Qed. Lemma GROUP_law_inverse : forall x y : G, Equal (sgroup_law _ x y) (monoid_unit G) -> Equal (group_inverse _ x) y. Proof. (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x y) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G x) y *) intros x y H'; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G x) y *) apply GROUP_reg_left with x. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) *) apply Trans with (monoid_unit G); auto with algebra. Qed. Lemma GROUP_inverse_law : forall x y : G, Equal (group_inverse _ (sgroup_law _ x y)) (sgroup_law _ (group_inverse _ y) (group_inverse _ x)). Proof. (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x y)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)) *) intros x y; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x y)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)) *) apply GROUP_law_inverse. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *) apply Trans with (sgroup_law G x (sgroup_law G y (sgroup_law G (group_inverse _ y) (group_inverse _ x)))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *) apply Trans with (sgroup_law G x (sgroup_law G (sgroup_law G y (group_inverse _ y)) (group_inverse _ x))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G y)) (group_inverse G x))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *) apply Trans with (sgroup_law G x (sgroup_law G (monoid_unit G) (group_inverse _ x))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (group_inverse G x))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *) apply Trans with (sgroup_law G x (group_inverse _ x)); auto with algebra. Qed. End Lemmas. Section Lemmas2. Variable G F : GROUP. Variable f : Hom G F. Lemma GROUP_hom_prop : forall x : G, Equal (f (group_inverse _ x)) (group_inverse _ (f x)). Proof. (* Goal: forall x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid F))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid F))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid F)) (@monoid_sgroup_hom (group_monoid G) (group_monoid F) f)) (group_inverse G x)) (group_inverse F (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid F))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid F)) (@monoid_sgroup_hom (group_monoid G) (group_monoid F) f)) x)) *) intros x; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid F))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid F))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid F)) (@monoid_sgroup_hom (group_monoid G) (group_monoid F) f)) (group_inverse G x)) (group_inverse F (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid F))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid F)) (@monoid_sgroup_hom (group_monoid G) (group_monoid F) f)) x)) *) apply Sym. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid F))) (group_inverse F (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid F))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid F)) (@monoid_sgroup_hom (group_monoid G) (group_monoid F) f)) x)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid F))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid F)) (@monoid_sgroup_hom (group_monoid G) (group_monoid F) f)) (group_inverse G x)) *) apply GROUP_law_inverse. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid F))) (sgroup_law (monoid_sgroup (group_monoid F)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid F))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid F)) (@monoid_sgroup_hom (group_monoid G) (group_monoid F) f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid F))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid F)) (@monoid_sgroup_hom (group_monoid G) (group_monoid F) f)) (group_inverse G x))) (@monoid_unit (monoid_sgroup (group_monoid F)) (monoid_on_def (group_monoid F))) *) apply Trans with (f (sgroup_law _ x (group_inverse _ x))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid F))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid F))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid F)) (@monoid_sgroup_hom (group_monoid G) (group_monoid F) f)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x))) (@monoid_unit (monoid_sgroup (group_monoid F)) (monoid_on_def (group_monoid F))) *) apply Trans with (f (monoid_unit G)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid F))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid F))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid F)) (@monoid_sgroup_hom (group_monoid G) (group_monoid F) f)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid F))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid F)) (@monoid_sgroup_hom (group_monoid G) (group_monoid F) f)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) *) cut (Equal (sgroup_law G x (group_inverse _ x)) (monoid_unit G)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *) (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid F))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid F))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid F)) (@monoid_sgroup_hom (group_monoid G) (group_monoid F) f)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid F))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid F)) (@monoid_sgroup_hom (group_monoid G) (group_monoid F) f)) (@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))) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *) apply GROUP_inverse_r. Qed. End Lemmas2. Hint Resolve GROUP_comp GROUP_inverse_r GROUP_inverse_l GROUP_unit_inverse GROUP_reg_left GROUP_reg_right GROUP_inverse_inverse GROUP_law_inverse GROUP_inverse_law: algebra. Hint Resolve GROUP_hom_prop: algebra.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrbool ssrfun eqtype ssrnat seq div choice fintype. From mathcomp Require Import tuple finfun bigop ssralg poly polydiv. From mathcomp Require Import finset fingroup morphism quotient perm action zmodp cyclic. From mathcomp Require Import matrix mxalgebra vector falgebra fieldext separable. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Reserved Notation "''Gal' ( A / B )" (at level 8, A at level 35, format "''Gal' ( A / B )"). Import GroupScope GRing.Theory. Local Open Scope ring_scope. Section SplittingFieldFor. Variables (F : fieldType) (L : fieldExtType F). Definition splittingFieldFor (U : {vspace L}) (p : {poly L}) (V : {vspace L}) := exists2 rs, p %= \prod_(z <- rs) ('X - z%:P) & <<U & rs>>%VS = V. Lemma splittingFieldForS (K M E : {subfield L}) p : (K <= M)%VS -> (M <= E)%VS -> splittingFieldFor K p E -> splittingFieldFor M p E. End SplittingFieldFor. Section kHom. Variables (F : fieldType) (L : fieldExtType F). Implicit Types (U V : {vspace L}) (K E : {subfield L}) (f g : 'End(L)). Definition kHom U V f := ahom_in V f && (U <= fixedSpace f)%VS. Lemma kHomP {K V f} : reflect [/\ {in V &, forall x y, f (x * y) = f x * f y} & {in K, forall x, f x = x}] (kHom K V f). Proof. (* Goal: Bool.reflect (and (@prop_in2 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) V)) (fun x y : GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x y)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f y))) (inPhantom (forall x y : GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x y)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f y))))) (@prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x) x) (inPhantom (forall x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x) x)))) (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) V f) *) apply: (iffP andP) => [[/ahom_inP[fM _] /subvP idKf] | [fM idKf]]. (* Goal: and (is_true (@ahom_in F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) V f)) (is_true (@subsetv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@fixedSpace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f))) *) (* Goal: and (@prop_in2 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) V)) (fun x y : GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x y)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f y))) (inPhantom (forall x y : GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x y)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f y))))) (@prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x) x) (inPhantom (forall x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x) x))) *) by split=> // x /idKf/fixedSpaceP. (* Goal: and (is_true (@ahom_in F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) V f)) (is_true (@subsetv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@fixedSpace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f))) *) split; last by apply/subvP=> x /idKf/fixedSpaceP. (* Goal: is_true (@ahom_in F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) V f) *) by apply/ahom_inP; split=> //; rewrite idKf ?mem1v. Qed. Lemma kAHomP {U V} {f : 'AEnd(L)} : reflect {in U, forall x, f x = x} (kHom U V f). Proof. (* Goal: Bool.reflect (@prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) U)) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) x) x) (inPhantom (forall x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) x) x))) (kHom U V (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f)) *) by rewrite /kHom ahomWin; apply: fixedSpacesP. Qed. Lemma kHom1 U V : kHom U V \1. Proof. (* Goal: is_true (kHom U V (@id_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) by apply/kAHomP => u _; rewrite lfunE. Qed. Lemma k1HomE V f : kHom 1 V f = ahom_in V f. Proof. (* Goal: @eq bool (kHom (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) V f) (@ahom_in F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) V f) *) by apply: andb_idr => /ahom_inP[_ f1]; apply/fixedSpaceP. Qed. Lemma kHom_lrmorphism (f : 'End(L)) : reflect (lrmorphism f) (kHom 1 {:L} f). Proof. (* Goal: Bool.reflect (@GRing.LRMorphism.class_of (GRing.Field.ringType F) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.scale (GRing.Field.ringType F) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f)) (kHom (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) f) *) by rewrite k1HomE; apply: ahomP. Qed. Lemma k1AHom V (f : 'AEnd(L)) : kHom 1 V f. Proof. (* Goal: is_true (kHom (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) V (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f)) *) by rewrite k1HomE ahomWin. Qed. Lemma kHom_poly_id K E f p : kHom K E f -> p \is a polyOver K -> map_poly f p = p. Proof. (* Goal: forall (_ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) f)) (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))), @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) p) p *) by case/kHomP=> _ idKf /polyOverP Kp; apply/polyP=> i; rewrite coef_map /= idKf. Qed. Lemma kHomSl U1 U2 V f : (U1 <= U2)%VS -> kHom U2 V f -> kHom U1 V f. Proof. (* Goal: forall (_ : is_true (@subsetv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) U1 U2)) (_ : is_true (kHom U2 V f)), is_true (kHom U1 V f) *) by rewrite /kHom => sU12 /andP[-> /(subv_trans sU12)]. Qed. Lemma kHomSr K V1 V2 f : (V1 <= V2)%VS -> kHom K V2 f -> kHom K V1 f. Proof. (* Goal: forall (_ : is_true (@subsetv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) V1 V2)) (_ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) V2 f)), is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) V1 f) *) by move/subvP=> sV12 /kHomP[/(sub_in2 sV12)fM idKf]; apply/kHomP. Qed. Lemma kHomS K1 K2 V1 V2 f : (K1 <= K2)%VS -> (V1 <= V2)%VS -> kHom K2 V2 f -> kHom K1 V1 f. Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K1) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K2))) (_ : is_true (@subsetv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) V1 V2)) (_ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K2) V2 f)), is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K1) V1 f) *) by move=> sK12 sV12 /(kHomSl sK12)/(kHomSr sV12). Qed. Lemma kHom_eq K E f g : (K <= E)%VS -> {in E, f =1 g} -> kHom K E f = kHom K E g. Lemma kHom_inv K E f : kHom K E f -> {in E, {morph f : x / x^-1}}. Proof. (* Goal: forall _ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) f), @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f ((fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x0) x)) ((fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x0) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x))) (inPhantom (@morphism_1 (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x))) *) case/kHomP=> fM idKf x Ex. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x)) (@GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x)) *) case (eqVneq x 0) => [-> | nz_x]; first by rewrite linear0 invr0 linear0. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x)) (@GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x)) *) have fxV: f x * f x^-1 = 1 by rewrite -fM ?rpredV ?divff // idKf ?mem1v. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x)) (@GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x)) *) have Ufx: f x \is a GRing.unit by apply/unitrPr; exists (f x^-1). (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x)) (@GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x)) *) by apply: (mulrI Ufx); rewrite divrr. Qed. Lemma kHom_dim K E f : kHom K E f -> \dim (f @: E) = \dim E. Proof. (* Goal: forall _ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) f), @eq nat (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@lfun_img F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) *) move=> homKf; have [fM idKf] := kHomP homKf. (* Goal: @eq nat (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@lfun_img F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) *) apply/limg_dim_eq/eqP; rewrite -subv0; apply/subvP=> v. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) v (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@capv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@lker F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f))))), is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) v (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))))) *) rewrite memv_cap memv0 memv_ker => /andP[Ev]; apply: contraLR => nz_v. (* Goal: is_true (negb (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f v) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) *) by rewrite -unitfE unitrE -(kHom_inv homKf) // -fM ?rpredV ?divff ?idKf ?mem1v. Qed. Lemma kHom_is_rmorphism K E f : kHom K E f -> rmorphism (f \o vsval : subvs_of E -> L). Proof. (* Goal: forall _ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) f), @GRing.RMorphism.class_of (@subvs_ringType F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@funcomp (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@subvs_of F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) tt (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@vsval F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) : forall _ : @subvs_of F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E), @FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) *) case/kHomP=> fM idKf; split=> [a b|]; first exact: raddfB. (* Goal: @GRing.RMorphism.mixin_of (@subvs_ringType F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@funcomp (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@subvs_of F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) tt (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@vsval F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) *) by split=> [a b|] /=; [rewrite /= fM ?subvsP | rewrite algid1 idKf // mem1v]. Qed. Definition kHom_rmorphism K E f homKEf := RMorphism (@kHom_is_rmorphism K E f homKEf). Lemma kHom_horner K E f p x : kHom K E f -> p \is a polyOver E -> x \in E -> f p.[x] = (map_poly f p).[f x]. Proof. (* Goal: forall (_ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) f)) (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))))))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p x)) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) p) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x)) *) move=> homKf /polyOver_subvs[{p}p -> Ex]; pose fRM := kHom_rmorphism homKf. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@map_poly (@subvs_ringType F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@vsval F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) p) x)) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@map_poly (@subvs_ringType F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@vsval F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) p)) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x)) *) by rewrite (horner_map _ _ (Subvs Ex)) -[f _](horner_map fRM) map_poly_comp. Qed. Lemma kHom_root K E f p x : kHom K E f -> p \is a polyOver E -> x \in E -> root p x -> root (map_poly f p) (f x). Proof. (* Goal: forall (_ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) f)) (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))))))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))))) (_ : is_true (@root (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p x)), is_true (@root (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) p) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x)) *) by move/kHom_horner=> homKf Ep Ex /rootP px0; rewrite /root -homKf ?px0 ?raddf0. Qed. Lemma kHom_root_id K E f p x : (K <= E)%VS -> kHom K E f -> p \is a polyOver K -> x \in E -> root p x -> root p (f x). Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (_ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) f)) (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))))) (_ : is_true (@root (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p x)), is_true (@root (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x)) *) move=> sKE homKf Kp Ex /(kHom_root homKf (polyOverSv sKE Kp) Ex). (* Goal: forall _ : is_true (@root (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) p) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x)), is_true (@root (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x)) *) by rewrite (kHom_poly_id homKf). Qed. Section kHomExtend. Variables (K E : {subfield L}) (f : 'End(L)) (x y : L). Fact kHomExtend_subproof : linear (fun z => (map_poly f (Fadjoin_poly E x z)).[y]). Definition kHomExtend := linfun (Linear kHomExtend_subproof). Lemma kHomExtendE z : kHomExtend z = (map_poly f (Fadjoin_poly E x z)).[y]. Proof. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) kHomExtend z) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@Fadjoin_poly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) x z)) y) *) by rewrite lfunE. Qed. Hypotheses (sKE : (K <= E)%VS) (homKf : kHom K E f). Local Notation Px := (minPoly E x). Hypothesis fPx_y_0 : root (map_poly f Px) y. Lemma kHomExtend_id z : z \in E -> kHomExtend z = f z. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) z (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) kHomExtend z) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f z) *) by move=> Ez; rewrite kHomExtendE Fadjoin_polyC ?map_polyC ?hornerC. Qed. Lemma kHomExtend_val : kHomExtend x = y. Proof. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) kHomExtend x) y *) have fX: map_poly f 'X = 'X by rewrite (kHom_poly_id homKf) ?polyOverX. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) kHomExtend x) y *) have [Ex | E'x] := boolP (x \in E); last first. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) kHomExtend x) y *) (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) kHomExtend x) y *) by rewrite kHomExtendE Fadjoin_polyX // fX hornerX. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) kHomExtend x) y *) have:= fPx_y_0; rewrite (minPoly_XsubC Ex) raddfB /= map_polyC fX root_XsubC /=. (* Goal: forall _ : is_true (@eq_op (GRing.Ring.eqType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) y (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) f x)), @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) kHomExtend x) y *) by rewrite (kHomExtend_id Ex) => /eqP->. Qed. Lemma kHomExtend_poly p : p \in polyOver E -> kHomExtend p.[x] = (map_poly f p).[y]. Proof. (* Goal: forall _ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)))))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) kHomExtend (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p x)) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) p) y) *) move=> Ep; rewrite kHomExtendE (Fadjoin_poly_mod x) //. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) x))) y) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) p) y) *) rewrite (divp_eq (map_poly f p) (map_poly f Px)). (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) x))) y) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.lalg_fieldType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.lalg_fieldType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.lalg_fieldType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))))))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.lalg_fieldType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.lalg_fieldType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.lalg_fieldType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))))) (Pdiv.Field.divp (GRing.Field.idomainType (@FieldExt.lalg_fieldType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) p) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) x))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) x))) (Pdiv.Field.modp (GRing.Field.idomainType (@FieldExt.lalg_fieldType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) p) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) x)))) y) *) rewrite !hornerE (rootP fPx_y_0) mulr0 add0r. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) x))) y) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (Pdiv.Field.modp (GRing.Field.idomainType (@FieldExt.lalg_fieldType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) p) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) x))) y) *) have [p1 ->] := polyOver_subvs Ep. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@map_poly (@subvs_ringType F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@vsval F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) p1) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) x))) y) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (Pdiv.Field.modp (GRing.Field.idomainType (@FieldExt.lalg_fieldType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@map_poly (@subvs_ringType F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@vsval F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) p1)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) x))) y) *) have [Px1 ->] := polyOver_subvs (minPolyOver E x). (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@map_poly (@subvs_ringType F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@vsval F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) p1) (@map_poly (@subvs_ringType F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@vsval F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) Px1))) y) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (Pdiv.Field.modp (GRing.Field.idomainType (@FieldExt.lalg_fieldType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@map_poly (@subvs_ringType F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@vsval F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) p1)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@map_poly (@subvs_ringType F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@vsval F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) Px1))) y) *) by rewrite -map_modp -!map_poly_comp (map_modp (kHom_rmorphism homKf)). Qed. Lemma kHomExtendP : kHom K <<E; x>> kHomExtend. End kHomExtend. Definition kAut U V f := kHom U V f && (f @: V == V)%VS. Lemma kAutE K E f : kAut K E f = kHom K E f && (f @: E <= E)%VS. Proof. (* Goal: @eq bool (kAut (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) f) (andb (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) f) (@subsetv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@lfun_img F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) *) apply/andP/andP=> [[-> /eqP->] // | [homKf EfE]]. (* Goal: and (is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) f)) (is_true (@eq_op (@space_eqType F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@lfun_img F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) *) by rewrite eqEdim EfE /= (kHom_dim homKf). Qed. Lemma kAutS U1 U2 V f : (U1 <= U2)%VS -> kAut U2 V f -> kAut U1 V f. Proof. (* Goal: forall (_ : is_true (@subsetv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) U1 U2)) (_ : is_true (kAut U2 V f)), is_true (kAut U1 V f) *) by move=> sU12 /andP[/(kHomSl sU12)homU1f EfE]; apply/andP. Qed. Lemma kAut_eq K E (f g : 'End(L)) : (K <= E)%VS -> {in E, f =1 g} -> kAut K E f = kAut K E g. Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (_ : @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) g x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) g)))), @eq bool (kAut (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) f) (kAut (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) g) *) by move=> sKE eq_fg; rewrite !kAutE (kHom_eq sKE eq_fg) (eq_in_limg eq_fg). Qed. Lemma kAutfE K f : kAut K {:L} f = kHom K {:L} f. Proof. (* Goal: @eq bool (kAut (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) f) (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) f) *) by rewrite kAutE subvf andbT. Qed. Lemma kAut1E E (f : 'AEnd(L)) : kAut 1 E f = (f @: E <= E)%VS. Proof. (* Goal: @eq bool (kAut (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f)) (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) *) by rewrite kAutE k1AHom. Qed. Lemma kAutf_lker0 K f : kHom K {:L} f -> lker f == 0%VS. Proof. (* Goal: forall _ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) f), is_true (@eq_op (@space_eqType F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@lker F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) move/(kHomSl (sub1v _))/kHom_lrmorphism=> fM. (* Goal: is_true (@eq_op (@space_eqType F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@lker F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) by apply/lker0P; apply: (fmorph_inj (RMorphism fM)). Qed. Lemma inv_kHomf K f : kHom K {:L} f -> kHom K {:L} f^-1. Lemma inv_is_ahom (f : 'AEnd(L)) : ahom_in {:L} f^-1. Proof. (* Goal: is_true (@ahom_in F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@inv_lfun F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f))) *) have /ahomP/kHom_lrmorphism hom1f := valP f. (* Goal: is_true (@ahom_in F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@inv_lfun F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f))) *) exact/ahomP/kHom_lrmorphism/inv_kHomf. Qed. Canonical inv_ahom (f : 'AEnd(L)) : 'AEnd(L) := AHom (inv_is_ahom f). Notation "f ^-1" := (inv_ahom f) : lrfun_scope. Lemma comp_kHom_img K E f g : kHom K (g @: E) f -> kHom K E g -> kHom K E (f \o g). Proof. (* Goal: forall (_ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@lfun_img F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) g (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) f)) (_ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) g)), is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@comp_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f g)) *) move=> /kHomP[fM idKf] /kHomP[gM idKg]; apply/kHomP; split=> [x y Ex Ey | x Kx]. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@comp_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f g) x) x *) (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@comp_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f g) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x y)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@comp_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f g) x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@comp_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f g) y)) *) by rewrite !lfunE /= gM // fM ?memv_img. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@comp_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f g) x) x *) by rewrite lfunE /= idKg ?idKf. Qed. Lemma comp_kHom K E f g : kHom K {:L} f -> kHom K E g -> kHom K E (f \o g). Proof. (* Goal: forall (_ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) f)) (_ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) g)), is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@comp_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f g)) *) by move/(kHomSr (subvf (g @: E))); apply: comp_kHom_img. Qed. Lemma kHom_extends K E f p U : (K <= E)%VS -> kHom K E f -> p \is a polyOver K -> splittingFieldFor E p U -> {g | kHom K U g & {in E, f =1 g}}. Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (_ : is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) f)) (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (_ : @splittingFieldFor F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) p U), @sig2 (@Vector.hom (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (fun g : @Vector.hom (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) => is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) U g)) (fun g : @Vector.hom (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) g x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) g)))) *) move=> sKE homEf Kp /sig2_eqW[rs Dp <-{U}]. (* Goal: @sig2 (@Vector.hom (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (fun g : @Vector.hom (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) => is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) rs))) g)) (fun g : @Vector.hom (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) g x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) g)))) *) set r := rs; have rs_r: all (mem rs) r by apply/allP. (* Goal: @sig2 (@Vector.hom (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (fun g : @Vector.hom (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) => is_true (kHom (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) r))) g)) (fun g : @Vector.hom (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) g x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) g)))) *) elim: r rs_r => [_|z r IHr /=/andP[rs_z rs_r]] /= in E f sKE homEf *. by exists f; rewrite ?Fadjoin_nil. set Ez := <<E; z>>%AS; pose fpEz := map_poly f (minPoly E z). suffices{IHr} /sigW[y fpEz_y]: exists y, root fpEz y. have homEz_fz: kHom K Ez (kHomExtend E f z y) by apply: kHomExtendP. have sKEz: (K <= Ez)%VS := subv_trans sKE (subv_adjoin E z). have [g homGg Dg] := IHr rs_r _ _ sKEz homEz_fz. exists g => [|x Ex]; first by rewrite adjoin_cons. by rewrite -Dg ?subvP_adjoin // kHomExtend_id. have [m DfpEz]: {m | fpEz %= \prod_(w <- mask m rs) ('X - w%:P)}. apply: dvdp_prod_XsubC; rewrite -(eqp_dvdr _ Dp) -(kHom_poly_id homEf Kp). have /polyOver_subvs[q Dq] := polyOverSv sKE Kp. have /polyOver_subvs[qz Dqz] := minPolyOver E z. rewrite /fpEz Dq Dqz -2?{1}map_poly_comp (dvdp_map (kHom_rmorphism homEf)). rewrite -(dvdp_map [rmorphism of @vsval _ _ E]) -Dqz -Dq. by rewrite minPoly_dvdp ?(polyOverSv sKE) // (eqp_root Dp) root_prod_XsubC. exists (mask m rs)`_0; rewrite (eqp_root DfpEz) root_prod_XsubC mem_nth //. rewrite -ltnS -(size_prod_XsubC _ id) -(eqp_size DfpEz). rewrite size_poly_eq -?lead_coefE ?size_minPoly // (monicP (monic_minPoly E z)). by have [_ idKf] := kHomP homEf; rewrite idKf ?mem1v ?oner_eq0. Qed. Qed. End kHom. Notation "f ^-1" := (inv_ahom f) : lrfun_scope. Arguments kHomP {F L K V f}. Arguments kAHomP {F L U V f}. Arguments kHom_lrmorphism {F L f}. Module SplittingField. Import GRing. Section ClassDef. Variable F : fieldType. Definition axiom (L : fieldExtType F) := exists2 p : {poly L}, p \is a polyOver 1%VS & splittingFieldFor 1 p {:L}. Record class_of (L : Type) : Type := Class {base : FieldExt.class_of F L; _ : axiom (FieldExt.Pack _ base)}. Local Coercion base : class_of >-> FieldExt.class_of. Structure type (phF : phant F) := Pack {sort; _ : class_of sort}. Local Coercion sort : type >-> Sortclass. Variable (phF : phant F) (T : Type) (cT : type phF). Definition class := let: Pack _ c as cT' := cT return class_of cT' in c. Let xT := let: Pack T _ := cT in T. Notation xclass := (class : class_of xT). Definition clone c of phant_id class c := @Pack phF T c. Definition pack b0 (ax0 : axiom (@FieldExt.Pack F (Phant F) T b0)) := fun bT b & phant_id (@FieldExt.class F phF bT) b => fun ax & phant_id ax0 ax => Pack (Phant F) (@Class T b ax). Definition eqType := @Equality.Pack cT xclass. Definition choiceType := @Choice.Pack cT xclass. Definition zmodType := @Zmodule.Pack cT xclass. Definition ringType := @Ring.Pack cT xclass. Definition unitRingType := @UnitRing.Pack cT xclass. Definition comRingType := @ComRing.Pack cT xclass. Definition comUnitRingType := @ComUnitRing.Pack cT xclass. Definition idomainType := @IntegralDomain.Pack cT xclass. Definition fieldType := @Field.Pack cT xclass. Definition lmodType := @Lmodule.Pack F phF cT xclass. Definition lalgType := @Lalgebra.Pack F phF cT xclass. Definition algType := @Algebra.Pack F phF cT xclass. Definition unitAlgType := @UnitAlgebra.Pack F phF cT xclass. Definition vectType := @Vector.Pack F phF cT xclass. Definition FalgType := @Falgebra.Pack F phF cT xclass. Definition fieldExtType := @FieldExt.Pack F phF cT xclass. End ClassDef. Module Exports. Coercion sort : type >-> Sortclass. Bind Scope ring_scope with sort. Coercion base : class_of >-> FieldExt.class_of. Coercion eqType : type >-> Equality.type. Canonical eqType. Coercion choiceType : type >-> Choice.type. Canonical choiceType. Coercion zmodType : type >-> Zmodule.type. Canonical zmodType. Coercion ringType : type >-> Ring.type. Canonical ringType. Coercion unitRingType : type >-> UnitRing.type. Canonical unitRingType. Coercion comRingType : type >-> ComRing.type. Canonical comRingType. Coercion comUnitRingType : type >-> ComUnitRing.type. Canonical comUnitRingType. Coercion idomainType : type >-> IntegralDomain.type. Canonical idomainType. Coercion fieldType : type >-> Field.type. Canonical fieldType. Coercion lmodType : type >-> Lmodule.type. Canonical lmodType. Coercion lalgType : type >-> Lalgebra.type. Canonical lalgType. Coercion algType : type >-> Algebra.type. Canonical algType. Coercion unitAlgType : type >-> UnitAlgebra.type. Canonical unitAlgType. Coercion vectType : type >-> Vector.type. Canonical vectType. Coercion FalgType : type >-> Falgebra.type. Canonical FalgType. Coercion fieldExtType : type >-> FieldExt.type. Canonical fieldExtType. Notation splittingFieldType F := (type (Phant F)). Notation SplittingFieldType F L ax := (@pack _ (Phant F) L _ ax _ _ id _ id). Notation "[ 'splittingFieldType' F 'of' L 'for' K ]" := (@clone _ (Phant F) L K _ idfun) (at level 0, format "[ 'splittingFieldType' F 'of' L 'for' K ]") : form_scope. Notation "[ 'splittingFieldType' F 'of' L ]" := (@clone _ (Phant F) L _ _ id) (at level 0, format "[ 'splittingFieldType' F 'of' L ]") : form_scope. End Exports. End SplittingField. Export SplittingField.Exports. Lemma normal_field_splitting (F : fieldType) (L : fieldExtType F) : (forall (K : {subfield L}) x, exists r, minPoly K x == \prod_(y <- r) ('X - y%:P)) -> SplittingField.axiom L. Proof. (* Goal: forall _ : forall (K : @aspace_of F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (x : @FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L), @ex (list (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun r : list (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => is_true (@eq_op (poly_eqType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) r (fun y : GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) => @BigBody (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) y (@GRing.mul (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@GRing.add (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (polyX (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.opp (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@polyC (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))))))), @SplittingField.axiom F L *) move=> normalL; pose r i := sval (sigW (normalL 1%AS (tnth (vbasis {:L}) i))). (* Goal: @SplittingField.axiom F L *) have sz_r i: size (r i) <= \dim {:L}. (* Goal: @SplittingField.axiom F L *) (* Goal: is_true (leq (@size (Choice.sort (GRing.Ring.choiceType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i)) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) rewrite -ltnS -(size_prod_XsubC _ id) /r; case: sigW => _ /= /eqP <-. (* Goal: @SplittingField.axiom F L *) (* Goal: is_true (leq (@size (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@minPoly F L (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tnth (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) i)))) (S (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) rewrite size_minPoly ltnS; move: (tnth _ _) => x. (* Goal: @SplittingField.axiom F L *) (* Goal: is_true (leq (@adjoin_degree F L (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) x) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) by rewrite adjoin_degreeE dimv1 divn1 dimvS // subvf. (* Goal: @SplittingField.axiom F L *) pose mkf (z : L) := 'X - z%:P. (* Goal: @SplittingField.axiom F L *) exists (\prod_i \prod_(j < \dim {:L} | j < size (r i)) mkf (r i)`_j). (* Goal: @splittingFieldFor F L (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun i : Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @BigBody (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) i (@GRing.mul (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun j : ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) j (@GRing.mul (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (leq (S (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) j)) (@size (Choice.sort (GRing.Ring.choiceType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i))) (mkf (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) j))))))) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) *) (* Goal: is_true (@in_mem (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun i : Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @BigBody (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) i (@GRing.mul (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun j : ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) j (@GRing.mul (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (leq (S (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) j)) (@size (Choice.sort (GRing.Ring.choiceType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i))) (mkf (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) j))))))) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))))))) *) apply: rpred_prod => i _; rewrite big_ord_narrow /= /r; case: sigW => rs /=. (* Goal: @splittingFieldFor F L (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun i : Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @BigBody (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) i (@GRing.mul (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun j : ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) j (@GRing.mul (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (leq (S (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) j)) (@size (Choice.sort (GRing.Ring.choiceType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i))) (mkf (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) j))))))) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) *) (* Goal: forall _ : is_true (@eq_op (poly_eqType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@minPoly F L (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tnth (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) i)) (@BigOp.bigop (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) rs (fun y : @FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L => @BigBody (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y (@GRing.mul (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@GRing.add (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (polyX (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.opp (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@polyC (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y)))))), is_true (@in_mem (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (ordinal (@size (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) rs)) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (@size (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) rs))) (fun i : ordinal (@size (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) rs) => @BigBody (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (ordinal (@size (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) rs)) i (@GRing.mul (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (mkf (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) rs (@nat_of_ord (@size (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) rs) i))))) (@mem (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@has_quality (S O) (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyOver (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))))))) *) by rewrite (big_nth 0) big_mkord => /eqP <- {rs}; apply: minPolyOver. (* Goal: @splittingFieldFor F L (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun i : Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @BigBody (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) i (@GRing.mul (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun j : ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) j (@GRing.mul (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (leq (S (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) j)) (@size (Choice.sort (GRing.Ring.choiceType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i))) (mkf (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) j))))))) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) *) rewrite pair_big_dep /= -big_filter filter_index_enum -(big_map _ xpredT mkf). (* Goal: @splittingFieldFor F L (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@BigOp.bigop (GRing.Zmodule.sort (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@map (prod (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (fun j : prod (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r (@fst (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) j)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@snd (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) j))) (@enum_mem (prod_finType (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))))) (fun i : prod (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => leq (S (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@snd (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) i))) (@size (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (r (@fst (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) i))))))) (fun i : @FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L => @BigBody (GRing.Zmodule.sort (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) i (@GRing.mul (GRing.ComRing.ringType (poly_comRingType (@FieldExt.comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) true (mkf i))) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) *) set rF := map _ _; exists rF; first exact: eqpxx. (* Goal: @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) rF))) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) *) apply/eqP; rewrite eqEsubv subvf -(span_basis (vbasisP {:L})). (* Goal: is_true (andb true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@span F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) rF))))) *) apply/span_subvP=> _ /tnthP[i ->]; set x := tnth _ i. (* Goal: is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) rF)))))) *) have /tnthP[j ->]: x \in in_tuple (r i). (* Goal: is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tnth (@size (Choice.sort (GRing.Ring.choiceType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i)) (Equality.sort (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@in_tuple (Choice.sort (GRing.Ring.choiceType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i)) j) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) rF)))))) *) (* Goal: is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) x (@mem (Equality.sort (Choice.eqType (GRing.Ring.choiceType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (tuple_predType (@size (Choice.sort (GRing.Ring.choiceType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i)) (Choice.eqType (GRing.Ring.choiceType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@in_tuple (Choice.sort (GRing.Ring.choiceType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i)))) *) by rewrite -root_prod_XsubC /r; case: sigW => _ /=/eqP<-; apply: root_minPoly. (* Goal: is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tnth (@size (Choice.sort (GRing.Ring.choiceType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i)) (Equality.sort (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@in_tuple (Choice.sort (GRing.Ring.choiceType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r i)) j) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) rF)))))) *) apply/seqv_sub_adjoin/imageP; rewrite (tnth_nth 0) /in_mem/=. (* Goal: @ex2 (prod (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun x : prod (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => is_true (leq (S (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@snd (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) x))) (@size (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (r (@fst (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) x))))) (fun x : prod (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (r i) (@nat_of_ord (@size (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (r i)) j)) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (r (@fst (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) x)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@snd (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) x)))) *) by exists (i, widen_ord (sz_r i) j) => /=. Qed. Fact regular_splittingAxiom F : SplittingField.axiom (regular_fieldExtType F). Proof. (* Goal: @SplittingField.axiom F (regular_fieldExtType F) *) exists 1; first exact: rpred1. (* Goal: @splittingFieldFor F (regular_fieldExtType F) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (regular_fieldExtType F))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (regular_fieldExtType F))))) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (regular_fieldExtType F)))) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (regular_fieldExtType F))) *) by exists [::]; [rewrite big_nil eqpxx | rewrite Fadjoin_nil regular_fullv]. Qed. Canonical regular_splittingFieldType (F : fieldType) := SplittingFieldType F F^o (regular_splittingAxiom F). Section SplittingFieldTheory. Variables (F : fieldType) (L : splittingFieldType F). Implicit Types (U V W : {vspace L}). Implicit Types (K M E : {subfield L}). Lemma splittingFieldP : SplittingField.axiom L. Proof. (* Goal: @SplittingField.axiom F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) *) by case: L => ? []. Qed. Lemma splittingPoly : {p : {poly L} | p \is a polyOver 1%VS & splittingFieldFor 1 p {:L}}. Proof. (* Goal: @sig2 (@poly_of (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (fun p : @poly_of (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) => is_true (@in_mem (@poly_of (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))))))))) (fun p : @poly_of (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) => @splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) p (@fullv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) *) pose factF p s := (p \is a polyOver 1%VS) && (p %= \prod_(z <- s) ('X - z%:P)). (* Goal: @sig2 (@poly_of (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (fun p : @poly_of (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) => is_true (@in_mem (@poly_of (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))))))))) (fun p : @poly_of (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) => @splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) p (@fullv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) *) suffices [[p rs] /andP[]]: {ps | factF F L ps.1 ps.2 & <<1 & ps.2>> = {:L}}%VS. (* Goal: @sig2 (prod (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (fun ps : prod (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => is_true (factF F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@fst (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) ps) (@snd (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) ps))) (fun ps : prod (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@snd (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) ps)))) (@fullv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) *) (* Goal: forall (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@fst (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pair (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) p rs)) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))))))) (_ : is_true (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@fst (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pair (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) p rs)) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@snd (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pair (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) p rs)) (fun z : GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) z (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) z))))))) (_ : @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@snd (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pair (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) p rs))))) (@fullv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))), @sig2 (@poly_of (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (fun p : @poly_of (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) => is_true (@in_mem (@poly_of (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))))))))) (fun p : @poly_of (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) => @splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) p (@fullv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) *) by exists p; last exists rs. (* Goal: @sig2 (prod (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (fun ps : prod (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => is_true (factF F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@fst (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) ps) (@snd (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) ps))) (fun ps : prod (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@snd (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) ps)))) (@fullv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) *) apply: sig2_eqW; have [p F0p [rs splitLp genLrs]] := splittingFieldP. (* Goal: @ex2 (Choice.sort (prod_choiceType (poly_choiceType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (seq_choiceType (GRing.Ring.choiceType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (fun x : Choice.sort (prod_choiceType (poly_choiceType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (seq_choiceType (GRing.Ring.choiceType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) => is_true (factF F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@fst (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) x) (@snd (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) x))) (fun x : Choice.sort (prod_choiceType (poly_choiceType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (seq_choiceType (GRing.Ring.choiceType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) => @eq (Equality.sort (@space_eqType F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@snd (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (list (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) x)))) (@fullv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) *) by exists (p, rs); rewrite // /factF F0p splitLp. Qed. Fact fieldOver_splitting E : SplittingField.axiom (fieldOver_fieldExtType E). Proof. (* Goal: @SplittingField.axiom (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) *) have [p Fp [r Dp defL]] := splittingFieldP; exists p. (* Goal: @splittingFieldFor (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@vline (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))))) p (@fullv (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@FieldExt.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) *) (* Goal: is_true (@in_mem (@poly_of (@FieldExt.ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (@FieldExt.sort (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@pred_of_vspace (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))))) (@vline (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)))))))))) *) apply/polyOverP=> j; rewrite trivial_fieldOver. (* Goal: @splittingFieldFor (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@vline (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))))) p (@fullv (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@FieldExt.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_vectType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) p) j) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) *) by rewrite (subvP (sub1v E)) ?(polyOverP Fp). (* Goal: @splittingFieldFor (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@vline (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))))) p (@fullv (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@FieldExt.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) *) exists r => //; apply/vspaceP=> x; rewrite memvf. (* Goal: @eq bool (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)))) x (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)))) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))))) (@pred_of_vspace (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))))) (@agenv (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (@addv (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@FieldExt.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (@vline (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))))) (@span (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) r)))))) true *) have [L0 [_ _ defL0]] := @aspaceOverP _ _ E <<1 & r : seq (fieldOver E)>>. (* Goal: @eq bool (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)))) x (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)))) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))))) (@pred_of_vspace (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))))) (@agenv (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (@addv (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@FieldExt.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (@vline (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))))) (@span (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) r)))))) true *) rewrite defL0; have: x \in <<1 & r>>%VS by rewrite defL (@memvf _ L). (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)))) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) r)))))), @eq bool (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)) (Phant (GRing.Field.sort (@subvs_fieldType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E))) (@fieldOver_fieldExtType F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) E)))) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) L0)))) true *) apply: subvP; apply/Fadjoin_seqP; rewrite -memvE -defL0 mem1v. (* Goal: and (is_true true) (@sub_mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (seq_predType (@FieldExt.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) r) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) L0)))) *) by split=> // y r_y; rewrite -defL0 seqv_sub_adjoin. Qed. Canonical fieldOver_splittingFieldType E := SplittingFieldType (subvs_of E) (fieldOver E) (fieldOver_splitting E). Lemma enum_AEnd : {kAutL : seq 'AEnd(L) | forall f, f \in kAutL}. Proof. (* Goal: @sig (list (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (fun kAutL : list (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) => forall f : Equality.sort (@ahom_eqType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)), is_true (@in_mem (Equality.sort (@ahom_eqType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) f (@mem (Equality.sort (@ahom_eqType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (seq_predType (@ahom_eqType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) kAutL))) *) pose isAutL (s : seq 'AEnd(L)) (f : 'AEnd(L)) := kHom 1 {:L} f = (f \in s). (* Goal: @sig (list (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (fun kAutL : list (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) => forall f : Equality.sort (@ahom_eqType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)), is_true (@in_mem (Equality.sort (@ahom_eqType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) f (@mem (Equality.sort (@ahom_eqType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (seq_predType (@ahom_eqType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) kAutL))) *) suffices [kAutL in_kAutL] : {kAutL : seq 'AEnd(L) | forall f, isAutL kAutL f}. (* Goal: @sig (list (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (fun kAutL : list (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) => forall f : @ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L), isAutL kAutL f) *) (* Goal: @sig (list (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (fun kAutL : list (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) => forall f : Equality.sort (@ahom_eqType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)), is_true (@in_mem (Equality.sort (@ahom_eqType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) f (@mem (Equality.sort (@ahom_eqType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (seq_predType (@ahom_eqType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) kAutL))) *) by exists kAutL => f; rewrite -in_kAutL k1AHom. (* Goal: @sig (list (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (fun kAutL : list (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) => forall f : @ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L), isAutL kAutL f) *) have [p Kp /sig2_eqW[rs Dp defL]] := splittingPoly. (* Goal: @sig (list (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (fun kAutL : list (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) => forall f : @ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L), isAutL kAutL f) *) do [rewrite {}/isAutL -(erefl (asval 1)); set r := rs; set E := 1%AS] in defL *. have [sKE rs_r]: (1 <= E)%VS /\ all (mem rs) r by split; last apply/allP. elim: r rs_r => [_|z r IHr /=/andP[rs_z rs_r]] /= in (E) sKE defL *. rewrite Fadjoin_nil in defL; exists [tuple \1%AF] => f; rewrite defL inE. apply/idP/eqP=> [/kAHomP f1 | ->]; last exact: kHom1. by apply/val_inj/lfunP=> x; rewrite id_lfunE f1 ?memvf. do [set Ez := <<E; z>>%VS; rewrite adjoin_cons] in defL. have sEEz: (E <= Ez)%VS := subv_adjoin E z; have sKEz := subv_trans sKE sEEz. have{IHr} [homEz DhomEz] := IHr rs_r _ sKEz defL. have Ep: p \in polyOver E := polyOverSv sKE Kp. have{rs_z} pz0: root p z by rewrite (eqp_root Dp) root_prod_XsubC. pose pEz := minPoly E z; pose n := \dim_E Ez. have{pz0} [rz DpEz]: {rz : n.-tuple L | pEz %= \prod_(w <- rz) ('X - w%:P)}. have /dvdp_prod_XsubC[m DpEz]: pEz %| \prod_(w <- rs) ('X - w%:P). by rewrite -(eqp_dvdr _ Dp) minPoly_dvdp ?(polyOverSv sKE). suffices sz_rz: size (mask m rs) == n by exists (Tuple sz_rz). rewrite -[n]adjoin_degreeE -eqSS -size_minPoly. by rewrite (eqp_size DpEz) size_prod_XsubC. have fEz i (y := tnth rz i): {f : 'AEnd(L) | kHom E {:L} f & f z = y}. have homEfz: kHom E Ez (kHomExtend E \1 z y). rewrite kHomExtendP ?kHom1 // lfun1_poly. by rewrite (eqp_root DpEz) -/rz root_prod_XsubC mem_tnth. have splitFp: splittingFieldFor Ez p {:L}. exists rs => //; apply/eqP; rewrite eqEsubv subvf -defL adjoin_seqSr //. exact/allP. have [f homLf Df] := kHom_extends sEEz homEfz Ep splitFp. have [ahomf _] := andP homLf; exists (AHom ahomf) => //. rewrite -Df ?memv_adjoin ?(kHomExtend_val (kHom1 E E)) // lfun1_poly. by rewrite (eqp_root DpEz) root_prod_XsubC mem_tnth. exists [seq (s2val (fEz i) \o f)%AF| i <- enum 'I_n, f <- homEz] => f. apply/idP/allpairsP => [homLf | [[i g] [_ Hg ->]] /=]; last first. by case: (fEz i) => fi /= /comp_kHom->; rewrite ?(kHomSl sEEz) ?DhomEz. have /tnthP[i Dfz]: f z \in rz. rewrite memtE /= -root_prod_XsubC -(eqp_root DpEz). by rewrite (kHom_root_id _ homLf) ?memvf ?subvf ?minPolyOver ?root_minPoly. case Dfi: (fEz i) => [fi homLfi fi_z]; have kerfi0 := kAutf_lker0 homLfi. set fj := (fi ^-1 \o f)%AF; suffices Hfj : fj \in homEz. exists (i, fj) => //=; rewrite mem_enum inE Hfj; split => //. by apply/val_inj; rewrite {}Dfi /= (lker0_compVKf kerfi0). rewrite -DhomEz; apply/kAHomP => _ /Fadjoin_polyP[q Eq ->]. have homLfj: kHom E {:L} fj := comp_kHom (inv_kHomf homLfi) homLf. have /kHom_lrmorphism fjM := kHomSl (sub1v _) homLfj. rewrite -[fj _](horner_map (RMorphism fjM)) (kHom_poly_id homLfj) //=. by rewrite lfunE /= Dfz -fi_z lker0_lfunK. Qed. Qed. Lemma splitting_field_normal K x : exists r, minPoly K x == \prod_(y <- r) ('X - y%:P). Lemma kHom_to_AEnd K E f : kHom K E f -> {g : 'AEnd(L) | {in E, f =1 val g}}. Proof. (* Goal: forall _ : is_true (@kHom F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) f), @sig (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (fun g : @ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@val (@Vector.hom (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@ahom_in F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@fullv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@ahom_subType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) g) x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@val (@Vector.hom (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@ahom_in F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@fullv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@ahom_subType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) g))))) *) move=> homKf; have{homKf} [homFf sFE] := (kHomSl (sub1v K) homKf, sub1v E). (* Goal: @sig (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (fun g : @ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@val (@Vector.hom (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@ahom_in F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@fullv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@ahom_subType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) g) x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@val (@Vector.hom (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@ahom_in F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@fullv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@ahom_subType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) g))))) *) have [p Fp /(splittingFieldForS sFE (subvf E))splitLp] := splittingPoly. (* Goal: @sig (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (fun g : @ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@val (@Vector.hom (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@ahom_in F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@fullv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@ahom_subType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) g) x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@val (@Vector.hom (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@ahom_in F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@fullv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@ahom_subType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) g))))) *) have [g0 homLg0 eq_fg] := kHom_extends sFE homFf Fp splitLp. (* Goal: @sig (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (fun g : @ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@val (@Vector.hom (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@ahom_in F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@fullv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@ahom_subType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) g) x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@val (@Vector.hom (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@ahom_in F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@fullv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@ahom_subType F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) g))))) *) by apply: exist (Sub g0 _) _ => //; apply/ahomP/kHom_lrmorphism. Qed. End SplittingFieldTheory. Module Import AEnd_FinGroup. Section AEnd_FinGroup. Variables (F : fieldType) (L : splittingFieldType F). Implicit Types (U V W : {vspace L}) (K M E : {subfield L}). Definition inAEnd f := SeqSub (svalP (enum_AEnd L) f). Definition AEnd_countMixin := Eval hnf in CanCountMixin inAEndK. Canonical AEnd_countType := Eval hnf in CountType 'AEnd(L) AEnd_countMixin. Canonical AEnd_subCountType := Eval hnf in [subCountType of 'AEnd(L)]. Definition AEnd_finMixin := Eval hnf in CanFinMixin inAEndK. Canonical AEnd_finType := Eval hnf in FinType 'AEnd(L) AEnd_finMixin. Canonical AEnd_subFinType := Eval hnf in [subFinType of 'AEnd(L)]. Definition comp_AEnd (f g : 'AEnd(L)) : 'AEnd(L) := (g \o f)%AF. Fact comp_AEndA : associative comp_AEnd. Proof. (* Goal: @associative (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) comp_AEnd *) by move=> f g h; apply: val_inj; symmetry; apply: comp_lfunA. Qed. Fact comp_AEnd1l : left_id \1%AF comp_AEnd. Proof. (* Goal: @left_id (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@id_ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) comp_AEnd *) by move=> f; apply/val_inj/comp_lfun1r. Qed. Fact comp_AEndK : left_inverse \1%AF (@inv_ahom _ L) comp_AEnd. Proof. (* Goal: @left_inverse (@ahom F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@ahom F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@id_ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@inv_ahom F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) comp_AEnd *) by move=> f; apply/val_inj; rewrite /= lker0_compfV ?AEnd_lker0. Qed. Definition AEnd_baseFinGroupMixin := FinGroup.Mixin comp_AEndA comp_AEnd1l comp_AEndK. Canonical AEnd_baseFinGroupType := BaseFinGroupType 'AEnd(L) AEnd_baseFinGroupMixin. Canonical AEnd_finGroupType := FinGroupType comp_AEndK. Definition kAEnd U V := [set f : 'AEnd(L) | kAut U V f]. Definition kAEndf U := kAEnd U {:L}. Lemma kAEnd_group_set K E : group_set (kAEnd K E). Proof. (* Goal: is_true (@group_set AEnd_finGroupType (kAEnd (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) *) apply/group_setP; split=> [|f g]; first by rewrite inE /kAut kHom1 lim1g eqxx. (* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) f (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)) (kAEnd (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)) (kAEnd (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))), is_true (@in_mem (FinGroup.sort (FinGroup.base AEnd_finGroupType)) (@mulg (FinGroup.base AEnd_finGroupType) f g) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)) (kAEnd (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) *) rewrite !inE !kAutE => /andP[homKf EfE] /andP[/(kHomSr EfE)homKg EgE]. (* Goal: is_true (andb (@kHom F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@mulg (FinGroup.base AEnd_finGroupType) f g))) (@subsetv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@lfun_img F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@mulg (FinGroup.base AEnd_finGroupType) f g)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) *) by rewrite (comp_kHom_img homKg homKf) limg_comp (subv_trans _ EgE) ?limgS. Qed. Canonical kAEnd_group K E := group (kAEnd_group_set K E). Canonical kAEndf_group K := [group of kAEndf K]. Lemma kAEnd_norm K E : kAEnd K E \subset 'N(kAEndf E)%g. Proof. (* Goal: is_true (@subset AEnd_finType (@mem (Finite.sort AEnd_finType) (predPredType (Finite.sort AEnd_finType)) (@SetDef.pred_of_set AEnd_finType (kAEnd (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)) (@normaliser AEnd_finGroupType (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) *) apply/subsetP=> x; rewrite -groupV 2!in_set => /andP[_ /eqP ExE]. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base AEnd_finGroupType)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base AEnd_finGroupType))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base AEnd_finGroupType)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base AEnd_finGroupType)) (@conjugate AEnd_finGroupType (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)) (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) *) apply/subsetP=> _ /imsetP[y homEy ->]; rewrite !in_set !kAutfE in homEy *. apply/kAHomP=> u Eu; have idEy := kAHomP homEy; rewrite -ExE in idEy. by rewrite !lfunE /= lfunE /= idEy ?memv_img // lker0_lfunVK ?AEnd_lker0. Qed. Qed. Lemma mem_kAut_coset K E (g : 'AEnd(L)) : kAut K E g -> g \in coset (kAEndf E) g. Proof. (* Goal: forall _ : is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g)), is_true (@in_mem (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)) (@set_of_coset AEnd_finGroupType (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@coset AEnd_finGroupType (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) g))))) *) move=> autEg; rewrite val_coset ?rcoset_refl //. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)) (@normaliser AEnd_finGroupType (@gval AEnd_finGroupType (kAEndf_group E)))))) *) by rewrite (subsetP (kAEnd_norm K E)) // inE. Qed. Lemma aut_mem_eqP E (x y : coset_of (kAEndf E)) f g : f \in x -> g \in y -> reflect {in E, f =1 g} (x == y). Proof. (* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) f (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)) (@set_of_coset AEnd_finGroupType (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base AEnd_finGroupType)) (@set_of_coset AEnd_finGroupType (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y))))), Bool.reflect (@prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f) x) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f)) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g))))) (@eq_op (@coset_eqType AEnd_finGroupType (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x y) *) move=> x_f y_g; rewrite -(coset_mem x_f) -(coset_mem y_g). (* Goal: Bool.reflect (@prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f) x) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f)) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g))))) (@eq_op (@coset_eqType AEnd_finGroupType (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (@coset AEnd_finGroupType (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) f) (@coset AEnd_finGroupType (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) g)) *) have [Nf Ng] := (subsetP (coset_norm x) f x_f, subsetP (coset_norm y) g y_g). (* Goal: Bool.reflect (@prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f) x) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f)) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g))))) (@eq_op (@coset_eqType AEnd_finGroupType (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (@coset AEnd_finGroupType (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) f) (@coset AEnd_finGroupType (kAEndf (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) g)) *) rewrite (sameP eqP (rcoset_kercosetP Nf Ng)) mem_rcoset inE kAutfE. (* Goal: Bool.reflect (@prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f) x) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f)) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g))))) (@kHom F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@fullv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@mulg (FinGroup.base AEnd_finGroupType) f (@invg (FinGroup.base AEnd_finGroupType) g)))) *) apply: (iffP kAHomP) => idEfg u Eu. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@mulg (FinGroup.base AEnd_finGroupType) f (@invg (FinGroup.base AEnd_finGroupType) g))) u) u *) (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f) u) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) u) *) by rewrite -(mulgKV g f) lfunE /= idEfg. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@mulg (FinGroup.base AEnd_finGroupType) f (@invg (FinGroup.base AEnd_finGroupType) g))) u) u *) by rewrite lfunE /= idEfg // lker0_lfunK ?AEnd_lker0. Qed. End AEnd_FinGroup. End AEnd_FinGroup. Section GaloisTheory. Variables (F : fieldType) (L : splittingFieldType F). Implicit Types (U V W : {vspace L}). Implicit Types (K M E : {subfield L}). Section gal_of_Definition. Variable V : {vspace L}. Inductive gal_of := Gal of [subg kAEnd_group 1 <<V>> / kAEndf (agenv V)]. Definition gal (f : 'AEnd(L)) := Gal (subg _ (coset _ f)). Definition gal_sgval x := let: Gal u := x in u. Let gal_sgval_inj := can_inj gal_sgvalK. Definition gal_eqMixin := CanEqMixin gal_sgvalK. Canonical gal_eqType := Eval hnf in EqType gal_of gal_eqMixin. Definition gal_choiceMixin := CanChoiceMixin gal_sgvalK. Canonical gal_choiceType := Eval hnf in ChoiceType gal_of gal_choiceMixin. Definition gal_countMixin := CanCountMixin gal_sgvalK. Canonical gal_countType := Eval hnf in CountType gal_of gal_countMixin. Definition gal_finMixin := CanFinMixin gal_sgvalK. Canonical gal_finType := Eval hnf in FinType gal_of gal_finMixin. Definition gal_one := Gal 1%g. Definition gal_inv x := Gal (gal_sgval x)^-1. Definition gal_mul x y := Gal (gal_sgval x * gal_sgval y). Fact gal_oneP : left_id gal_one gal_mul. Proof. (* Goal: @left_id gal_of gal_of gal_one gal_mul *) by move=> x; apply/gal_sgval_inj/mul1g. Qed. Fact gal_invP : left_inverse gal_one gal_inv gal_mul. Proof. (* Goal: @left_inverse gal_of gal_of gal_of gal_one gal_inv gal_mul *) by move=> x; apply/gal_sgval_inj/mulVg. Qed. Fact gal_mulP : associative gal_mul. Proof. (* Goal: @associative gal_of gal_mul *) by move=> x y z; apply/gal_sgval_inj/mulgA. Qed. Definition gal_finGroupMixin := FinGroup.Mixin gal_mulP gal_oneP gal_invP. Canonical gal_finBaseGroupType := Eval hnf in BaseFinGroupType gal_of gal_finGroupMixin. Canonical gal_finGroupType := Eval hnf in FinGroupType gal_invP. Coercion gal_repr u : 'AEnd(L) := repr (sgval (gal_sgval u)). Fact gal_is_morphism : {in kAEnd 1 (agenv V) &, {morph gal : x y / x * y}%g}. Canonical gal_morphism := Morphism gal_is_morphism. Lemma gal_reprK : cancel gal_repr gal. Proof. (* Goal: @cancel (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) gal_of gal_repr gal *) by case=> x; rewrite /gal coset_reprK sgvalK. Qed. Lemma gal_repr_inj : injective gal_repr. Proof. (* Goal: @injective (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) gal_of gal_repr *) exact: can_inj gal_reprK. Qed. Lemma gal_AEnd x : gal_repr x \in kAEnd 1 (agenv V). Proof. (* Goal: is_true (@in_mem (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (gal_repr x) (@mem (Finite.sort (@AEnd_finType F L)) (predPredType (Finite.sort (@AEnd_finType F L))) (@SetDef.pred_of_set (@AEnd_finType F L) (@kAEnd F L (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@agenv F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) V))))) *) rewrite /gal_repr; case/gal_sgval: x => _ /=/morphimP[g Ng autEg ->]. (* Goal: is_true (@in_mem (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@repr (@AEnd_baseFinGroupType F L) (@set_of_coset (@AEnd_finGroupType F L) (@kAEndf F L (@agenv F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) V)) (@mfun (@AEnd_finGroupType F L) (@coset_groupType (@AEnd_finGroupType F L) (@kAEndf F L (@agenv F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) V))) (@normaliser (@AEnd_finGroupType F L) (@kAEndf F L (@agenv F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) V))) (@coset_morphism (@AEnd_finGroupType F L) (@kAEndf F L (@agenv F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) V))) g))) (@mem (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (predPredType (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@SetDef.pred_of_set (@AEnd_finType F L) (@kAEnd F L (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@agenv F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) V))))) *) rewrite val_coset //=; case: repr_rcosetP => f; rewrite groupMr // !inE kAut1E. (* Goal: forall _ : is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) V)) (@fullv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f)), is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) V))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) V))) *) by rewrite kAutE -andbA => /and3P[_ /fixedSpace_limg-> _]. Qed. End gal_of_Definition. Prenex Implicits gal_repr. Lemma gal_eqP E {x y : gal_of E} : reflect {in E, x =1 y} (x == y). Proof. (* Goal: Bool.reflect (@prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)))))) (@eq_op (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x y) *) by rewrite -{1}(subfield_closed E); apply: aut_mem_eqP; apply: mem_repr_coset. Qed. Lemma galK E (f : 'AEnd(L)) : (f @: E <= E)%VS -> {in E, gal E f =1 f}. Lemma eq_galP E (f g : 'AEnd(L)) : (f @: E <= E)%VS -> (g @: E <= E)%VS -> reflect {in E, f =1 g} (gal E f == gal E g). Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))), Bool.reflect (@prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f) x) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f)) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g))))) (@eq_op (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) f) (gal (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) g)) *) move=> EfE EgE. (* Goal: Bool.reflect (@prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f) x) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) f)) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g))))) (@eq_op (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) f) (gal (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) g)) *) by apply: (iffP gal_eqP) => Dfg a Ea; have:= Dfg a Ea; rewrite !{1}galK. Qed. Lemma limg_gal E (x : gal_of E) : (x @: E)%VS = E. Proof. (* Goal: @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) *) by have:= gal_AEnd x; rewrite inE subfield_closed => /andP[_ /eqP]. Qed. Lemma memv_gal E (x : gal_of E) a : a \in E -> x a \in E. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))), is_true (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) *) by move/(memv_img x); rewrite limg_gal. Qed. Lemma gal_id E a : (1 : gal_of E)%g a = a. Proof. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (oneg (gal_finBaseGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) a) a *) by rewrite /gal_repr repr_coset1 id_lfunE. Qed. Lemma galM E (x y : gal_of E) a : a \in E -> (x * y)%g a = y (x a). Lemma galV E (x : gal_of E) : {in E, (x^-1)%g =1 x^-1%VF}. Definition galoisG V U := gal V @* <<kAEnd (U :&: V) V>>. Local Notation "''Gal' ( V / U )" := (galoisG V U) : group_scope. Canonical galoisG_group E U := Eval hnf in [group of (galoisG E U)]. Local Notation "''Gal' ( V / U )" := (galoisG_group V U) : Group_scope. Section Automorphism. Lemma gal_cap U V : 'Gal(V / U) = 'Gal(V / U :&: V). Proof. (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType V))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType V)))))) (galoisG V U) (galoisG V (@capv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) U V)) *) by rewrite /galoisG -capvA capvv. Qed. Lemma gal_kAut K E x : (K <= E)%VS -> (x \in 'Gal(E / K)) = kAut K E x. Proof. (* Goal: forall _ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)), @eq bool (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))) *) move=> sKE; apply/morphimP/idP=> /= [[g EgE KautEg ->{x}] | KautEx]. (* Goal: @morphim_spec (@AEnd_finGroupType F L) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@kAEnd F L (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@agenv F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (@generated (@AEnd_finGroupType F L) (@kAEnd F L (@capv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x (gal (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) (* Goal: is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (gal (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) g)))) *) rewrite genGid !inE kAut1E /= subfield_closed (capv_idPl sKE) in KautEg EgE. (* Goal: @morphim_spec (@AEnd_finGroupType F L) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@kAEnd F L (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@agenv F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (@generated (@AEnd_finGroupType F L) (@kAEnd F L (@capv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x (gal (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) (* Goal: is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (gal (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) g)))) *) by apply: etrans KautEg; apply/(kAut_eq sKE); apply: galK. (* Goal: @morphim_spec (@AEnd_finGroupType F L) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@kAEnd F L (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@agenv F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (@generated (@AEnd_finGroupType F L) (@kAEnd F L (@capv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x (gal (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) exists (x : 'AEnd(L)); rewrite ?gal_reprK ?gal_AEnd //. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@AEnd_finGroupType F L)))) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@AEnd_finGroupType F L)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@AEnd_finGroupType F L))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@AEnd_finGroupType F L))) (@generated (@AEnd_finGroupType F L) (@kAEnd F L (@capv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) *) by rewrite (capv_idPl sKE) mem_gen ?inE. Qed. Lemma gal_kHom K E x : (K <= E)%VS -> (x \in 'Gal(E / K)) = kHom K E x. Proof. (* Goal: forall _ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)), @eq bool (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) (@kHom F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))) *) by move/gal_kAut->; rewrite /kAut limg_gal eqxx andbT. Qed. Lemma kAut_to_gal K E f : kAut K E f -> {x : gal_of E | x \in 'Gal(E / K) & {in E, f =1 x}}. Proof. (* Goal: forall _ : is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) f), @sig2 (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => is_true (@in_mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)))))) *) case/andP=> homKf EfE; have [g Df] := kHom_to_AEnd homKf. (* Goal: @sig2 (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => is_true (@in_mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)))))) *) have{homKf EfE} autEg: kAut (K :&: E) E g. (* Goal: @sig2 (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => is_true (@in_mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)))))) *) (* Goal: is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@capv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g)) *) rewrite /kAut -(kHom_eq (capvSr _ _) Df) (kHomSl (capvSl _ _) homKf) /=. (* Goal: @sig2 (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => is_true (@in_mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)))))) *) (* Goal: is_true (@eq_op (@space_eqType F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@lfun_img F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) by rewrite -(eq_in_limg Df). (* Goal: @sig2 (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => is_true (@in_mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)))))) *) have FautEg := kAutS (sub1v _) autEg. (* Goal: @sig2 (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => is_true (@in_mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)))))) *) exists (gal E g) => [|a Ea]; last by rewrite {f}Df // galK // -kAut1E. (* Goal: is_true (@in_mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) g) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) *) by rewrite mem_morphim /= ?subfield_closed ?genGid ?inE. Qed. Lemma fixed_gal K E x a : (K <= E)%VS -> x \in 'Gal(E / K) -> a \in K -> x a = a. Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (_ : is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) a *) by move/gal_kHom=> -> /kAHomP idKx /idKx. Qed. Lemma fixedPoly_gal K E x p : (K <= E)%VS -> x \in 'Gal(E / K) -> p \is a polyOver K -> map_poly x p = p. Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (_ : is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))))), @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))) p) p *) move=> sKE galEKx /polyOverP Kp; apply/polyP => i. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (GRing.zero (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@polyseq (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))) p)) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (GRing.zero (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@polyseq (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) p) i) *) by rewrite coef_map /= (fixed_gal sKE). Qed. Lemma root_minPoly_gal K E x a : (K <= E)%VS -> x \in 'Gal(E / K) -> a \in E -> root (minPoly K a) (x a). Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (_ : is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))), is_true (@root (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)) *) move=> sKE galEKx Ea; have homKx: kHom K E x by rewrite -gal_kHom. (* Goal: is_true (@root (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)) *) have K_Pa := minPolyOver K a; rewrite -[minPoly K a](fixedPoly_gal _ galEKx) //. (* Goal: is_true (@root (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a)) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)) *) by rewrite (kHom_root homKx) ?root_minPoly // (polyOverS (subvP sKE)). Qed. End Automorphism. Lemma gal_adjoin_eq K a x y : x \in 'Gal(<<K; a>> / K) -> y \in 'Gal(<<K; a>> / K) -> (x == y) = (x a == y a). Proof. (* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a))))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a))))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a)))))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a)))))) (galoisG (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a))))))) y (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a))))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a)))))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a)))))) (galoisG (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))), @eq bool (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base (gal_finGroupType (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a))))))) x y) (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a))) x)) a) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a))) y)) a)) *) move=> galKa_x galKa_y; apply/idP/eqP=> [/eqP-> // | eq_xy_a]. (* Goal: is_true (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base (gal_finGroupType (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a))))))) x y) *) apply/gal_eqP => _ /Fadjoin_polyP[p Kp ->]. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a)))) x)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) p a)) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a)))) y)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) p a)) *) by rewrite -!horner_map !(fixedPoly_gal (subv_adjoin K a)) //= eq_xy_a. Qed. Lemma galS K M E : (K <= M)%VS -> 'Gal(E / M) \subset 'Gal(E / K). Proof. (* Goal: forall _ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)), is_true (@subset (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) *) rewrite gal_cap (gal_cap K E) => sKM; apply/subsetP=> x. (* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@capv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))), is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@capv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) *) by rewrite !gal_kAut ?capvSr //; apply: kAutS; apply: capvS. Qed. Lemma gal_conjg K E x : 'Gal(E / K) :^ x = 'Gal(E / x @: K). Proof. (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) *) without loss sKE: K / (K <= E)%VS. (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) *) (* Goal: forall _ : forall (K : @aspace_of F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))), @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))), @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) *) move=> IH_K; rewrite gal_cap {}IH_K ?capvSr //. (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) *) (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@capv_aspace F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) K E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) *) transitivity 'Gal(E / x @: K :&: x @: E); last by rewrite limg_gal -gal_cap. (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) *) (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@capv_aspace F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) K E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@capv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) *) congr 'Gal(E / _); apply/eqP; rewrite eqEsubv limg_cap; apply/subvP=> a. (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) *) (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) (@capv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))), is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@capv_aspace F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) K E)))))) *) rewrite memv_cap => /andP[/memv_imgP[b Kb ->] /memv_imgP[c Ec] eq_bc]. (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) b) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@capv_aspace F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) K E)))))) *) by rewrite memv_img // memv_cap Kb (lker0P (AEnd_lker0 _) _ _ eq_bc). (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) *) wlog suffices IHx: x K sKE / 'Gal(E / K) :^ x \subset 'Gal(E / x @: K). (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) *) (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) *) apply/eqP; rewrite eqEsubset IHx // -sub_conjgV (subset_trans (IHx _ _ _)) //. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) *) (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@invg (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@aimg_aspace F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x) K)))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) *) (* Goal: is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@aimg_aspace F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x) K)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) by apply/subvP=> _ /memv_imgP[a Ka ->]; rewrite memv_gal ?(subvP sKE). (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) *) (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@invg (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@aimg_aspace F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x) K)))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) *) rewrite -limg_comp (etrans (eq_in_limg _) (lim1g _)) // => a /(subvP sKE)Ka. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) *) (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@comp_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@invg (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x))) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))) a) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@id_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a) *) by rewrite !lfunE /= -galM // mulgV gal_id. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@conjugate (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) x))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) *) apply/subsetP=> _ /imsetP[y galEy ->]; rewrite gal_cap gal_kHom ?capvSr //=. (* Goal: is_true (@kHom F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@capv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@conjg (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y x)))) *) apply/kAHomP=> _ /memv_capP[/memv_imgP[a Ka ->] _]; have Ea := subvP sKE a Ka. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@conjg (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y x))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) *) by rewrite -galM // -conjgC galM // (fixed_gal sKE galEy). Qed. Definition fixedField V (A : {set gal_of V}) := (V :&: \bigcap_(x in A) fixedSpace x)%VS. Lemma fixedFieldP E {A : {set gal_of E}} a : a \in E -> reflect (forall x, x \in A -> x a = a) (a \in fixedField A). Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))), Bool.reflect (forall (x : Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (_ : is_true (@in_mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) A)))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) a) (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A)))) *) by rewrite memv_cap => ->; apply: (iffP subv_bigcapP) => cAa x /cAa/fixedSpaceP. Qed. Lemma mem_fixedFieldP E (A : {set gal_of E}) a : a \in fixedField A -> a \in E /\ (forall x, x \in A -> x a = a). Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A)))), and (is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (forall (x : Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (_ : is_true (@in_mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) A)))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) a) *) by move=> fixAa; have [Ea _] := memv_capP fixAa; have:= fixedFieldP Ea fixAa. Qed. Fact fixedField_is_aspace E (A : {set gal_of E}) : is_aspace (fixedField A). Proof. (* Goal: is_true (@is_aspace F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A)) *) rewrite /fixedField; elim/big_rec: _ {1}E => [|x K _ IH_K] M. (* Goal: is_true (@is_aspace F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@capv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@capv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@fixedSpace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))) K))) *) (* Goal: is_true (@is_aspace F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@capv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@fullv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) *) exact: (valP (M :&: _)%AS). (* Goal: is_true (@is_aspace F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@capv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@capv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@fixedSpace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))) K))) *) by rewrite capvA IH_K. Qed. Canonical fixedField_aspace E A : {subfield L} := ASpace (@fixedField_is_aspace E A). Lemma fixedField_bound E (A : {set gal_of E}) : (fixedField A <= E)%VS. Proof. (* Goal: is_true (@subsetv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) exact: capvSl. Qed. Lemma fixedFieldS E (A B : {set gal_of E}) : A \subset B -> (fixedField B <= fixedField A)%VS. Proof. (* Goal: forall _ : is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) A)) (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) B))), is_true (@subsetv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) B) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A)) *) move/subsetP=> sAB; apply/subvP => a /mem_fixedFieldP[Ea cBa]. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A)))) *) by apply/fixedFieldP; last apply: sub_in1 cBa. Qed. Lemma galois_connection_subv K E : (K <= E)%VS -> (K <= fixedField ('Gal(E / K)))%VS. Proof. (* Goal: forall _ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)), is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))) *) move=> sKE; apply/subvP => a Ka; have Ea := subvP sKE a Ka. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) *) by apply/fixedFieldP=> // x galEx; apply: (fixed_gal sKE). Qed. Lemma galois_connection_subset E (A : {set gal_of E}): A \subset 'Gal(E / fixedField A). Proof. (* Goal: is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) A)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A))))) *) apply/subsetP => x Ax; rewrite gal_kAut ?capvSl // kAutE limg_gal subvv andbT. (* Goal: is_true (@kHom F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@fixedField_aspace E A)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))) *) by apply/kAHomP=> a /mem_fixedFieldP[_ ->]. Qed. Lemma galois_connection K E (A : {set gal_of E}): (K <= E)%VS -> (A \subset 'Gal(E / K)) = (K <= fixedField A)%VS. Proof. (* Goal: forall _ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)), @eq bool (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) A)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A)) *) move=> sKE; apply/idP/idP => [/fixedFieldS | /(galS E)]. (* Goal: forall _ : is_true (@subset (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@fixedField_aspace E A))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))), is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) A)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) *) (* Goal: forall _ : is_true (@subsetv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A)), is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A)) *) by apply: subv_trans; apply galois_connection_subv. (* Goal: forall _ : is_true (@subset (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@fixedField_aspace E A))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))), is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) A)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) *) by apply: subset_trans; apply: galois_connection_subset. Qed. Definition galTrace U V a := \sum_(x in 'Gal(V / U)) (x a). Definition galNorm U V a := \prod_(x in 'Gal(V / U)) (x a). Section TraceAndNormMorphism. Variables U V : {vspace L}. Fact galTrace_is_additive : additive (galTrace U V). Proof. (* Goal: @GRing.Additive.axiom (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (galTrace U V) *) by move=> a b /=; rewrite -sumrB; apply: eq_bigr => x _; rewrite rmorphB. Qed. Canonical galTrace_additive := Additive galTrace_is_additive. Lemma galNorm1 : galNorm U V 1 = 1. Proof. (* Goal: @eq (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (galNorm U V (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) *) by apply: big1 => x _; rewrite rmorph1. Qed. Lemma galNormM : {morph galNorm U V : a b / a * b}. Proof. (* Goal: @morphism_2 (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (galNorm U V) (fun a b : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) a b) (fun a b : GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) a b) *) by move=> a b /=; rewrite -big_split; apply: eq_bigr => x _; rewrite rmorphM. Qed. Lemma galNormV : {morph galNorm U V : a / a^-1}. Proof. (* Goal: @morphism_1 (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (galNorm U V) (fun a : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) a) (fun a : GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @GRing.inv (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_unitAlgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) a) *) by move=> a /=; rewrite -prodfV; apply: eq_bigr => x _; rewrite fmorphV. Qed. Lemma galNormX n : {morph galNorm U V : a / a ^+ n}. Proof. (* Goal: @morphism_1 (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (galNorm U V) (fun a : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @GRing.exp (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) a n) (fun a : GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @GRing.exp (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) a n) *) move=> a; elim: n => [|n IHn]; first by apply: galNorm1. (* Goal: @eq (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (galNorm U V (@GRing.exp (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) a (S n))) (@GRing.exp (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (galNorm U V a) (S n)) *) by rewrite !exprS galNormM IHn. Qed. Lemma galNorm_prod (I : Type) (r : seq I) (P : pred I) (B : I -> L) : galNorm U V (\prod_(i <- r | P i) B i) = \prod_(i <- r | P i) galNorm U V (B i). Proof. (* Goal: @eq (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (galNorm U V (@BigOp.bigop (GRing.Ring.sort (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)) I (GRing.one (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)) r (fun i : I => @BigBody (GRing.Ring.sort (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)) I i (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)) (P i) (B i)))) (@BigOp.bigop (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) I (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) r (fun i : I => @BigBody (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) I i (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (P i) (galNorm U V (B i)))) *) exact: (big_morph _ galNormM galNorm1). Qed. Lemma galNorm0 : galNorm U V 0 = 0. Proof. (* Goal: @eq (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (galNorm U V (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))))) (GRing.zero (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) *) by rewrite /galNorm (bigD1 1%g) ?group1 // rmorph0 /= mul0r. Qed. Lemma galNorm_eq0 a : (galNorm U V a == 0) = (a == 0). Proof. (* Goal: @eq bool (@eq_op (GRing.Ring.eqType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (galNorm U V a) (GRing.zero (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))))) (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) a (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))))) *) apply/idP/eqP=> [/prodf_eq0[x _] | ->]; last by rewrite galNorm0. (* Goal: forall _ : is_true (@eq_op (GRing.IntegralDomain.eqType (@FieldExt.lalg_idomainType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.fieldExtType F (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr V x)) a) (GRing.zero (GRing.IntegralDomain.zmodType (@FieldExt.lalg_idomainType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.fieldExtType F (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))))), @eq (Equality.sort (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) a (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) *) by rewrite fmorph_eq0 => /eqP. Qed. End TraceAndNormMorphism. Section TraceAndNormField. Variables K E : {subfield L}. Lemma galTrace_fixedField a : a \in E -> galTrace K E a \in fixedField 'Gal(E / K). Lemma galTrace_gal a x : a \in E -> x \in 'Gal(E / K) -> galTrace K E (x a) = galTrace K E a. Proof. (* Goal: forall (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))), @eq (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (galTrace (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)) (galTrace (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) a) *) move=> Ea galEx; rewrite {2}/galTrace (reindex_inj (mulgI x)). (* Goal: @eq (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (galTrace (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (index_enum (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun j : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => @BigBody (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) j (@Monoid.operator (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@Monoid.com_operator (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (GRing.add_comoid (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))))) (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (@mulg (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x j) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@mulg (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x j))) a))) *) by apply: eq_big => [b | b _]; rewrite ?groupMl // galM ?lfunE. Qed. Lemma galNorm_fixedField a : a \in E -> galNorm K E a \in fixedField 'Gal(E / K). Lemma galNorm_gal a x : a \in E -> x \in 'Gal(E / K) -> galNorm K E (x a) = galNorm K E a. Proof. (* Goal: forall (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))), @eq (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (galNorm (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)) (galNorm (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) a) *) move=> Ea galEx; rewrite {2}/galNorm (reindex_inj (mulgI x)). (* Goal: @eq (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (galNorm (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)) (@BigOp.bigop (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (index_enum (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun j : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => @BigBody (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) j (@Monoid.operator (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@Monoid.com_operator (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (GRing.mul_comoid (@FieldExt.lalg_comRingType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.fieldExtType F (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))))) (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (@mulg (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x j) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@mulg (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x j))) a))) *) by apply: eq_big => [b | b _]; rewrite ?groupMl // galM ?lfunE. Qed. End TraceAndNormField. Definition normalField U V := [forall x in kAEndf U, x @: V == V]%VS. Lemma normalField_kAut K M E f : (K <= M <= E)%VS -> normalField K M -> kAut K E f -> kAut K M f. Proof. (* Goal: forall (_ : is_true (andb (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (_ : is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))) (_ : is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) f)), is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) f) *) case/andP=> sKM sME nKM /kAut_to_gal[x galEx /(sub_in1 (subvP sME))Df]. (* Goal: is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) f) *) have sKE := subv_trans sKM sME; rewrite gal_kHom // in galEx. (* Goal: is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) f) *) rewrite (kAut_eq sKM Df) /kAut (kHomSr sME) //= (forall_inP nKM) // inE. (* Goal: is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@fullv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))) *) by rewrite kAutfE; apply/kAHomP; apply: (kAHomP galEx). Qed. Lemma normalFieldP K E : reflect {in E, forall a, exists2 r, all (mem E) r & minPoly K a = \prod_(b <- r) ('X - b%:P)} (normalField K E). Proof. (* Goal: Bool.reflect (@prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun a : @FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) => @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b))))))) (inPhantom (forall a : @FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L), @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b))))))))) (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) apply: (iffP eqfun_inP) => [nKE a Ea | nKE x]; last first. (* Goal: @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) (* Goal: forall _ : is_true (@in_mem (Finite.sort (@AEnd_finType F L)) x (@mem (Finite.sort (@AEnd_finType F L)) (predPredType (Finite.sort (@AEnd_finType F L))) (@SetDef.pred_of_set (@AEnd_finType F L) (@kAEndf F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))), @eq (Equality.sort (@space_eqType F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) x) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) *) rewrite inE kAutfE => homKx; suffices: kAut K E x by case/andP=> _ /eqP. (* Goal: @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) (* Goal: is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) x)) *) rewrite kAutE (kHomSr (subvf E)) //=; apply/subvP=> _ /memv_imgP[a Ea ->]. (* Goal: @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) x) a) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) *) have [r /allP/=srE splitEa] := nKE a Ea. (* Goal: @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) (* Goal: is_true (@in_mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) x) a) (@mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (predPredType (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) *) rewrite srE // -root_prod_XsubC -splitEa. (* Goal: @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) (* Goal: is_true (@root (GRing.IntegralDomain.ringType (@SplittingField.idomainType F (Phant (GRing.Field.sort F)) L)) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) x) a)) *) by rewrite -(kHom_poly_id homKx (minPolyOver K a)) fmorph_root root_minPoly. (* Goal: @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) have [r /eqP splitKa] := splitting_field_normal K a. (* Goal: @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) exists r => //; apply/allP => b; rewrite -root_prod_XsubC -splitKa => pKa_b_0. (* Goal: is_true (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) b) *) pose y := kHomExtend K \1 a b; have [hom1K lf1p] := (kHom1 K K, lfun1_poly). (* Goal: is_true (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) b) *) have homKy: kHom K <<K; a>> y by apply/kHomExtendP; rewrite ?lf1p. (* Goal: is_true (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) b) *) have [[g Dy] [_ idKy]] := (kHom_to_AEnd homKy, kHomP homKy). (* Goal: is_true (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) b) *) have <-: g a = b by rewrite -Dy ?memv_adjoin // (kHomExtend_val hom1K) ?lf1p. (* Goal: is_true (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) a)) *) suffices /nKE <-: g \in kAEndf K by apply: memv_img. (* Goal: is_true (@in_mem (@ahom F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) g (@mem (Finite.sort (@AEnd_finType F L)) (predPredType (Finite.sort (@AEnd_finType F L))) (@SetDef.pred_of_set (@AEnd_finType F L) (@kAEndf F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) *) by rewrite inE kAutfE; apply/kAHomP=> c Kc; rewrite -Dy ?subvP_adjoin ?idKy. Qed. Lemma normalFieldf K : normalField K {:L}. Proof. (* Goal: is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@fullv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L))) *) apply/normalFieldP=> a _; have [r /eqP->] := splitting_field_normal K a. (* Goal: @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@aspacef F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))))) r)) (fun r0 : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) r (fun y : GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) => @BigBody (GRing.Ring.sort (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) y (@GRing.mul (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) true (@GRing.add (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (polyX (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@GRing.opp (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@polyC (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) y))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r0 (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) by exists r => //; apply/allP=> b; rewrite /= memvf. Qed. Lemma normalFieldS K M E : (K <= M)%VS -> normalField K E -> normalField M E. Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))) (_ : is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))), is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) move=> sKM /normalFieldP nKE; apply/normalFieldP=> a Ea. (* Goal: @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) have [r /allP Er splitKa] := nKE a Ea. (* Goal: @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) have /dvdp_prod_XsubC[m splitMa]: minPoly M a %| \prod_(b <- r) ('X - b%:P). (* Goal: @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) (* Goal: is_true (Pdiv.Field.dvdp (@FieldExt.idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) by rewrite -splitKa minPolyS. (* Goal: @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) exists (mask m r); first by apply/allP=> b /mem_mask/Er. (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@mask (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) m r) (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b))))) *) by apply/eqP; rewrite -eqp_monic ?monic_prod_XsubC ?monic_minPoly. Qed. Lemma splitting_normalField E K : (K <= E)%VS -> reflect (exists2 p, p \is a polyOver K & splittingFieldFor K p E) (normalField K E). Proof. (* Goal: forall _ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)), Bool.reflect (@ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => @splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) p (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) move=> sKE; apply: (iffP idP) => [nKE| [p Kp [rs Dp defE]]]; last first. (* Goal: @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => @splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) p (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) (* Goal: is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) apply/forall_inP=> g; rewrite inE kAutE => /andP[homKg _]. (* Goal: @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => @splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) p (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) (* Goal: is_true (@eq_op (@space_eqType F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) rewrite -dimv_leqif_eq ?limg_dim_eq ?(eqP (AEnd_lker0 g)) ?capv0 //. (* Goal: @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => @splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) p (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) (* Goal: is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@lfun_img F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) rewrite -defE aimg_adjoin_seq; have [_ /fixedSpace_limg->] := andP homKg. (* Goal: @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => @splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) p (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) (* Goal: is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@agenv F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@map (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g)) rs)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@span F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) rs)))) *) apply/adjoin_seqSr=> _ /mapP[a rs_a ->]. (* Goal: @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => @splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) p (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) (* Goal: is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) a) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (seq_predType (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) rs)) *) rewrite -!root_prod_XsubC -!(eqp_root Dp) in rs_a *. by apply: kHom_root_id homKg Kp _ rs_a; rewrite ?subvf ?memvf. pose splitK a r := minPoly K a = \prod_(b <- r) ('X - b%:P). (* Goal: @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => @splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) p (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) (* Goal: is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) a) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (seq_predType (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) rs)) *) have{nKE} rK_ a: {r | a \in E -> all (mem E) r /\ splitK a r}. case Ea: (a \in E); last by exists [::]. by have /sig2_eqW[r] := normalFieldP _ _ nKE a Ea; exists r. have sXE := basis_mem (vbasisP E); set X : seq L := vbasis E in sXE. (* Goal: @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => @splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) p (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) (* Goal: is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g) a) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (seq_predType (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) rs)) *) exists (\prod_(a <- X) minPoly K a). by apply: rpred_prod => a _; apply: minPolyOver. exists (flatten [seq (sval (rK_ a)) | a <- X]). move/allP: sXE; elim: X => [|a X IHX]; first by rewrite !big_nil eqpxx. rewrite big_cons /= big_cat /= => /andP[Ea sXE]. by case: (rK_ a) => /= r [] // _ <-; apply/eqp_mull/IHX. apply/eqP; rewrite eqEsubv; apply/andP; split. apply/Fadjoin_seqP; split=> // b /flatten_mapP[a /sXE Ea]. by apply/allP; case: rK_ => r /= []. rewrite -{1}(span_basis (vbasisP E)); apply/span_subvP=> a Xa. apply/seqv_sub_adjoin/flatten_mapP; exists a => //; rewrite -root_prod_XsubC. by case: rK_ => /= r [| _ <-]; rewrite ?sXE ?root_minPoly. Qed. Qed. Lemma kHom_to_gal K M E f : (K <= M <= E)%VS -> normalField K E -> kHom K M f -> {x | x \in 'Gal(E / K) & {in M, f =1 x}}. Proof. (* Goal: forall (_ : is_true (andb (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (_ : is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (_ : is_true (@kHom F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) f)), @sig2 (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)))))) *) case/andP=> /subvP sKM /subvP sME nKE KhomMf. (* Goal: @sig2 (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)))))) *) have [[g Df] [_ idKf]] := (kHom_to_AEnd KhomMf, kHomP KhomMf). (* Goal: @sig2 (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)))))) *) suffices /kAut_to_gal[x galEx Dg]: kAut K E g. (* Goal: is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g)) *) (* Goal: @sig2 (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) f) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)))))) *) by exists x => //= a Ma; rewrite Df // Dg ?sME. (* Goal: is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g)) *) have homKg: kHom K {:L} g by apply/kAHomP=> a Ka; rewrite -Df ?sKM ?idKf. (* Goal: is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) g)) *) by rewrite /kAut (kHomSr (subvf _)) // (forall_inP nKE) // inE kAutfE. Qed. Lemma normalField_root_minPoly K E a b : (K <= E)%VS -> normalField K E -> a \in E -> root (minPoly K a) b -> exists2 x, x \in 'Gal(E / K) & x a = b. Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (_ : is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (_ : is_true (@root (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) b)), @ex2 (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) b) *) move=> sKE nKE Ea pKa_b_0; pose f := kHomExtend K \1 a b. (* Goal: @ex2 (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) b) *) have homKa_f: kHom K <<K; a>> f. (* Goal: @ex2 (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) b) *) (* Goal: is_true (@kHom F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a))) f) *) by apply: kHomExtendP; rewrite ?kHom1 ?lfun1_poly. (* Goal: @ex2 (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) b) *) have sK_Ka_E: (K <= <<K; a>> <= E)%VS. (* Goal: @ex2 (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) b) *) (* Goal: is_true (andb (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a)))) (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) *) by rewrite subv_adjoin; apply/FadjoinP; rewrite sKE Ea. (* Goal: @ex2 (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) b) *) have [x galEx Df] := kHom_to_gal sK_Ka_E nKE homKa_f; exists x => //. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) b *) by rewrite -Df ?memv_adjoin // (kHomExtend_val (kHom1 K K)) ?lfun1_poly. Qed. Arguments normalFieldP {K E}. Lemma normalField_factors K E : (K <= E)%VS -> reflect {in E, forall a, exists2 r : seq (gal_of E), r \subset 'Gal(E / K) & minPoly K a = \prod_(x <- r) ('X - (x a)%:P)} (normalField K E). Proof. (* Goal: forall _ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)), Bool.reflect (@prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun a : @FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) => @ex2 (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) r (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)))))))) (inPhantom (forall a : @FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L), @ex2 (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) r (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)))))))))) (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) move=> sKE; apply: (iffP idP) => [nKE a Ea | nKE]; last first. (* Goal: @ex2 (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) r (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a))))))) *) (* Goal: is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) apply/normalFieldP=> a Ea; have [r _ ->] := nKE a Ea. (* Goal: @ex2 (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) r (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a))))))) *) (* Goal: @ex2 (list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (fun r : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r)) (fun r0 : list (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) r (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r0 (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b)))))) *) exists [seq x a | x : gal_of E <- r]; last by rewrite big_map. (* Goal: @ex2 (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) r (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a))))))) *) (* Goal: is_true (@all (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_simpl (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@pred_of_mem_pred (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (@map (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) r)) *) by rewrite all_map; apply/allP=> b _; apply: memv_gal. (* Goal: @ex2 (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) r (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a))))))) *) have [r Er splitKa] := normalFieldP nKE a Ea. (* Goal: @ex2 (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) r (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a))))))) *) pose f b := [pick x in 'Gal(E / K) | x a == b]. (* Goal: @ex2 (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) r (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a))))))) *) exists (pmap f r). (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@pmap (Equality.sort (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) f r) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)))))) *) (* Goal: is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (@pmap (Equality.sort (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) f r)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) *) apply/subsetP=> x; rewrite mem_pmap /f => /mapP[b _]. (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@pmap (Equality.sort (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) f r) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)))))) *) (* Goal: forall _ : @eq (Equality.sort (option_eqType (Finite.eqType (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (@Some (Equality.sort (Finite.eqType (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) x) (@pick (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) => andb (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) b))), is_true (@in_mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) *) by case: (pickP _) => // c /andP[galEc _] [->]. (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@pmap (Equality.sort (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) f r) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)))))) *) rewrite splitKa; have{splitKa}: all (root (minPoly K a)) r. (* Goal: forall _ : is_true (@all (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@root (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a)) r), @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@pmap (Equality.sort (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) f r) (fun x0 : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x0 (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x0)) a)))))) *) (* Goal: is_true (@all (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@root (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a)) r) *) by apply/allP => b; rewrite splitKa root_prod_XsubC. (* Goal: forall _ : is_true (@all (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@root (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a)) r), @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) r (fun b : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@pmap (Equality.sort (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) f r) (fun x0 : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x0 (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x0)) a)))))) *) elim: r Er => /= [|b r IHr]; first by rewrite !big_nil. (* Goal: forall (_ : is_true (andb (@in_mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) b (@mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (predPredType (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@all (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (@pred_of_simpl (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (@pred_of_mem_pred (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (@mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (predPredType (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) r))) (_ : is_true (andb (@root (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) b) (@all (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (@root (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a)) r))), @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@cons (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) b r) (fun b : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => @BigBody (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b))))) (@BigOp.bigop (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@Option.apply (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x0 : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @cons (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x0 (@pmap (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) f r)) (@pmap (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) f r) (f b)) (fun x0 : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x0 (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x0)) a)))))) *) case/andP=> Eb Er /andP[pKa_b_0 /(IHr Er){IHr Er}IHr]. (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@cons (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) b r) (fun b : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => @BigBody (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b))))) (@BigOp.bigop (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@Option.apply (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @cons (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@pmap (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) f r)) (@pmap (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) f r) (f b)) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)))))) *) have [x galE /eqP xa_b] := normalField_root_minPoly sKE nKE Ea pKa_b_0. (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@cons (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) b r) (fun b : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => @BigBody (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b))))) (@BigOp.bigop (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@Option.apply (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @cons (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@pmap (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) f r)) (@pmap (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) f r) (f b)) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)))))) *) rewrite /(f b); case: (pickP _) => [y /andP[_ /eqP<-]|/(_ x)/andP[]//]. (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (GRing.one (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@cons (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a) r) (fun b : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => @BigBody (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) b (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) b))))) (@BigOp.bigop (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@Option.apply (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @cons (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@pmap (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) f r)) (@pmap (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) f r) (@Some (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) y)) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)))))) *) by rewrite !big_cons IHr. Qed. Definition galois U V := [&& (U <= V)%VS, separable U V & normalField U V]. Lemma galoisS K M E : (K <= M <= E)%VS -> galois K E -> galois M E. Proof. (* Goal: forall (_ : is_true (andb (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (_ : is_true (galois (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))), is_true (galois (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) case/andP=> sKM sME /and3P[_ sepUV nUV]. (* Goal: is_true (galois (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) by rewrite /galois sME (separableSl sKM) ?(normalFieldS sKM). Qed. Lemma galois_dim K E : galois K E -> \dim_K E = #|'Gal(E / K)|. Lemma galois_factors K E : (K <= E)%VS -> reflect {in E, forall a, exists r, let r_a := [seq x a | x : gal_of E <- r] in [/\ r \subset 'Gal(E / K), uniq r_a & minPoly K a = \prod_(b <- r_a) ('X - b%:P)]} (galois K E). Proof. (* Goal: forall _ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)), Bool.reflect (@prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun a : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @ex (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => and3 (is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (is_true (@uniq (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@map (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) r))) (@eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@map (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) r) (fun b : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) b)))))))) (inPhantom (forall a : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))), @ex (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => let r_a := @map (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) r in and3 (is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (is_true (@uniq (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) r_a)) (@eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) r_a (fun b : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) b)))))))))) (galois (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) move=> sKE; apply: (iffP and3P) => [[_ sepKE nKE] a Ea | galKE]. (* Goal: and3 (is_true (@subsetv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (@separable F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) *) (* Goal: @ex (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => and3 (is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (is_true (@uniq (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@map (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) r))) (@eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@map (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) r) (fun b : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) b))))))) *) have [r galEr splitEa] := normalField_factors sKE nKE a Ea. (* Goal: and3 (is_true (@subsetv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (@separable F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) *) (* Goal: @ex (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => and3 (is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (is_true (@uniq (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@map (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) r))) (@eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@map (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) r) (fun b : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) b))))))) *) exists r; rewrite /= -separable_prod_XsubC !big_map -splitEa. (* Goal: and3 (is_true (@subsetv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (@separable F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) *) (* Goal: and3 (is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (predPredType (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (@SetDef.pred_of_set (FinGroup.finType (gal_finBaseGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (is_true (@separable_poly (@FieldExt.lmod_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a))) (@eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a)) *) by split=> //; apply: separableP Ea. (* Goal: and3 (is_true (@subsetv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (@separable F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) *) split=> //. (* Goal: is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) (* Goal: is_true (@separable F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) apply/separableP => a /galKE[r [_ Ur_a splitKa]]. (* Goal: is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) (* Goal: is_true (@separable_element F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) *) by rewrite /separable_element splitKa separable_prod_XsubC. (* Goal: is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) apply/(normalField_factors sKE)=> a /galKE[r [galEr _ ->]]. (* Goal: @ex2 (list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun r : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => is_true (@subset (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Equality.sort (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (seq_predType (gal_eqType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) r) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) (fun r0 : list (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@map (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) r) (fun b : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) b (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) b))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.one (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) r0 (fun x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) true (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (polyX (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.opp (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@polyC (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a))))))) *) by rewrite big_map; exists r. Qed. Lemma splitting_galoisField K E : reflect (exists p, [/\ p \is a polyOver K, separable_poly p & splittingFieldFor K p E]) (galois K E). Proof. (* Goal: Bool.reflect (@ex (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => and3 (is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))))) (is_true (@separable_poly (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) p)) (@splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) p (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galois (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) apply: (iffP and3P) => [[sKE sepKE nKE]|[p [Kp sep_p [r Dp defE]]]]. (* Goal: and3 (is_true (@subsetv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (@separable F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) *) (* Goal: @ex (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) => and3 (is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))))) (is_true (@separable_poly (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) p)) (@splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) p (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) *) rewrite (eq_adjoin_separable_generator sepKE) // in nKE *. set a := separable_generator K E in nKE *; exists (minPoly K a). (* Goal: and3 (is_true (@subsetv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (@separable F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) *) (* Goal: and3 (is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))))) (is_true (@separable_poly (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a))) (@splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) split; first 1 [exact: minPolyOver | exact/separable_generatorP]. (* Goal: and3 (is_true (@subsetv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (@separable F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (is_true (normalField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) *) (* Goal: @splittingFieldFor F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@minPoly F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) a) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) *) have [r /= /allP Er splitKa] := normalFieldP nKE a (memv_adjoin _ _). exists r; first by rewrite splitKa eqpxx. apply/eqP; rewrite eqEsubv; apply/andP; split. by apply/Fadjoin_seqP; split => //; apply: subv_adjoin. apply/FadjoinP; split; first exact: subv_adjoin_seq. by rewrite seqv_sub_adjoin // -root_prod_XsubC -splitKa root_minPoly. have sKE: (K <= E)%VS by rewrite -defE subv_adjoin_seq. split=> //; last by apply/splitting_normalField=> //; exists p; last exists r. rewrite -defE; apply/separable_Fadjoin_seq/allP=> a r_a. by apply/separable_elementP; exists p; rewrite (eqp_root Dp) root_prod_XsubC. Qed. Qed. Lemma galois_fixedField K E : reflect (fixedField 'Gal(E / K) = K) (galois K E). Lemma mem_galTrace K E a : galois K E -> a \in E -> galTrace K E a \in K. Proof. (* Goal: forall (_ : is_true (galois (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))), is_true (@in_mem (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))))) (galTrace (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) a) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))) *) by move/galois_fixedField => {2}<- /galTrace_fixedField. Qed. Lemma mem_galNorm K E a : galois K E -> a \in E -> galNorm K E a \in K. Proof. (* Goal: forall (_ : is_true (galois (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))), is_true (@in_mem (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (galNorm (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) a) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))) *) by move/galois_fixedField=> {2}<- /galNorm_fixedField. Qed. Lemma gal_independent_contra E (P : pred (gal_of E)) (c_ : gal_of E -> L) x : P x -> c_ x != 0 -> exists2 a, a \in E & \sum_(y | P y) c_ y * y a != 0. Proof. (* Goal: forall (_ : is_true (P x)) (_ : is_true (negb (@eq_op (@SplittingField.eqType F (Phant (GRing.Field.sort F)) L) (c_ x) (GRing.zero (@SplittingField.zmodType F (Phant (GRing.Field.sort F)) L))))), @ex2 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (fun a : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun a : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))))) *) elim: {P}_.+1 c_ x {-2}P (ltnSn #|P|) => // n IHn c_ x P lePn Px nz_cx. (* Goal: @ex2 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (fun a : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun a : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))))) *) rewrite ltnS (cardD1x Px) in lePn; move/IHn: lePn => {n IHn}/=IH_P. (* Goal: @ex2 (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (@in_mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) a (@mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (predPredType (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))))) *) have [/eqfun_inP c_Px'_0 | ] := boolP [forall (y | P y && (y != x)), c_ y == 0]. (* Goal: forall _ : is_true (negb (@FiniteQuant.quant0b (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (fun y : Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @FiniteQuant.all_in (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (andb (P y) (negb (@eq_op (Finite.eqType (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) y x))) (FiniteQuant.Quantified (@eq_op (@SplittingField.eqType F (Phant (GRing.Field.sort F)) L) (c_ y) (GRing.zero (@SplittingField.zmodType F (Phant (GRing.Field.sort F)) L)))) y))), @ex2 (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (@in_mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) a (@mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (predPredType (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))))) *) (* Goal: @ex2 (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (@in_mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) a (@mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (predPredType (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))))) *) exists 1; rewrite ?mem1v // (bigD1 x Px) /= rmorph1 mulr1. (* Goal: forall _ : is_true (negb (@FiniteQuant.quant0b (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (fun y : Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @FiniteQuant.all_in (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (andb (P y) (negb (@eq_op (Finite.eqType (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) y x))) (FiniteQuant.Quantified (@eq_op (@SplittingField.eqType F (Phant (GRing.Field.sort F)) L) (c_ y) (GRing.zero (@SplittingField.zmodType F (Phant (GRing.Field.sort F)) L)))) y))), @ex2 (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (@in_mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) a (@mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (predPredType (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))))) *) (* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@GRing.add (@SplittingField.zmodType F (Phant (GRing.Field.sort F)) L) (c_ x) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun i : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) i (@GRing.add (@SplittingField.zmodType F (Phant (GRing.Field.sort F)) L)) (andb (P i) (negb (@eq_op (Finite.eqType (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) i x))) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ i) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) i)) (GRing.one (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))))))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))))) *) by rewrite big1 ?addr0 // => y /c_Px'_0->; rewrite mul0r. (* Goal: forall _ : is_true (negb (@FiniteQuant.quant0b (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (fun y : Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @FiniteQuant.all_in (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (andb (P y) (negb (@eq_op (Finite.eqType (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) y x))) (FiniteQuant.Quantified (@eq_op (@SplittingField.eqType F (Phant (GRing.Field.sort F)) L) (c_ y) (GRing.zero (@SplittingField.zmodType F (Phant (GRing.Field.sort F)) L)))) y))), @ex2 (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (@in_mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) a (@mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (predPredType (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))))) *) rewrite negb_forall_in => /exists_inP[y Px'y nz_cy]. (* Goal: @ex2 (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (@in_mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) a (@mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (predPredType (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))))) *) have [Py /gal_eqP/eqlfun_inP/subvPn[a Ea]] := andP Px'y. (* Goal: forall _ : is_true (negb (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@lker F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@GRing.add (@lfun_zmodType (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) (@GRing.opp (@lfun_zmodType (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))))))))), @ex2 (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (@in_mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) a (@mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (predPredType (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))))) *) rewrite memv_ker !lfun_simp => nz_yxa; pose d_ y := c_ y * (y a - x a). (* Goal: @ex2 (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (@in_mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) a (@mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (predPredType (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))))) *) have /IH_P[//|b Eb nz_sumb]: d_ y != 0 by rewrite mulf_neq0. (* Goal: @ex2 (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (@in_mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) a (@mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (predPredType (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))))) *) have [sumb_0|] := eqVneq (\sum_(z | P z) c_ z * z b) 0; last by exists b. (* Goal: @ex2 (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (@in_mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) a (@mem (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (predPredType (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@SplittingField.sort F (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (fun a : @SplittingField.sort F (Phant (GRing.Field.sort F)) L => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))))) *) exists (a * b); first exact: rpredM. (* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a b))))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))))) *) rewrite -subr_eq0 -[z in _ - z](mulr0 (x a)) -[in z in _ - z]sumb_0. (* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a b))))) (@GRing.opp (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun z : Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) z (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P z) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ z) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) z)) b))))))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))))) *) rewrite mulr_sumr -sumrB (bigD1 x Px) rmorphM /= mulrCA subrr add0r. (* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun i : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @BigBody (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) i (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (andb (P i) (negb (@eq_op (Finite.eqType (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) i x))) (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ i) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) i)) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a b))) (@GRing.opp (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ i) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) i)) b))))))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))))) *) congr (_ != 0): nz_sumb; apply: eq_bigr => z _. (* Goal: @eq (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (d_ z) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) z)) b)) (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ z) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) z)) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) a b))) (@GRing.opp (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ z) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) z)) b))))) *) by rewrite mulrCA rmorphM -mulrBr -mulrBl mulrA. Qed. Lemma gal_independent E (P : pred (gal_of E)) (c_ : gal_of E -> L) : (forall a, a \in E -> \sum_(x | P x) c_ x * x a = 0) -> (forall x, P x -> c_ x = 0). Proof. (* Goal: forall (_ : forall (a : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) a (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun x : Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) x (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P x) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ x) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L)))) (x : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (_ : is_true (P x)), @eq (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (c_ x) (GRing.zero (@SplittingField.zmodType F (Phant (GRing.Field.sort F)) L)) *) move=> sum_cP_0 x Px; apply/eqP/idPn=> /(gal_independent_contra Px)[a Ea]. (* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (index_enum (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (fun y : Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) y (@GRing.add (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))) (P y) (@GRing.mul (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L) (c_ y) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) a)))) (GRing.zero (GRing.Ring.zmodType (@SplittingField.ringType F (Phant (GRing.Field.sort F)) L))))), False *) by rewrite sum_cP_0 ?eqxx. Qed. Lemma Hilbert's_theorem_90 K E x a : generator 'Gal(E / K) x -> a \in E -> reflect (exists2 b, b \in E /\ b != 0 & a = b / x b) (galNorm K E a == 1). Section Matrix. Variable (E : {subfield L}) (A : {set gal_of E}). Let K := fixedField A. Lemma gal_matrix : {w : #|A|.-tuple L | {subset w <= E} /\ 0 \notin w & End Matrix. Lemma dim_fixedField E (G : {group gal_of E}) : #|G| = \dim_(fixedField G) E. Proof. (* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)))) (divn (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@dimv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)))) *) have [w [_ nzw] [_ Edirect /(_ (groupP G))defE]] := gal_matrix G. (* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)))) (divn (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@dimv F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)))) *) set n := #|G|; set m := \dim (fixedField G); rewrite -defE (directvP Edirect). (* Goal: @eq nat n (divn (@proper_addv_dim F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@nary_addv_expr F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (Finite.sort (ordinal_finType (@card (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)))))) (index_enum (ordinal_finType (@card (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)))))) (fun _ : Finite.sort (ordinal_finType (@card (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G))))) => true) (fun i : Finite.sort (ordinal_finType (@card (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G))))) => @trivial_addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@prodv F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)) (@vline F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@tnth (@card (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (predPredType (Finite.sort (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)))) (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) w i)))))) m) *) rewrite -[n]card_ord -(@mulnK #|'I_n| m) ?adim_gt0 //= -sum_nat_const. (* Goal: @eq nat (divn (@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))))) m)) m) (divn (@BigOp.bigop nat (ordinal (@card (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (predPredType (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G))))) O (index_enum (ordinal_finType (@card (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (predPredType (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)))))) (fun i : ordinal (@card (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (predPredType (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)))) => @BigBody nat (ordinal (@card (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (predPredType (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G))))) i addn true (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@prodv F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)) (@vline F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@tnth (@card (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (predPredType (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)))) (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) w i)))))) m) *) congr (_ %/ _)%N; apply: eq_bigr => i _. (* Goal: @eq nat m (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@prodv F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)) (@vline F (@SplittingField.vectType F (Phant (GRing.Field.sort F)) L) (@tnth (@card (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@mem (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (predPredType (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))) (@SetDef.pred_of_set (gal_finType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) G)))) (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) w i)))) *) by rewrite dim_cosetv ?(memPn nzw) ?mem_tnth. Qed. Lemma dim_fixed_galois K E (G : {group gal_of E}) : galois K E -> G \subset 'Gal(E / K) -> \dim_K (fixedField G) = #|'Gal(E / K) : G|. Lemma gal_fixedField E (G : {group gal_of E}): 'Gal(E / fixedField G) = G. Lemma gal_generated E (A : {set gal_of E}) : 'Gal(E / fixedField A) = <<A>>. Proof. (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A)) (@generated (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) A) *) apply/eqP; rewrite eqEsubset gen_subG galois_connection_subset. (* Goal: is_true (andb (@subset (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@generated (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) A)))) true) *) by rewrite -[<<A>>]gal_fixedField galS // fixedFieldS // subset_gen. Qed. Lemma fixedField_galois E (A : {set gal_of E}): galois (fixedField A) E. Proof. (* Goal: is_true (galois (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) have: galois (fixedField <<A>>) E. (* Goal: forall _ : is_true (galois (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@generated (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) A)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)), is_true (galois (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) (* Goal: is_true (galois (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@generated (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) A)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) by apply/galois_fixedField; rewrite gal_fixedField. (* Goal: forall _ : is_true (galois (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@generated (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) A)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)), is_true (galois (@fixedField (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) A) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) *) by apply: galoisS; rewrite capvSl fixedFieldS // subset_gen. Qed. Section FundamentalTheoremOfGaloisTheory. Variables E K : {subfield L}. Hypothesis galKE : galois K E. Section IntermediateField. Variable M : {subfield L}. Hypothesis (sKME : (K <= M <= E)%VS) (nKM : normalField K M). Lemma normalField_galois : galois K M. Proof. (* Goal: is_true (galois (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) *) have [[sKM sME] [_ sepKE nKE]] := (andP sKME, and3P galKE). (* Goal: is_true (galois (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) *) by rewrite /galois sKM (separableSr sME). Qed. Definition normalField_cast (x : gal_of E) : gal_of M := gal M x. Lemma normalField_cast_eq x : x \in 'Gal(E / K) -> {in M, normalField_cast x =1 x}. Proof. (* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))), @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (normalField_cast x))) x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (normalField_cast x)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))))) *) have [sKM sME] := andP sKME; have sKE := subv_trans sKM sME. (* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))), @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (normalField_cast x))) x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (normalField_cast x)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))))) *) rewrite gal_kAut // => /(normalField_kAut sKME nKM). (* Goal: forall _ : is_true (@kAut F (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))), @prop_in1 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))) (fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (normalField_cast x))) x0) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) x0)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (normalField_cast x)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x))))) *) by rewrite kAutE => /andP[_ /galK]. Qed. Lemma normalField_castM : {in 'Gal(E / K) &, {morph normalField_cast : x y / (x * y)%g}}. Proof. (* Goal: @prop_in2 (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))) (fun x y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @eq (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (normalField_cast ((fun x0 y0 : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @mulg (gal_finBaseGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x0 y0) x y)) ((fun x0 y0 : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) => @mulg (gal_finBaseGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) x0 y0) (normalField_cast x) (normalField_cast y))) (inPhantom (@morphism_2 (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) normalField_cast (fun x y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) => @mulg (gal_finBaseGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x y) (fun x y : gal_of (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) => @mulg (gal_finBaseGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) x y))) *) move=> x y galEx galEy /=; apply/eqP/gal_eqP => a Ma. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (normalField_cast (@mulg (gal_finBaseGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x y)))) a) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@mulg (gal_finBaseGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (normalField_cast x) (normalField_cast y)))) a) *) have Ea: a \in E by have [_ /subvP->] := andP sKME. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (normalField_cast (@mulg (gal_finBaseGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) x y)))) a) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@mulg (gal_finBaseGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (normalField_cast x) (normalField_cast y)))) a) *) rewrite normalField_cast_eq ?groupM ?galM //=. (* Goal: @eq (@SplittingField.sort F (Phant (GRing.Field.sort F)) L) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) y)) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a)) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (normalField_cast y))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (normalField_cast x))) a)) *) by rewrite normalField_cast_eq ?memv_gal // normalField_cast_eq. Qed. Canonical normalField_cast_morphism := Morphism normalField_castM. Lemma normalField_ker : 'ker normalField_cast = 'Gal(E / M). Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (@ker (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism (@MorPhantom (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) normalField_cast)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) *) have [sKM sME] := andP sKME. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))))) (@ker (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism (@MorPhantom (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) normalField_cast)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) *) apply/setP=> x; apply/idP/idP=> [kerMx | galEMx]. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@ker (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism (@MorPhantom (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) normalField_cast))))) *) (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))))) *) rewrite gal_kHom //; apply/kAHomP=> a Ma. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@ker (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism (@MorPhantom (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) normalField_cast))))) *) (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) x)) a) a *) by rewrite -normalField_cast_eq ?(dom_ker kerMx) // (mker kerMx) gal_id. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@ker (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism (@MorPhantom (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) normalField_cast))))) *) have galEM: x \in 'Gal(E / K) := subsetP (galS E sKM) x galEMx. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)))) (@ker (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism (@MorPhantom (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) normalField_cast))))) *) apply/kerP=> //; apply/eqP/gal_eqP=> a Ma. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@mfun (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (@gval (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG_group E (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) normalField_cast_morphism x))) a) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (oneg (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))))) a) *) by rewrite normalField_cast_eq // gal_id (fixed_gal sME). Qed. Lemma normalField_normal : 'Gal(E / M) <| 'Gal(E / K). Proof. (* Goal: is_true (@normal (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) *) by rewrite -normalField_ker ker_normal. Qed. Lemma normalField_img : normalField_cast @* 'Gal(E / K) = 'Gal(M / K). Proof. (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))))))) (@morphim (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism (@MorPhantom (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) normalField_cast) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) *) have [[sKM sME] [sKE _ nKE]] := (andP sKME, and3P galKE). (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))))))) (@morphim (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism (@MorPhantom (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) normalField_cast) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) *) apply/setP=> x; apply/idP/idP=> [/morphimP[{x}x galEx _ ->] | galMx]. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))) (@morphim (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism (@MorPhantom (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) normalField_cast) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) *) (* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))))) (@mfun (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism x) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))))) *) rewrite gal_kHom //; apply/kAHomP=> a Ka; have Ma := subvP sKM a Ka. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))) (@morphim (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism (@MorPhantom (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) normalField_cast) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) *) (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L))) (@ahval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@mfun (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism x))) a) a *) by rewrite normalField_cast_eq // (fixed_gal sKE). (* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))) (@morphim (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism (@MorPhantom (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) normalField_cast) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) *) have /(kHom_to_gal sKME nKE)[y galEy eq_xy]: kHom K M x by rewrite -gal_kHom. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)))) (@morphim (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism (@MorPhantom (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) normalField_cast) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)))))) *) apply/morphimP; exists y => //; apply/eqP/gal_eqP => a Ha. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) x)) a) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L)) (@ahval F (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@SplittingField.FalgType F (Phant (GRing.Field.sort F)) L) (@gal_repr (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@mfun (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) normalField_cast_morphism y))) a) *) by rewrite normalField_cast_eq // eq_xy. Qed. Lemma normalField_isom : {f : {morphism ('Gal(E / K) / 'Gal(E / M)) >-> gal_of M} | isom ('Gal(E / K) / 'Gal (E / M)) 'Gal(M / K) f & (forall A, f @* (A / 'Gal(E / M)) = normalField_cast @* A) /\ {in 'Gal(E / K) & M, forall x, f (coset 'Gal (E / M) x) =1 x} }%g. Lemma normalField_isog : 'Gal(E / K) / 'Gal(E / M) \isog 'Gal(M / K). Proof. (* Goal: is_true (@isog (@coset_groupType (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))) (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M)) (@quotient (gal_finGroupType (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K)) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) E) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M))) (galoisG (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@SplittingField.fieldExtType F (Phant (GRing.Field.sort F)) L)) K))) *) by rewrite -normalField_ker -normalField_img first_isog. Qed. End IntermediateField. Section IntermediateGroup. Variable G : {group gal_of E}. Hypothesis nsGgalE : G <| 'Gal(E / K). Lemma normal_fixedField_galois : galois K (fixedField G). End IntermediateGroup. End FundamentalTheoremOfGaloisTheory. End GaloisTheory. Prenex Implicits gal_repr gal gal_reprK. Arguments gal_repr_inj {F L V} [x1 x2]. Notation "''Gal' ( V / U )" := (galoisG V U) : group_scope. Notation "''Gal' ( V / U )" := (galoisG_group V U) : Group_scope. Arguments fixedFieldP {F L E A a}. Arguments normalFieldP {F L K E}. Arguments splitting_galoisField {F L K E}. Arguments galois_fixedField {F L K E}.
Require Import List. Require Import syntax. Require Import environments. Require Import freevars. Require Import utils. Require Import typecheck. Require Import mapsto. Goal forall (v x : vari) (r s t : ty) (H H1 : ty_env) (e : tm), v = x -> TC H1 e t -> forall HF HM : ty_env, H1 = HF ++ (v, r) :: HM ++ H -> TC (HF ++ (v, r) :: HM ++ (x, s) :: H) e t. simple induction 2; simpl in |- *; intros. apply TC_o. apply TC_ttt. apply TC_fff. apply TC_succ. apply H5; assumption. apply TC_prd. apply H5; assumption. apply TC_is_o. apply H5; assumption. apply TC_var. elim H0; apply Mp_eqExt. elim H5; assumption. apply TC_appl with s0. apply H5; assumption. apply H7; assumption. apply TC_abs. change (TC (((v0, s0) :: HF) ++ (v, r) :: HM ++ (x, s) :: H) e0 t0) in |- *. apply H5; rewrite H6; simpl in |- *; reflexivity. apply TC_cond. apply H5; assumption. apply H7; assumption. apply H9; assumption. apply TC_fix. change (TC (((v0, t0) :: HF) ++ (v, r) :: HM ++ (x, s) :: H) e0 t0) in |- *. apply H5; rewrite H6; simpl in |- *; reflexivity. apply TC_clos. apply H5; assumption. change (TC (((v0, s0) :: HF) ++ (v, r) :: HM ++ (x, s) :: H) e0 t0) in |- *. apply H7; rewrite H8; simpl in |- *; reflexivity. Save TEp_eqExt. Goal forall (v x : vari) (r s t : ty) (H H1 : ty_env) (e : tm), v = x -> TC H1 e t -> forall HF HM : ty_env, H1 = HF ++ (v, r) :: HM ++ (x, s) :: H -> TC (HF ++ (v, r) :: HM ++ H) e t. simple induction 2; intros. apply TC_o. apply TC_ttt. apply TC_fff. apply TC_succ; apply H5; assumption. apply TC_prd; apply H5; assumption. apply TC_is_o; apply H5; assumption. apply TC_var. apply Mp_inv_eqExt with x s; assumption || elim H5; assumption. apply TC_appl with s0. apply H5; assumption. apply H7; assumption. apply TC_abs. change (TC (((v0, s0) :: HF) ++ (v, r) :: HM ++ H) e0 t0) in |- *. apply H5. simpl in |- *; elim H6; reflexivity. apply TC_cond. apply H5; assumption. apply H7; assumption. apply H9; assumption. apply TC_fix. change (TC (((v0, t0) :: HF) ++ (v, r) :: HM ++ H) e0 t0) in |- *. apply H5. simpl in |- *; elim H6; reflexivity. apply TC_clos. apply H5; assumption. change (TC (((v0, s0) :: HF) ++ (v, r) :: HM ++ H) e0 t0) in |- *. apply H7. simpl in |- *; elim H8; reflexivity. Save TEp_inv_eqExt. Goal forall (H : ty_env) (e : tm) (t : ty) (x : vari) (s : ty), TC H e t -> ~ FV x e -> forall H1 H2 : ty_env, H = H1 ++ H2 -> TC (H1 ++ (x, s) :: H2) e t. simple induction 1; simpl in |- *; intros. apply TC_o. apply TC_ttt. apply TC_fff. apply TC_succ. apply H3; assumption || apply notFV_succ; assumption. apply TC_prd. apply H3; assumption || apply notFV_prd; assumption. apply TC_is_o. apply H3; assumption || apply notFV_is_o; assumption. apply TC_var. simpl in |- *; specialize notFV_var with (1 := H3); intro NQ. apply Mp_nfvExt. red in |- *; intro; apply NQ; symmetry in |- *; assumption. elim H6; assumption. apply TC_appl with s0. apply H3; assumption || specialize notFV_appl with (1 := H6); simple induction 1; intros; assumption. apply H5; assumption || specialize notFV_appl with (1 := H6); simple induction 1; intros; assumption. apply TC_abs. specialize (Xmidvar x v); simple induction 1. intro xv; rewrite xv. change (TC (nil ++ (v, s0) :: H5 ++ (v, s) :: H6) e0 t0) in |- *. apply TEp_eqExt with (nil ++ (v, s0) :: H5 ++ H6). reflexivity. simpl in |- *; elim H7; assumption. reflexivity. intro nxv. change (TC (((v, s0) :: H5) ++ (x, s) :: H6) e0 t0) in |- *. apply H3. specialize notFV_abs with (1 := H4). simple induction 1; intro P. absurd (x = v); assumption. assumption. rewrite H7; simpl in |- *; reflexivity. apply TC_cond. apply H3; assumption || red in |- *; intro; apply H8; apply FV_cond1; assumption. apply H5; assumption || red in |- *; intro; apply H8; apply FV_cond2; assumption. apply H7; assumption || red in |- *; intro; apply H8; apply FV_cond3; assumption. apply TC_fix. specialize (Xmidvar x v); simple induction 1. intro xv; rewrite xv. change (TC (nil ++ (v, t0) :: H5 ++ (v, s) :: H6) e0 t0) in |- *. apply TEp_eqExt with (nil ++ (v, t0) :: H5 ++ H6). reflexivity. simpl in |- *; elim H7; assumption. reflexivity. intro nxv. change (TC (((v, t0) :: H5) ++ (x, s) :: H6) e0 t0) in |- *. apply H3. specialize notFV_fix with (1 := H4). simple induction 1; intro P. absurd (x = v); assumption. assumption. rewrite H7; simpl in |- *; reflexivity. apply TC_clos. apply H3; assumption || red in |- *; intro; apply H6; apply FV_closa; assumption. specialize (Xmidvar x v); simple induction 1. intro xv; rewrite xv. change (TC (nil ++ (v, s0) :: H7 ++ (v, s) :: H8) e0 t0) in |- *. apply TEp_eqExt with (nil ++ (v, s0) :: H7 ++ H8). reflexivity. simpl in |- *; elim H9; assumption. reflexivity. intro nxv. change (TC (((v, s0) :: H7) ++ (x, s) :: H8) e0 t0) in |- *. apply H5. specialize notFV_clos with (1 := H6). simple induction 1; intro; simple induction 1; intro P. absurd (x = v); assumption. assumption. rewrite H9; simpl in |- *; reflexivity. Save TEp_nfvExt. Goal forall (H1 H : ty_env) (e : tm) (t : ty) (x : vari) (s : ty), TC H1 e t -> forall HF : ty_env, H1 = HF ++ (x, s) :: H -> ~ FV x e -> TC (HF ++ H) e t. simple induction 1; intros. apply TC_o. apply TC_ttt. apply TC_fff. apply TC_succ; apply H4; assumption || red in |- *; intro; apply H6; apply FV_succ; assumption. apply TC_prd; apply H4; assumption || red in |- *; intro; apply H6; apply FV_prd; assumption. apply TC_is_o; apply H4; assumption || red in |- *; intro; apply H6; apply FV_is_o; assumption. apply TC_var. apply Mp_inv_nfvExt with x s. red in |- *; intro; apply H5; apply FV_var; symmetry in |- *; assumption. elim H4; assumption. apply TC_appl with s0. apply H4; assumption || red in |- *; intro; apply H8; apply FV_appl1; assumption. apply H6; assumption || red in |- *; intro; apply H8; apply FV_appl2; assumption. apply TC_abs. change (TC (((v, s0) :: HF) ++ H) e0 t0) in |- *. specialize (Xmidvar v x); simple induction 1; intros. simpl in |- *; change (TC (nil ++ (v, s0) :: HF ++ H) e0 t0) in |- *. apply TEp_inv_eqExt with x s (nil ++ (v, s0) :: HF ++ (x, s) :: H). assumption. elim H5; assumption. reflexivity. apply H4. simpl in |- *; elim H5; reflexivity. red in |- *; intro; apply H6; apply FV_abs; assumption || red in |- *; intro; apply H8; symmetry in |- *; assumption. apply TC_cond. apply H4; assumption || red in |- *; intro; apply H10; apply FV_cond1; assumption. apply H6; assumption || red in |- *; intro; apply H10; apply FV_cond2; assumption. apply H8; assumption || red in |- *; intro; apply H10; apply FV_cond3; assumption. apply TC_fix. specialize (Xmidvar v x); simple induction 1; intros. change (TC (nil ++ (v, t0) :: HF ++ H) e0 t0) in |- *. apply TEp_inv_eqExt with x s (nil ++ (v, t0) :: HF ++ (x, s) :: H). assumption. elim H5; assumption. reflexivity. change (TC (((v, t0) :: HF) ++ H) e0 t0) in |- *. apply H4. simpl in |- *; elim H5; reflexivity. red in |- *; intro; apply H6; apply FV_fix; assumption || red in |- *; intro; apply H8; symmetry in |- *; assumption. apply TC_clos. apply H4; assumption || red in |- *; intro; apply H8; apply FV_closa; assumption. specialize (Xmidvar x v); simple induction 1; intros. change (TC (nil ++ (v, s0) :: HF ++ H) e0 t0) in |- *. apply TEp_inv_eqExt with x s (nil ++ (v, s0) :: HF ++ (x, s) :: H). symmetry in |- *; assumption. elim H7; assumption. reflexivity. change (TC (((v, s0) :: HF) ++ H) e0 t0) in |- *. apply H6. simpl in |- *; elim H7; reflexivity. red in |- *; intro; apply H8; apply FV_closb; assumption. Save TEp_inv_nfvExt. Goal forall v x : vari, v <> x -> forall (r s t : ty) (e : tm) (H1 HB : ty_env), TC H1 e r -> forall HF : ty_env, H1 = HF ++ (x, s) :: (v, t) :: HB -> TC (HF ++ (v, t) :: (x, s) :: HB) e r. simple induction 2; simpl in |- *; intros. apply TC_o. apply TC_ttt. apply TC_fff. apply TC_succ; apply (H4 HF); assumption. apply TC_prd; apply (H4 HF); assumption. apply TC_is_o; apply (H4 HF); assumption. apply TC_var; apply Mp_swap. red in |- *; intro; apply H; symmetry in |- *; assumption. elim H4; assumption. apply TC_appl with s0. apply (H4 HF); assumption. apply H6; assumption. apply TC_abs. change (TC (((v0, s0) :: HF) ++ (v, t) :: (x, s) :: HB) e0 t0) in |- *. apply (H4 ((v0, s0) :: HF)); simpl in |- *. elim H5; reflexivity. apply TC_cond. apply (H4 HF); assumption. apply (H6 HF); assumption. apply (H8 HF); assumption. apply TC_fix. change (TC (((v0, t0) :: HF) ++ (v, t) :: (x, s) :: HB) e0 t0) in |- *. apply (H4 ((v0, t0) :: HF)); simpl in |- *. elim H5; reflexivity. apply TC_clos. apply (H4 HF); assumption. change (TC (((v0, s0) :: HF) ++ (v, t) :: (x, s) :: HB) e0 t0) in |- *. apply (H6 ((v0, s0) :: HF)); simpl in |- *. elim H7; reflexivity. Save TEp_swap.
Require Import Arith. Require Import Nat_complements. Require Import Zbase. Require Import Z_succ_pred. Fixpoint add1 (x2 : Z) (n : nat) {struct n} : Z := match n with | O => succZ x2 | S n0 => succZ (add1 x2 n0) end with add2 (x2 : Z) (n : nat) {struct n} : Z := match n with | O => predZ x2 | S n0 => predZ (add2 x2 n0) end. Definition addZ (x1 x2 : Z) : Z := match x1 with | OZ => x2 | pos n => add1 x2 n | neg n => add2 x2 n end. Lemma addZ_eq1 : forall y : Z, addZ OZ y = y. Proof. (* Goal: forall y : Z, @eq Z (addZ OZ y) y *) auto with arith. Qed. Lemma addZ_eq2 : forall y : Z, addZ (pos 0) y = succZ y. Proof. (* Goal: forall y : Z, @eq Z (addZ (pos O) y) (succZ y) *) auto with arith. Qed. Lemma addZ_eq3 : forall (n1 : nat) (y : Z), addZ (pos (S n1)) y = succZ (addZ (pos n1) y). Proof. (* Goal: forall (n1 : nat) (y : Z), @eq Z (addZ (pos (S n1)) y) (succZ (addZ (pos n1) y)) *) auto with arith. Qed. Lemma addZ_eq4 : forall y : Z, addZ (neg 0) y = predZ y. Proof. (* Goal: forall y : Z, @eq Z (addZ (neg O) y) (predZ y) *) auto with arith. Qed. Lemma addZ_eq5 : forall (n1 : nat) (y : Z), addZ (neg (S n1)) y = predZ (addZ (neg n1) y). Proof. (* Goal: forall (n1 : nat) (y : Z), @eq Z (addZ (neg (S n1)) y) (predZ (addZ (neg n1) y)) *) auto with arith. Qed. Lemma succ_addZ_l : forall x y : Z, addZ (succZ x) y = succZ (addZ x y). Proof. (* Goal: forall x y : Z, @eq Z (addZ (succZ x) y) (succZ (addZ x y)) *) intro x; elim x; auto with arith. (* Goal: forall (n : nat) (y : Z), @eq Z (addZ (succZ (neg n)) y) (succZ (addZ (neg n) y)) *) intro n; elim n; auto with arith. (* Goal: forall (n : nat) (_ : forall y : Z, @eq Z (addZ (succZ (neg n)) y) (succZ (addZ (neg n) y))) (y : Z), @eq Z (addZ (succZ (neg (S n))) y) (succZ (addZ (neg (S n)) y)) *) (* Goal: forall y : Z, @eq Z (addZ (succZ (neg O)) y) (succZ (addZ (neg O) y)) *) simpl in |- *. (* Goal: forall (n : nat) (_ : forall y : Z, @eq Z (addZ (succZ (neg n)) y) (succZ (addZ (neg n) y))) (y : Z), @eq Z (addZ (succZ (neg (S n))) y) (succZ (addZ (neg (S n)) y)) *) (* Goal: forall y : Z, @eq Z y (succZ (predZ y)) *) intro y. (* Goal: forall (n : nat) (_ : forall y : Z, @eq Z (addZ (succZ (neg n)) y) (succZ (addZ (neg n) y))) (y : Z), @eq Z (addZ (succZ (neg (S n))) y) (succZ (addZ (neg (S n)) y)) *) (* Goal: @eq Z y (succZ (predZ y)) *) rewrite succ_predZ; auto with arith. (* Goal: forall (n : nat) (_ : forall y : Z, @eq Z (addZ (succZ (neg n)) y) (succZ (addZ (neg n) y))) (y : Z), @eq Z (addZ (succZ (neg (S n))) y) (succZ (addZ (neg (S n)) y)) *) intros; symmetry in |- *; rewrite addZ_eq5. (* Goal: @eq Z (succZ (predZ (addZ (neg n0) y))) (addZ (succZ (neg (S n0))) y) *) apply succ_predZ. Qed. Lemma pred_addZ_l : forall x y : Z, addZ (predZ x) y = predZ (addZ x y). Proof. (* Goal: forall x y : Z, @eq Z (addZ (predZ x) y) (predZ (addZ x y)) *) intros; elim x. (* Goal: forall n : nat, @eq Z (addZ (predZ (neg n)) y) (predZ (addZ (neg n) y)) *) (* Goal: forall n : nat, @eq Z (addZ (predZ (pos n)) y) (predZ (addZ (pos n) y)) *) (* Goal: @eq Z (addZ (predZ OZ) y) (predZ (addZ OZ y)) *) reflexivity. (* Goal: forall n : nat, @eq Z (addZ (predZ (neg n)) y) (predZ (addZ (neg n) y)) *) (* Goal: forall n : nat, @eq Z (addZ (predZ (pos n)) y) (predZ (addZ (pos n) y)) *) simple destruct n. (* Goal: forall n : nat, @eq Z (addZ (predZ (neg n)) y) (predZ (addZ (neg n) y)) *) (* Goal: forall n : nat, @eq Z (addZ (predZ (pos (S n))) y) (predZ (addZ (pos (S n)) y)) *) (* Goal: @eq Z (addZ (predZ (pos O)) y) (predZ (addZ (pos O) y)) *) simpl in |- *; rewrite pred_succZ; trivial with arith. (* Goal: forall n : nat, @eq Z (addZ (predZ (neg n)) y) (predZ (addZ (neg n) y)) *) (* Goal: forall n : nat, @eq Z (addZ (predZ (pos (S n))) y) (predZ (addZ (pos (S n)) y)) *) intros; rewrite addZ_eq3; rewrite pred_succZ; trivial with arith. (* Goal: forall n : nat, @eq Z (addZ (predZ (neg n)) y) (predZ (addZ (neg n) y)) *) trivial with arith. Qed. Lemma tech_add_pos_succZ : forall (x : nat) (y : Z), addZ (pos (S x)) y = succZ (addZ (pos x) y). Proof addZ_eq3. Lemma tech_add_neg_predZ : forall (x : nat) (y : Z), addZ (neg (S x)) y = predZ (addZ (neg x) y). Proof addZ_eq5. Lemma succ_addZ_r : forall x y : Z, addZ x (succZ y) = succZ (addZ x y). Proof. (* Goal: forall x y : Z, @eq Z (addZ x (succZ y)) (succZ (addZ x y)) *) intros; elim x. (* Goal: forall n : nat, @eq Z (addZ (neg n) (succZ y)) (succZ (addZ (neg n) y)) *) (* Goal: forall n : nat, @eq Z (addZ (pos n) (succZ y)) (succZ (addZ (pos n) y)) *) (* Goal: @eq Z (addZ OZ (succZ y)) (succZ (addZ OZ y)) *) reflexivity. (* Goal: forall n : nat, @eq Z (addZ (neg n) (succZ y)) (succZ (addZ (neg n) y)) *) (* Goal: forall n : nat, @eq Z (addZ (pos n) (succZ y)) (succZ (addZ (pos n) y)) *) simple induction n. (* Goal: forall n : nat, @eq Z (addZ (neg n) (succZ y)) (succZ (addZ (neg n) y)) *) (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) (succZ y)) (succZ (addZ (pos n) y))), @eq Z (addZ (pos (S n)) (succZ y)) (succZ (addZ (pos (S n)) y)) *) (* Goal: @eq Z (addZ (pos O) (succZ y)) (succZ (addZ (pos O) y)) *) reflexivity. (* Goal: forall n : nat, @eq Z (addZ (neg n) (succZ y)) (succZ (addZ (neg n) y)) *) (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) (succZ y)) (succZ (addZ (pos n) y))), @eq Z (addZ (pos (S n)) (succZ y)) (succZ (addZ (pos (S n)) y)) *) intros. (* Goal: forall n : nat, @eq Z (addZ (neg n) (succZ y)) (succZ (addZ (neg n) y)) *) (* Goal: @eq Z (addZ (pos (S n0)) (succZ y)) (succZ (addZ (pos (S n0)) y)) *) do 2 rewrite (tech_add_pos_succZ n0). (* Goal: forall n : nat, @eq Z (addZ (neg n) (succZ y)) (succZ (addZ (neg n) y)) *) (* Goal: @eq Z (succZ (addZ (pos n0) (succZ y))) (succZ (succZ (addZ (pos n0) y))) *) elim H; reflexivity. (* Goal: forall n : nat, @eq Z (addZ (neg n) (succZ y)) (succZ (addZ (neg n) y)) *) simple induction n. (* Goal: forall (n : nat) (_ : @eq Z (addZ (neg n) (succZ y)) (succZ (addZ (neg n) y))), @eq Z (addZ (neg (S n)) (succZ y)) (succZ (addZ (neg (S n)) y)) *) (* Goal: @eq Z (addZ (neg O) (succZ y)) (succZ (addZ (neg O) y)) *) simpl in |- *; symmetry in |- *; apply succ_pred_pred_succZ. (* Goal: forall (n : nat) (_ : @eq Z (addZ (neg n) (succZ y)) (succZ (addZ (neg n) y))), @eq Z (addZ (neg (S n)) (succZ y)) (succZ (addZ (neg (S n)) y)) *) intros. (* Goal: @eq Z (addZ (neg (S n0)) (succZ y)) (succZ (addZ (neg (S n0)) y)) *) do 2 rewrite (tech_add_neg_predZ n0). (* Goal: @eq Z (predZ (addZ (neg n0) (succZ y))) (succZ (predZ (addZ (neg n0) y))) *) rewrite H. (* Goal: @eq Z (predZ (succZ (addZ (neg n0) y))) (succZ (predZ (addZ (neg n0) y))) *) symmetry in |- *; apply succ_pred_pred_succZ. Qed. Lemma pred_addZ_r : forall x y : Z, addZ x (predZ y) = predZ (addZ x y). Proof. (* Goal: forall x y : Z, @eq Z (addZ x (predZ y)) (predZ (addZ x y)) *) intros; elim x. (* Goal: forall n : nat, @eq Z (addZ (neg n) (predZ y)) (predZ (addZ (neg n) y)) *) (* Goal: forall n : nat, @eq Z (addZ (pos n) (predZ y)) (predZ (addZ (pos n) y)) *) (* Goal: @eq Z (addZ OZ (predZ y)) (predZ (addZ OZ y)) *) reflexivity. (* Goal: forall n : nat, @eq Z (addZ (neg n) (predZ y)) (predZ (addZ (neg n) y)) *) (* Goal: forall n : nat, @eq Z (addZ (pos n) (predZ y)) (predZ (addZ (pos n) y)) *) simple induction n. (* Goal: forall n : nat, @eq Z (addZ (neg n) (predZ y)) (predZ (addZ (neg n) y)) *) (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) (predZ y)) (predZ (addZ (pos n) y))), @eq Z (addZ (pos (S n)) (predZ y)) (predZ (addZ (pos (S n)) y)) *) (* Goal: @eq Z (addZ (pos O) (predZ y)) (predZ (addZ (pos O) y)) *) simpl in |- *; apply succ_pred_pred_succZ. (* Goal: forall n : nat, @eq Z (addZ (neg n) (predZ y)) (predZ (addZ (neg n) y)) *) (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) (predZ y)) (predZ (addZ (pos n) y))), @eq Z (addZ (pos (S n)) (predZ y)) (predZ (addZ (pos (S n)) y)) *) intros. (* Goal: forall n : nat, @eq Z (addZ (neg n) (predZ y)) (predZ (addZ (neg n) y)) *) (* Goal: @eq Z (addZ (pos (S n0)) (predZ y)) (predZ (addZ (pos (S n0)) y)) *) do 2 rewrite (tech_add_pos_succZ n0). (* Goal: forall n : nat, @eq Z (addZ (neg n) (predZ y)) (predZ (addZ (neg n) y)) *) (* Goal: @eq Z (succZ (addZ (pos n0) (predZ y))) (predZ (succZ (addZ (pos n0) y))) *) rewrite H; apply succ_pred_pred_succZ. (* Goal: forall n : nat, @eq Z (addZ (neg n) (predZ y)) (predZ (addZ (neg n) y)) *) simple induction n. (* Goal: forall (n : nat) (_ : @eq Z (addZ (neg n) (predZ y)) (predZ (addZ (neg n) y))), @eq Z (addZ (neg (S n)) (predZ y)) (predZ (addZ (neg (S n)) y)) *) (* Goal: @eq Z (addZ (neg O) (predZ y)) (predZ (addZ (neg O) y)) *) reflexivity. (* Goal: forall (n : nat) (_ : @eq Z (addZ (neg n) (predZ y)) (predZ (addZ (neg n) y))), @eq Z (addZ (neg (S n)) (predZ y)) (predZ (addZ (neg (S n)) y)) *) intros. (* Goal: @eq Z (addZ (neg (S n0)) (predZ y)) (predZ (addZ (neg (S n0)) y)) *) do 2 rewrite (tech_add_neg_predZ n0). (* Goal: @eq Z (predZ (addZ (neg n0) (predZ y))) (predZ (predZ (addZ (neg n0) y))) *) elim H; reflexivity. Qed. Lemma add_OZ : forall x : Z, addZ x OZ = x. Proof. (* Goal: forall x : Z, @eq Z (addZ x OZ) x *) simple induction x. (* Goal: forall n : nat, @eq Z (addZ (neg n) OZ) (neg n) *) (* Goal: forall n : nat, @eq Z (addZ (pos n) OZ) (pos n) *) (* Goal: @eq Z (addZ OZ OZ) OZ *) reflexivity. (* Goal: forall n : nat, @eq Z (addZ (neg n) OZ) (neg n) *) (* Goal: forall n : nat, @eq Z (addZ (pos n) OZ) (pos n) *) simple induction n. (* Goal: forall n : nat, @eq Z (addZ (neg n) OZ) (neg n) *) (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) OZ) (pos n)), @eq Z (addZ (pos (S n)) OZ) (pos (S n)) *) (* Goal: @eq Z (addZ (pos O) OZ) (pos O) *) reflexivity. (* Goal: forall n : nat, @eq Z (addZ (neg n) OZ) (neg n) *) (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) OZ) (pos n)), @eq Z (addZ (pos (S n)) OZ) (pos (S n)) *) intros; rewrite tech_add_pos_succZ; rewrite H; reflexivity. (* Goal: forall n : nat, @eq Z (addZ (neg n) OZ) (neg n) *) simple induction n. (* Goal: forall (n : nat) (_ : @eq Z (addZ (neg n) OZ) (neg n)), @eq Z (addZ (neg (S n)) OZ) (neg (S n)) *) (* Goal: @eq Z (addZ (neg O) OZ) (neg O) *) reflexivity. (* Goal: forall (n : nat) (_ : @eq Z (addZ (neg n) OZ) (neg n)), @eq Z (addZ (neg (S n)) OZ) (neg (S n)) *) intros; rewrite tech_add_neg_predZ; rewrite H; reflexivity. Qed. Lemma add_IZ_succZ : forall x : Z, addZ x IZ = succZ x. Proof. (* Goal: forall x : Z, @eq Z (addZ x IZ) (succZ x) *) intros. (* Goal: @eq Z (addZ x IZ) (succZ x) *) cut (succZ OZ = IZ); intros. (* Goal: @eq Z (succZ OZ) IZ *) (* Goal: @eq Z (addZ x IZ) (succZ x) *) elim H. (* Goal: @eq Z (succZ OZ) IZ *) (* Goal: @eq Z (addZ x (succZ OZ)) (succZ x) *) rewrite (succ_addZ_r x OZ); rewrite (add_OZ x); reflexivity. (* Goal: @eq Z (succZ OZ) IZ *) reflexivity. Qed. Lemma add_mIZ_predZ : forall x : Z, addZ x (neg 0) = predZ x. Proof. (* Goal: forall x : Z, @eq Z (addZ x (neg O)) (predZ x) *) intros. (* Goal: @eq Z (addZ x (neg O)) (predZ x) *) cut (predZ OZ = neg 0); intros. (* Goal: @eq Z (predZ OZ) (neg O) *) (* Goal: @eq Z (addZ x (neg O)) (predZ x) *) elim H. (* Goal: @eq Z (predZ OZ) (neg O) *) (* Goal: @eq Z (addZ x (predZ OZ)) (predZ x) *) rewrite (pred_addZ_r x OZ); rewrite (add_OZ x); reflexivity. (* Goal: @eq Z (predZ OZ) (neg O) *) reflexivity. Qed. Definition commutative (U : Set) (op : U -> U -> U) := forall x y : U, op x y = op y x. Theorem addZ_commutativity : commutative Z addZ. Proof. (* Goal: commutative Z addZ *) unfold commutative in |- *; intros; elim x. (* Goal: forall n : nat, @eq Z (addZ (neg n) y) (addZ y (neg n)) *) (* Goal: forall n : nat, @eq Z (addZ (pos n) y) (addZ y (pos n)) *) (* Goal: @eq Z (addZ OZ y) (addZ y OZ) *) simpl in |- *; symmetry in |- *; exact (add_OZ y). (* Goal: forall n : nat, @eq Z (addZ (neg n) y) (addZ y (neg n)) *) (* Goal: forall n : nat, @eq Z (addZ (pos n) y) (addZ y (pos n)) *) simple induction n. (* Goal: forall n : nat, @eq Z (addZ (neg n) y) (addZ y (neg n)) *) (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) y) (addZ y (pos n))), @eq Z (addZ (pos (S n)) y) (addZ y (pos (S n))) *) (* Goal: @eq Z (addZ (pos O) y) (addZ y (pos O)) *) simpl in |- *; symmetry in |- *; exact (add_IZ_succZ y). (* Goal: forall n : nat, @eq Z (addZ (neg n) y) (addZ y (neg n)) *) (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) y) (addZ y (pos n))), @eq Z (addZ (pos (S n)) y) (addZ y (pos (S n))) *) intros; rewrite (tech_add_pos_succZ n0 y). (* Goal: forall n : nat, @eq Z (addZ (neg n) y) (addZ y (neg n)) *) (* Goal: @eq Z (succZ (addZ (pos n0) y)) (addZ y (pos (S n0))) *) rewrite H. (* Goal: forall n : nat, @eq Z (addZ (neg n) y) (addZ y (neg n)) *) (* Goal: @eq Z (succZ (addZ y (pos n0))) (addZ y (pos (S n0))) *) cut (succZ (pos n0) = pos (S n0)); intros. (* Goal: forall n : nat, @eq Z (addZ (neg n) y) (addZ y (neg n)) *) (* Goal: @eq Z (succZ (pos n0)) (pos (S n0)) *) (* Goal: @eq Z (succZ (addZ y (pos n0))) (addZ y (pos (S n0))) *) elim H0. (* Goal: forall n : nat, @eq Z (addZ (neg n) y) (addZ y (neg n)) *) (* Goal: @eq Z (succZ (pos n0)) (pos (S n0)) *) (* Goal: @eq Z (succZ (addZ y (pos n0))) (addZ y (succZ (pos n0))) *) rewrite (succ_addZ_r y (pos n0)); reflexivity. (* Goal: forall n : nat, @eq Z (addZ (neg n) y) (addZ y (neg n)) *) (* Goal: @eq Z (succZ (pos n0)) (pos (S n0)) *) reflexivity. (* Goal: forall n : nat, @eq Z (addZ (neg n) y) (addZ y (neg n)) *) simple induction n. (* Goal: forall (n : nat) (_ : @eq Z (addZ (neg n) y) (addZ y (neg n))), @eq Z (addZ (neg (S n)) y) (addZ y (neg (S n))) *) (* Goal: @eq Z (addZ (neg O) y) (addZ y (neg O)) *) simpl in |- *; symmetry in |- *; exact (add_mIZ_predZ y). (* Goal: forall (n : nat) (_ : @eq Z (addZ (neg n) y) (addZ y (neg n))), @eq Z (addZ (neg (S n)) y) (addZ y (neg (S n))) *) intros; rewrite (tech_add_neg_predZ n0 y). (* Goal: @eq Z (predZ (addZ (neg n0) y)) (addZ y (neg (S n0))) *) rewrite H. (* Goal: @eq Z (predZ (addZ y (neg n0))) (addZ y (neg (S n0))) *) cut (predZ (neg n0) = neg (S n0)); intros. (* Goal: @eq Z (predZ (neg n0)) (neg (S n0)) *) (* Goal: @eq Z (predZ (addZ y (neg n0))) (addZ y (neg (S n0))) *) elim H0. (* Goal: @eq Z (predZ (neg n0)) (neg (S n0)) *) (* Goal: @eq Z (predZ (addZ y (neg n0))) (addZ y (predZ (neg n0))) *) rewrite (pred_addZ_r y (neg n0)); reflexivity. (* Goal: @eq Z (predZ (neg n0)) (neg (S n0)) *) reflexivity. Qed. Lemma tech_add_pos_neg_posZ : forall n1 n2 : nat, n2 < n1 -> addZ (pos n1) (neg n2) = pos (n1 - S n2). Proof. (* Goal: forall (n1 n2 : nat) (_ : lt n2 n1), @eq Z (addZ (pos n1) (neg n2)) (pos (Init.Nat.sub n1 (S n2))) *) simple induction n2. (* Goal: forall (n : nat) (_ : forall _ : lt n n1, @eq Z (addZ (pos n1) (neg n)) (pos (Init.Nat.sub n1 (S n)))) (_ : lt (S n) n1), @eq Z (addZ (pos n1) (neg (S n))) (pos (Init.Nat.sub n1 (S (S n)))) *) (* Goal: forall _ : lt O n1, @eq Z (addZ (pos n1) (neg O)) (pos (Init.Nat.sub n1 (S O))) *) intros; elim (addZ_commutativity (neg 0) (pos n1)). (* Goal: forall (n : nat) (_ : forall _ : lt n n1, @eq Z (addZ (pos n1) (neg n)) (pos (Init.Nat.sub n1 (S n)))) (_ : lt (S n) n1), @eq Z (addZ (pos n1) (neg (S n))) (pos (Init.Nat.sub n1 (S (S n)))) *) (* Goal: @eq Z (addZ (neg O) (pos n1)) (pos (Init.Nat.sub n1 (S O))) *) rewrite addZ_eq4. (* Goal: forall (n : nat) (_ : forall _ : lt n n1, @eq Z (addZ (pos n1) (neg n)) (pos (Init.Nat.sub n1 (S n)))) (_ : lt (S n) n1), @eq Z (addZ (pos n1) (neg (S n))) (pos (Init.Nat.sub n1 (S (S n)))) *) (* Goal: @eq Z (predZ (pos n1)) (pos (Init.Nat.sub n1 (S O))) *) elim minus_n_Sm; trivial with arith. (* Goal: forall (n : nat) (_ : forall _ : lt n n1, @eq Z (addZ (pos n1) (neg n)) (pos (Init.Nat.sub n1 (S n)))) (_ : lt (S n) n1), @eq Z (addZ (pos n1) (neg (S n))) (pos (Init.Nat.sub n1 (S (S n)))) *) (* Goal: @eq Z (predZ (pos n1)) (pos (Init.Nat.pred (Init.Nat.sub n1 O))) *) elim minus_n_O. (* Goal: forall (n : nat) (_ : forall _ : lt n n1, @eq Z (addZ (pos n1) (neg n)) (pos (Init.Nat.sub n1 (S n)))) (_ : lt (S n) n1), @eq Z (addZ (pos n1) (neg (S n))) (pos (Init.Nat.sub n1 (S (S n)))) *) (* Goal: @eq Z (predZ (pos n1)) (pos (Init.Nat.pred n1)) *) apply tech_pred_posZ; trivial with arith. (* Goal: forall (n : nat) (_ : forall _ : lt n n1, @eq Z (addZ (pos n1) (neg n)) (pos (Init.Nat.sub n1 (S n)))) (_ : lt (S n) n1), @eq Z (addZ (pos n1) (neg (S n))) (pos (Init.Nat.sub n1 (S (S n)))) *) intros; elim (addZ_commutativity (neg (S n)) (pos n1)). (* Goal: @eq Z (addZ (neg (S n)) (pos n1)) (pos (Init.Nat.sub n1 (S (S n)))) *) rewrite tech_add_neg_predZ. (* Goal: @eq Z (predZ (addZ (neg n) (pos n1))) (pos (Init.Nat.sub n1 (S (S n)))) *) elim (addZ_commutativity (pos n1) (neg n)). (* Goal: @eq Z (predZ (addZ (pos n1) (neg n))) (pos (Init.Nat.sub n1 (S (S n)))) *) rewrite H; auto with arith. (* Goal: @eq Z (predZ (pos (Init.Nat.sub n1 (S n)))) (pos (Init.Nat.sub n1 (S (S n)))) *) elim (minus_n_Sm n1 (S n) H0). (* Goal: @eq Z (predZ (pos (Init.Nat.sub n1 (S n)))) (pos (Init.Nat.pred (Init.Nat.sub n1 (S n)))) *) apply tech_pred_posZ. (* Goal: lt O (Init.Nat.sub n1 (S n)) *) apply lt_minus2; trivial with arith. Qed. Definition associative (U : Set) (op : U -> U -> U) := forall x y z : U, op x (op y z) = op (op x y) z. Theorem addZ_associativity : associative Z addZ. Proof. (* Goal: associative Z addZ *) unfold associative in |- *; intros; elim x. (* Goal: forall n : nat, @eq Z (addZ (neg n) (addZ y z)) (addZ (addZ (neg n) y) z) *) (* Goal: forall n : nat, @eq Z (addZ (pos n) (addZ y z)) (addZ (addZ (pos n) y) z) *) (* Goal: @eq Z (addZ OZ (addZ y z)) (addZ (addZ OZ y) z) *) unfold addZ in |- *; reflexivity. (* Goal: forall n : nat, @eq Z (addZ (neg n) (addZ y z)) (addZ (addZ (neg n) y) z) *) (* Goal: forall n : nat, @eq Z (addZ (pos n) (addZ y z)) (addZ (addZ (pos n) y) z) *) intros; elim n. (* Goal: forall n : nat, @eq Z (addZ (neg n) (addZ y z)) (addZ (addZ (neg n) y) z) *) (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) (addZ y z)) (addZ (addZ (pos n) y) z)), @eq Z (addZ (pos (S n)) (addZ y z)) (addZ (addZ (pos (S n)) y) z) *) (* Goal: @eq Z (addZ (pos O) (addZ y z)) (addZ (addZ (pos O) y) z) *) simpl in |- *; symmetry in |- *; exact (succ_addZ_l y z). (* Goal: forall n : nat, @eq Z (addZ (neg n) (addZ y z)) (addZ (addZ (neg n) y) z) *) (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) (addZ y z)) (addZ (addZ (pos n) y) z)), @eq Z (addZ (pos (S n)) (addZ y z)) (addZ (addZ (pos (S n)) y) z) *) intros. (* Goal: forall n : nat, @eq Z (addZ (neg n) (addZ y z)) (addZ (addZ (neg n) y) z) *) (* Goal: @eq Z (addZ (pos (S n0)) (addZ y z)) (addZ (addZ (pos (S n0)) y) z) *) do 2 rewrite (tech_add_pos_succZ n0). (* Goal: forall n : nat, @eq Z (addZ (neg n) (addZ y z)) (addZ (addZ (neg n) y) z) *) (* Goal: @eq Z (succZ (addZ (pos n0) (addZ y z))) (addZ (succZ (addZ (pos n0) y)) z) *) rewrite (succ_addZ_l (addZ (pos n0) y) z); elim H; reflexivity. (* Goal: forall n : nat, @eq Z (addZ (neg n) (addZ y z)) (addZ (addZ (neg n) y) z) *) simple induction n. (* Goal: forall (n : nat) (_ : @eq Z (addZ (neg n) (addZ y z)) (addZ (addZ (neg n) y) z)), @eq Z (addZ (neg (S n)) (addZ y z)) (addZ (addZ (neg (S n)) y) z) *) (* Goal: @eq Z (addZ (neg O) (addZ y z)) (addZ (addZ (neg O) y) z) *) simpl in |- *; symmetry in |- *; exact (pred_addZ_l y z). (* Goal: forall (n : nat) (_ : @eq Z (addZ (neg n) (addZ y z)) (addZ (addZ (neg n) y) z)), @eq Z (addZ (neg (S n)) (addZ y z)) (addZ (addZ (neg (S n)) y) z) *) intros. (* Goal: @eq Z (addZ (neg (S n0)) (addZ y z)) (addZ (addZ (neg (S n0)) y) z) *) do 2 rewrite (tech_add_neg_predZ n0). (* Goal: @eq Z (predZ (addZ (neg n0) (addZ y z))) (addZ (predZ (addZ (neg n0) y)) z) *) rewrite (pred_addZ_l (addZ (neg n0) y) z); elim H; reflexivity. Qed. Definition IdZ (x : Z) := True. Definition neutral (S : Set) (G : S -> Prop) (Add : S -> S -> S) (O : S) := G O /\ (forall x : S, G x -> Add x O = x /\ Add O x = x). Theorem addZ_neutral : neutral Z IdZ addZ OZ. Proof. (* Goal: neutral Z IdZ addZ OZ *) unfold neutral in |- *; intros. (* Goal: and (IdZ OZ) (forall (x : Z) (_ : IdZ x), and (@eq Z (addZ x OZ) x) (@eq Z (addZ OZ x) x)) *) split. (* Goal: forall (x : Z) (_ : IdZ x), and (@eq Z (addZ x OZ) x) (@eq Z (addZ OZ x) x) *) (* Goal: IdZ OZ *) exact I. (* Goal: forall (x : Z) (_ : IdZ x), and (@eq Z (addZ x OZ) x) (@eq Z (addZ OZ x) x) *) intros. (* Goal: and (@eq Z (addZ x OZ) x) (@eq Z (addZ OZ x) x) *) split. (* Goal: @eq Z (addZ OZ x) x *) (* Goal: @eq Z (addZ x OZ) x *) exact (add_OZ x). (* Goal: @eq Z (addZ OZ x) x *) unfold addZ in |- *; reflexivity. Qed. Definition oppZ (x : Z) := match x return Z with | OZ => OZ | pos n => neg n | neg n => pos n end. Lemma opp_succZ : forall x : Z, oppZ (succZ x) = predZ (oppZ x). Proof. (* Goal: forall x : Z, @eq Z (oppZ (succZ x)) (predZ (oppZ x)) *) simple destruct x. (* Goal: forall n : nat, @eq Z (oppZ (succZ (neg n))) (predZ (oppZ (neg n))) *) (* Goal: forall n : nat, @eq Z (oppZ (succZ (pos n))) (predZ (oppZ (pos n))) *) (* Goal: @eq Z (oppZ (succZ OZ)) (predZ (oppZ OZ)) *) reflexivity. (* Goal: forall n : nat, @eq Z (oppZ (succZ (neg n))) (predZ (oppZ (neg n))) *) (* Goal: forall n : nat, @eq Z (oppZ (succZ (pos n))) (predZ (oppZ (pos n))) *) intros; reflexivity. (* Goal: forall n : nat, @eq Z (oppZ (succZ (neg n))) (predZ (oppZ (neg n))) *) simple destruct n; intros; reflexivity. Qed. Lemma opp_predZ : forall x : Z, oppZ (predZ x) = succZ (oppZ x). Proof. (* Goal: forall x : Z, @eq Z (oppZ (predZ x)) (succZ (oppZ x)) *) simple destruct x. (* Goal: forall n : nat, @eq Z (oppZ (predZ (neg n))) (succZ (oppZ (neg n))) *) (* Goal: forall n : nat, @eq Z (oppZ (predZ (pos n))) (succZ (oppZ (pos n))) *) (* Goal: @eq Z (oppZ (predZ OZ)) (succZ (oppZ OZ)) *) reflexivity. (* Goal: forall n : nat, @eq Z (oppZ (predZ (neg n))) (succZ (oppZ (neg n))) *) (* Goal: forall n : nat, @eq Z (oppZ (predZ (pos n))) (succZ (oppZ (pos n))) *) simple destruct n; intros; reflexivity. (* Goal: forall n : nat, @eq Z (oppZ (predZ (neg n))) (succZ (oppZ (neg n))) *) intros; reflexivity. Qed. Lemma tech_add_pos_negZ : forall n : nat, addZ (pos n) (neg n) = OZ. Proof. (* Goal: forall n : nat, @eq Z (addZ (pos n) (neg n)) OZ *) simple induction n. (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) (neg n)) OZ), @eq Z (addZ (pos (S n)) (neg (S n))) OZ *) (* Goal: @eq Z (addZ (pos O) (neg O)) OZ *) reflexivity. (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) (neg n)) OZ), @eq Z (addZ (pos (S n)) (neg (S n))) OZ *) intros; rewrite (tech_add_pos_succZ n0). (* Goal: @eq Z (succZ (addZ (pos n0) (neg (S n0)))) OZ *) elim succ_addZ_r; exact H. Qed. Lemma tech_add_neg_posZ : forall n : nat, addZ (neg n) (pos n) = OZ. Proof. (* Goal: forall n : nat, @eq Z (addZ (neg n) (pos n)) OZ *) intros; elim (addZ_commutativity (pos n) (neg n)); exact (tech_add_pos_negZ n). Qed. Lemma tech_add_pos_posZ : forall n m : nat, addZ (pos n) (pos m) = pos (S (n + m)). Proof. (* Goal: forall n m : nat, @eq Z (addZ (pos n) (pos m)) (pos (S (Init.Nat.add n m))) *) intros; elim n. (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) (pos m)) (pos (S (Init.Nat.add n m)))), @eq Z (addZ (pos (S n)) (pos m)) (pos (S (Init.Nat.add (S n) m))) *) (* Goal: @eq Z (addZ (pos O) (pos m)) (pos (S (Init.Nat.add O m))) *) reflexivity. (* Goal: forall (n : nat) (_ : @eq Z (addZ (pos n) (pos m)) (pos (S (Init.Nat.add n m)))), @eq Z (addZ (pos (S n)) (pos m)) (pos (S (Init.Nat.add (S n) m))) *) intros; rewrite (tech_add_pos_succZ n0 (pos m)); rewrite H; reflexivity. Qed. Lemma tech_add_neg_negZ : forall n m : nat, addZ (neg n) (neg m) = neg (S (n + m)). Proof. (* Goal: forall n m : nat, @eq Z (addZ (neg n) (neg m)) (neg (S (Init.Nat.add n m))) *) simple induction n. (* Goal: forall (n : nat) (_ : forall m : nat, @eq Z (addZ (neg n) (neg m)) (neg (S (Init.Nat.add n m)))) (m : nat), @eq Z (addZ (neg (S n)) (neg m)) (neg (S (Init.Nat.add (S n) m))) *) (* Goal: forall m : nat, @eq Z (addZ (neg O) (neg m)) (neg (S (Init.Nat.add O m))) *) reflexivity. (* Goal: forall (n : nat) (_ : forall m : nat, @eq Z (addZ (neg n) (neg m)) (neg (S (Init.Nat.add n m)))) (m : nat), @eq Z (addZ (neg (S n)) (neg m)) (neg (S (Init.Nat.add (S n) m))) *) intros; rewrite (tech_add_neg_predZ n0 (neg m)); rewrite H; reflexivity. Qed. Theorem abs_eq_or_oppZ : forall x : Z, {absZ x = x} + {absZ x = oppZ x}. Proof. (* Goal: forall x : Z, sumbool (@eq Z (absZ x) x) (@eq Z (absZ x) (oppZ x)) *) simple destruct x; auto with arith. Qed. Lemma tech_opp_pos_negZ : forall n : nat, oppZ (pos n) = neg n /\ oppZ (neg n) = pos n. Proof. (* Goal: forall n : nat, and (@eq Z (oppZ (pos n)) (neg n)) (@eq Z (oppZ (neg n)) (pos n)) *) simple induction n; auto with arith. Qed.
Require Import TS. Require Import sur_les_relations. Require Import sigma_lift. Require Import lambda_sigma_lift. Require Import terminaison_SL. Require Import conf_local_SL. Require Import betapar. Require Import SLstar_bpar_SLstar. Require Import conf_strong_betapar. Require Import commutation. Require Import Newman. Require Import Yokouchi. Goal forall b : wsort, explicit_confluence _ (e_relSL b). intros b. apply Newman. apply relSL_noetherian. apply conf_local_SL. Save confluence_SL. Goal forall b : wsort, explicit_strong_confluence _ (e_slstar_bp_slstar b). intro b; unfold e_slstar_bp_slstar in |- *. change (explicit_strong_confluence _ (Rstar_S_Rstar (TS b) (e_relSL b) (e_beta_par b))) in |- *. apply Yokouchi. apply confluence_SL. apply relSL_noetherian. apply sconf_betapar. intros f g h H H0. unfold Rstar_S_Rstar in |- *. change (exists k : TS b, e_relSLstar _ g k /\ e_slstar_bp_slstar _ h k) in |- *. apply commutation with f; assumption. Save strong_confluence_slbpsl. Goal forall b : wsort, explicit_confluence _ (e_slstar_bp_slstar b). intro b; apply strong_conf_conf; apply strong_confluence_slbpsl. Save confluence_slbpsl. Theorem confluence_LSL : forall b : wsort, explicit_confluence _ (e_relLSL b). Proof. (* Goal: forall b : wsort, explicit_confluence (TS b) (e_relLSL b) *) intro b; apply inclus_conf with (e_slstar_bp_slstar b). (* Goal: explicit_confluence (TS b) (e_slstar_bp_slstar b) *) (* Goal: explicit_inclus (TS b) (e_slstar_bp_slstar b) (explicit_star (TS b) (e_relLSL b)) *) (* Goal: explicit_inclus (TS b) (e_relLSL b) (e_slstar_bp_slstar b) *) apply relLSL_inclus_slbpsl. (* Goal: explicit_confluence (TS b) (e_slstar_bp_slstar b) *) (* Goal: explicit_inclus (TS b) (e_slstar_bp_slstar b) (explicit_star (TS b) (e_relLSL b)) *) change (explicit_inclus _ (e_slstar_bp_slstar b) (e_relLSLstar b)) in |- *. (* Goal: explicit_confluence (TS b) (e_slstar_bp_slstar b) *) (* Goal: explicit_inclus (TS b) (e_slstar_bp_slstar b) (e_relLSLstar b) *) apply slbpsl_inclus_relLSLstar. (* Goal: explicit_confluence (TS b) (e_slstar_bp_slstar b) *) apply confluence_slbpsl. Qed.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrfun ssrbool eqtype ssrnat seq choice fintype. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Module BigEnough. Record big_rel_class_of T (leq : rel T) := BigRelClass { leq_big_internal_op : rel T; bigger_than_op : seq T -> T; _ : leq_big_internal_op = leq; _ : forall i s, leq_big_internal_op i (bigger_than_op (i :: s)); _ : forall i j s, leq_big_internal_op i (bigger_than_op s) -> leq_big_internal_op i (bigger_than_op (j :: s)) }. Record big_rel_of T := BigRelOf { leq_big :> rel T; big_rel_class : big_rel_class_of leq_big }. Definition bigger_than_of T (b : big_rel_of T) (phb : phantom (rel T) b) := bigger_than_op (big_rel_class b). Notation bigger_than leq := (@bigger_than_of _ _ (Phantom (rel _) leq)). Definition leq_big_internal_of T (b : big_rel_of T) (phb : phantom (rel T) b) := leq_big_internal_op (big_rel_class b). Notation leq_big_internal leq := (@leq_big_internal_of _ _ (Phantom (rel _) leq)). Lemma next_bigger_than T (b : big_rel_of T) i j s : leq_big_internal b i (bigger_than b s) -> leq_big_internal b i (bigger_than b (j :: s)). Proof. (* Goal: forall _ : is_true (@leq_big_internal_of T b (Phantom (rel T) (@leq_big T b)) i (@bigger_than_of T b (Phantom (rel T) (@leq_big T b)) s)), is_true (@leq_big_internal_of T b (Phantom (rel T) (@leq_big T b)) i (@bigger_than_of T b (Phantom (rel T) (@leq_big T b)) (@cons T j s))) *) by case: b i j s => [? []]. Qed. Lemma instantiate_bigger_than T (b : big_rel_of T) i s : leq_big_internal b i (bigger_than b (i :: s)). Proof. (* Goal: is_true (@leq_big_internal_of T b (Phantom (rel T) (@leq_big T b)) i (@bigger_than_of T b (Phantom (rel T) (@leq_big T b)) (@cons T i s))) *) by case: b i s => [? []]. Qed. Lemma leq_big_internalE T (b : big_rel_of T) : leq_big_internal b = leq_big b. Proof. (* Goal: @eq (rel T) (@leq_big_internal_of T b (Phantom (rel T) (@leq_big T b))) (@leq_big T b) *) by case: b => [? []]. Qed. Lemma context_big_enough P T (b : big_rel_of T) i s : leq_big_internal b i (bigger_than b s) -> P true -> P (leq_big b i (bigger_than b s)). Proof. (* Goal: forall (_ : is_true (@leq_big_internal_of T b (Phantom (rel T) (@leq_big T b)) i (@bigger_than_of T b (Phantom (rel T) (@leq_big T b)) s))) (_ : P true), P (@leq_big T b i (@bigger_than_of T b (Phantom (rel T) (@leq_big T b)) s)) *) by rewrite leq_big_internalE => ->. Qed. Definition big_rel_leq_class : big_rel_class_of leq. Proof. (* Goal: @big_rel_class_of nat leq *) exists leq (foldr maxn 0%N) => [|i s|i j s /leq_trans->] //; by rewrite (leq_maxl, leq_maxr). Qed. Canonical big_enough_nat := BigRelOf big_rel_leq_class. Definition closed T (i : T) := {j : T | j = i}. Ltac close := match goal with | |- context [closed ?i] => instantiate (1 := [::]) in (Value of i); exists i end. Ltac pose_big_enough i := evar (i : nat); suff : closed i; first do [move=> _; instantiate (1 := bigger_than leq _) in (Value of i)]. Ltac pose_big_modulus m F := evar (m : F -> nat); suff : closed m; first do [move=> _; instantiate (1 := (fun e => bigger_than leq _)) in (Value of m)]. Ltac exists_big_modulus m F := pose_big_modulus m F; first exists m. Ltac olddone := trivial; hnf; intros; solve [ do ![solve [trivial | apply: sym_equal; trivial] | discriminate | contradiction | split] | case not_locked_false_eq_true; assumption | match goal with H : ~ _ |- _ => solve [case H; trivial] end]. Ltac big_enough := do ?[ apply context_big_enough; first do [do ?[ now apply instantiate_bigger_than | apply next_bigger_than]]]. Ltac big_enough_trans := match goal with | [leq_nm : is_true (?n <= ?m)%N |- is_true (?x <= ?m)] => apply: leq_trans leq_nm; big_enough; olddone | _ => big_enough; olddone end. Ltac done := do [olddone|big_enough_trans]. End BigEnough.
Require Export GeoCoq.Elements.OriginalProofs.lemma_droppedperpendicularunique. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma lemma_8_7 : forall A B C, Per C B A -> ~ Per A C B. Proof. (* Goal: forall (A B C : @Point Ax0) (_ : @Per Ax0 C B A), not (@Per Ax0 A C B) *) intros. (* Goal: not (@Per Ax0 A C B) *) assert (neq B A) by (conclude_def Per ). (* Goal: not (@Per Ax0 A C B) *) assert (Per A B C) by (conclude lemma_8_2). (* Goal: not (@Per Ax0 A C B) *) assert (neq B C) by (conclude_def Per ). (* Goal: not (@Per Ax0 A C B) *) assert (neq C B) by (conclude lemma_inequalitysymmetric). (* Goal: not (@Per Ax0 A C B) *) let Tf:=fresh in assert (Tf:exists E, (BetS B C E /\ Cong C E C B)) by (conclude lemma_extension);destruct Tf as [E];spliter. (* Goal: not (@Per Ax0 A C B) *) assert (Col B C E) by (conclude_def Col ). (* Goal: not (@Per Ax0 A C B) *) assert (Col E C B) by (forward_using lemma_collinearorder). (* Goal: not (@Per Ax0 A C B) *) assert (Per A B C) by (conclude lemma_8_2). (* Goal: not (@Per Ax0 A C B) *) assert (Out B C E) by (conclude lemma_ray4). (* Goal: not (@Per Ax0 A C B) *) assert (Per A B E) by (conclude lemma_8_3). (* Goal: not (@Per Ax0 A C B) *) assert (Per E B A) by (conclude lemma_8_2). (* Goal: not (@Per Ax0 A C B) *) assert (~ Per A C B). (* Goal: not (@Per Ax0 A C B) *) (* Goal: not (@Per Ax0 A C B) *) { (* Goal: not (@Per Ax0 A C B) *) intro. (* Goal: False *) assert (Per B C A) by (conclude lemma_8_2). (* Goal: False *) let Tf:=fresh in assert (Tf:exists F, (BetS B C F /\ Cong B C F C /\ Cong B A F A /\ neq C A)) by (conclude_def Per );destruct Tf as [F];spliter. (* Goal: False *) assert (Cong F C B C) by (conclude lemma_congruencesymmetric). (* Goal: False *) assert (Cong C F B C) by (forward_using lemma_congruenceflip). (* Goal: False *) assert (Cong C E B C) by (forward_using lemma_congruenceflip). (* Goal: False *) assert (Cong B C C E) by (conclude lemma_congruencesymmetric). (* Goal: False *) assert (Cong C F C E) by (conclude lemma_congruencetransitive). (* Goal: False *) assert (eq F E) by (conclude lemma_extensionunique). (* Goal: False *) assert (BetS E C B) by (conclude axiom_betweennesssymmetry). (* Goal: False *) assert (Cong F A B A) by (conclude lemma_congruencesymmetric). (* Goal: False *) assert (Cong E A B A) by (conclude cn_equalitysub). (* Goal: False *) assert (Cong E C B C) by (forward_using lemma_congruenceflip). (* Goal: False *) assert (Per E C A) by (conclude_def Per ). (* Goal: False *) assert (eq C B) by (conclude lemma_droppedperpendicularunique). (* Goal: False *) contradict. (* BG Goal: not (@Per Ax0 A C B) *) } (* Goal: not (@Per Ax0 A C B) *) close. Qed. End Euclid.
Require Import utf_AMM11262. Import NatSet GeneralProperties. Section example_five_inhabitants. Definition town_2:= {1}∪({2}∪({3}∪({4}∪({5}∪∅)))). Remark population₂ : |town_2| = 2×2 +1. Proof. (* Goal: @Logic.eq nat (cardinal town_2) (Nat.add (Nat.mul (S (S O)) (S (S O))) (S O)) *) reflexivity. Qed. Definition familiarity₂ (m n:elt):Prop := match m,n with | 1,2=> True | 1,3 => True | 1,4 => True | 1,5 => True | 2,1 => True | 2,5 => True | 3,1 => True | 3,4 => True | 3,5 => True | 4,1 => True | 4,3 => True | 5,1 => True | 5,2 => True | 5,3 => True | _,_ => False end. Infix "ℛ₂" := familiarity₂ (at level 70, no associativity). Remark familiarity₂_sym:∀ m n, m ℛ₂ n ⇒ n ℛ₂ m. Remark familiarity₂_extensional:∀ m n p, n≡p ⇒ m ℛ₂ n ⇒ m ℛ₂ p. Remark subsets_2: ∀ B, B⊆town_2 ⇒ |B| = 2 ⇒ (((((((((B ≐ {1}∪({2}∪∅)\/ B≐{1}∪({3}∪∅)) ∨ B≐{1}∪({4}∪∅)) ∨ B ≐ {1}∪({5}∪∅)) ∨ B≐{2}∪({3}∪∅)) ∨ B≐{2}∪({4}∪∅)) ∨ B≐{2}∪({5}∪∅)) ∨ B≐{3}∪({4}∪∅)) ∨ B ≐ {3}∪({5}∪∅)) ∨ B≐{4}∪({5}∪∅)). Proof. (* Goal: forall (B : t) (_ : Subset B town_2) (_ : @Logic.eq nat (cardinal B) (S (S O))), sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) intros B H_sub H_card. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) destruct (In_dec 1 B) as [H1|H1]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) do 6 left. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) assert (H_card_rem:|B\{1}|=1); [ rewrite <- (remove_cardinal_1 H1) in H_card; apply eq_add_S; assumption|]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) destruct (In_dec 2 (B\{1})) as [H12|H12]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) do 3 left. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal B (add (S O) (add (S (S O)) empty)) *) rewrite <- (add_remove H1). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (remove (S O) B)) (add (S O) (add (S (S O)) empty)) *) rewrite <- (add_remove H12). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) generalize (remove_cardinal_1 H12). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S O)) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) rewrite H_card_rem; intro H_eq2. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) rewrite (empty_is_empty_1 (cardinal_inv_1 (eq_add_S _ _ H_eq2))); reflexivity... destruct (In_dec 3 (B\{1})) as [H13|H13]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) do 2 left; right. rewrite <- (add_remove H1). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (remove (S O) B)))))) (add (S O) (add (S (S O)) empty)) *) rewrite <- (add_remove H13). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) generalize (remove_cardinal_1 H13). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) rewrite H_card_rem; intro H_eq2. rewrite (empty_is_empty_1 (cardinal_inv_1 (eq_add_S _ _ H_eq2))); reflexivity... destruct (In_dec 4 (B\{1})) as [H14|H14]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) left; right. rewrite <- (add_remove H1). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (remove (S O) B)))))) (cardinal (remove (S O) (add (S O) (remove (S O) B)))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (remove (S O) B)))))))))) (add (S O) (add (S (S O)) empty)) *) rewrite <- (add_remove H14). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) generalize (remove_cardinal_1 H14). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) rewrite H_card_rem; intro H_eq2. rewrite (empty_is_empty_1 (cardinal_inv_1 (eq_add_S _ _ H_eq2))); reflexivity... destruct (In_dec 5 (B\{1})) as [H15|H15]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) right. rewrite <- (add_remove H1). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) (add (S O) (remove (S O) B)))))) (cardinal (remove (S O) (add (S O) (remove (S O) B))))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) (add (S O) (remove (S O) B)))))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) (add (S O) (remove (S O) B))))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) (add (S O) (remove (S O) B)))))))))))))) (add (S O) (add (S (S O)) empty)) *) rewrite <- (add_remove H15). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) (add (S O) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S O) B))))))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) (add (S O) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S O) B)))))))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) (add (S O) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S O) B))))))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) (add (S O) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S O) B)))))))))))))))) (add (S O) (add (S (S O)) empty)) *) generalize (remove_cardinal_1 H15). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S (S O))))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) (add (S O) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S O) B))))))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) (add (S O) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S O) B)))))))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) (add (S O) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S O) B))))))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) (add (S O) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S O) B)))))))))))))))) (add (S O) (add (S (S O)) empty)) *) rewrite H_card_rem; intro H_eq2. rewrite (empty_is_empty_1 (cardinal_inv_1 (eq_add_S _ _ H_eq2))); reflexivity... apply False_rec. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) assert (H11:=(@remove_1 B _ _ (refl_equal 1))). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) destruct (cardinal_inv_2 H_card_rem) as [b Hb]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) destruct (NatSet.E.eq_dec b 1) as [Hb1|Hb1]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) apply H11; rewrite Hb1 in Hb; assumption. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) destruct (NatSet.E.eq_dec b 2) as [Hb2|Hb2]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) apply H12; rewrite <- Hb2; assumption. destruct (NatSet.E.eq_dec b 3) as [Hb3|Hb3]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) apply H13; rewrite <- Hb3; assumption. destruct (NatSet.E.eq_dec b 4) as [Hb4|Hb4]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) apply H14; rewrite <- Hb4; assumption. destruct (NatSet.E.eq_dec b 5) as [Hb5|Hb5]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) apply H15; rewrite <- Hb5; assumption. assert (H_sub':=@subset_remove_3 _ _ 1 H_sub). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) assert (Hb_town:=H_sub' _ Hb). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) unfold town_2 in Hb_town. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) destruct (proj1 (FM.add_iff _ _ b) Hb_town) as [Hb1_town|Hb1_town]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) apply Hb1; rewrite Hb1_town; reflexivity. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) destruct (proj1 (FM.add_iff _ _ b) Hb1_town) as [Hb2_town|Hb2_town]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) apply Hb2; rewrite Hb2_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb2_town) as [Hb3_town|Hb3_town]. apply Hb3; rewrite Hb3_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb3_town) as [Hb4_town|Hb4_town]. apply Hb4; rewrite Hb4_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb4_town) as [Hb5_town|Hb5_town]. apply Hb5; rewrite Hb5_town; reflexivity. apply (proj1 (FM.empty_iff b) Hb5_town)... destruct (In_dec 2 B) as [H2|H2]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) assert (H_card_rem:|B\{2}|=1); [ rewrite <- (remove_cardinal_1 H2) in H_card; apply eq_add_S; assumption|]. assert (H21:=fun HH : 1∈(B\{2}) => H1 (remove_3 HH)). destruct (In_dec 3 (B\{2})) as [H23|H23]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) do 5 left; right. rewrite <- (add_remove H2). rewrite <- (add_remove H23). generalize (remove_cardinal_1 H23). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) rewrite H_card_rem; intro H_eq2. rewrite (empty_is_empty_1 (cardinal_inv_1 (eq_add_S _ _ H_eq2))); reflexivity... destruct (In_dec 4 (B\{2})) as [H24|H24]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) do 4 left; right. rewrite <- (add_remove H2). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (remove (S (S O)) B)))))) (cardinal (remove (S (S O)) (add (S (S O)) (remove (S (S O)) B)))), False *) rewrite <- (add_remove H24). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))), False *) generalize (remove_cardinal_1 H24). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) rewrite H_card_rem; intro H_eq2. rewrite (empty_is_empty_1 (cardinal_inv_1 (eq_add_S _ _ H_eq2))); reflexivity... destruct (In_dec 5 (B\{2})) as [H25|H25]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) do 3 left; right. rewrite <- (add_remove H2). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) (add (S (S O)) (remove (S (S O)) B)))))) (cardinal (remove (S (S O)) (add (S (S O)) (remove (S (S O)) B))))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) (add (S (S O)) (remove (S (S O)) B)))))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) (add (S (S O)) (remove (S (S O)) B))))))))), False *) rewrite <- (add_remove H25). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S (S O)) B))))))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S (S O)) B)))))))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S (S O)) B))))))))))), False *) generalize (remove_cardinal_1 H25). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S (S O))))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S (S O)) B))))))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S (S O)) B)))))))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S (S O)) B))))))))))), False *) rewrite H_card_rem; intro H_eq2. rewrite (empty_is_empty_1 (cardinal_inv_1 (eq_add_S _ _ H_eq2))); reflexivity... apply False_rec. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) assert (H22:=(@remove_1 B _ _ (refl_equal 2))). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) destruct (cardinal_inv_2 H_card_rem) as [b Hb]. destruct (NatSet.E.eq_dec b 1) as [Hb1|Hb1]. apply H21; rewrite Hb1 in Hb; assumption. destruct (NatSet.E.eq_dec b 2) as [Hb2|Hb2]. apply H22; rewrite Hb2 in Hb; assumption. destruct (NatSet.E.eq_dec b 3) as [Hb3|Hb3]. apply H23; rewrite <- Hb3; assumption. destruct (NatSet.E.eq_dec b 4) as [Hb4|Hb4]. apply H24; rewrite <- Hb4; assumption. destruct (NatSet.E.eq_dec b 5) as [Hb5|Hb5]. apply H25; rewrite <- Hb5; assumption. assert (H_sub':=@subset_remove_3 _ _ 2 H_sub). assert (Hb_town:=H_sub' _ Hb). unfold town_2 in Hb_town. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) destruct (proj1 (FM.add_iff _ _ b) Hb_town) as [Hb1_town|Hb1_town]. apply Hb1; rewrite Hb1_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb1_town) as [Hb2_town|Hb2_town]. apply Hb2; rewrite Hb2_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb2_town) as [Hb3_town|Hb3_town]. apply Hb3; rewrite Hb3_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb3_town) as [Hb4_town|Hb4_town]. apply Hb4; rewrite Hb4_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb4_town) as [Hb5_town|Hb5_town]. apply Hb5; rewrite Hb5_town; reflexivity. apply (proj1 (FM.empty_iff b) Hb5_town)... destruct (In_dec 3 B) as [H3|H3]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) assert (H_card_rem:|B\{3}|=1); [ rewrite <- (remove_cardinal_1 H3) in H_card; apply eq_add_S; assumption|]. assert (H31:=fun HH : 1∈(B\{3}) => H1 (remove_3 HH)). assert (H32:=fun HH : 2∈(B\{3}) => H2 (remove_3 HH)). destruct (In_dec 4 (B\{3})) as [H34|H34]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) do 2 left; right. rewrite <- (add_remove H3). rewrite <- (add_remove H34). generalize (remove_cardinal_1 H34). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) rewrite H_card_rem; intro H_eq2. rewrite (empty_is_empty_1 (cardinal_inv_1 (eq_add_S _ _ H_eq2))); reflexivity... destruct (In_dec 5 (B\{3})) as [H35|H35]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) left; right. rewrite <- (add_remove H3). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) (add (S (S (S O))) (remove (S (S (S O))) B)))))) (cardinal (remove (S (S (S O))) (add (S (S (S O))) (remove (S (S (S O))) B)))), False *) rewrite <- (add_remove H35). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) (add (S (S (S O))) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S (S (S O))) B)))))))) (cardinal (remove (S (S (S O))) (add (S (S (S O))) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S (S (S O))) B)))))), False *) generalize (remove_cardinal_1 H35). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S (S O))))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) (add (S (S (S O))) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S (S (S O))) B)))))))) (cardinal (remove (S (S (S O))) (add (S (S (S O))) (add (S (S (S (S (S O))))) (remove (S (S (S (S (S O))))) (remove (S (S (S O))) B))))))), False *) rewrite H_card_rem; intro H_eq2. rewrite (empty_is_empty_1 (cardinal_inv_1 (eq_add_S _ _ H_eq2))); reflexivity... apply False_rec. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) assert (H33:=(@remove_1 B _ _ (refl_equal 3))). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) destruct (cardinal_inv_2 H_card_rem) as [b Hb]. destruct (NatSet.E.eq_dec b 1) as [Hb1|Hb1]. apply H31; rewrite Hb1 in Hb; assumption. destruct (NatSet.E.eq_dec b 2) as [Hb2|Hb2]. apply H32; rewrite Hb2 in Hb; assumption. destruct (NatSet.E.eq_dec b 3) as [Hb3|Hb3]. apply H33; rewrite Hb3 in Hb; assumption. destruct (NatSet.E.eq_dec b 4) as [Hb4|Hb4]. apply H34; rewrite <- Hb4; assumption. destruct (NatSet.E.eq_dec b 5) as [Hb5|Hb5]. apply H35; rewrite <- Hb5; assumption. assert (H_sub':=@subset_remove_3 _ _ 3 H_sub). assert (Hb_town:=H_sub' _ Hb). unfold town_2 in Hb_town. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) destruct (proj1 (FM.add_iff _ _ b) Hb_town) as [Hb1_town|Hb1_town]. apply Hb1; rewrite Hb1_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb1_town) as [Hb2_town|Hb2_town]. apply Hb2; rewrite Hb2_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb2_town) as [Hb3_town|Hb3_town]. apply Hb3; rewrite Hb3_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb3_town) as [Hb4_town|Hb4_town]. apply Hb4; rewrite Hb4_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb4_town) as [Hb5_town|Hb5_town]. apply Hb5; rewrite Hb5_town; reflexivity. apply (proj1 (FM.empty_iff b) Hb5_town)... destruct (In_dec 4 B) as [H4|H4]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) (* Goal: False *) assert (H_card_rem:|B\{4}|=1); [ rewrite <- (remove_cardinal_1 H4) in H_card; apply eq_add_S; assumption|]. assert (H41:=fun HH : 1∈(B\{4}) => H1 (remove_3 HH)). assert (H42:=fun HH : 2∈(B\{4}) => H2 (remove_3 HH)). assert (H43:=fun HH : 3∈(B\{4}) => H3 (remove_3 HH)). destruct (In_dec 5 (B\{4})) as [H45|H45]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) right. rewrite <- (add_remove H4). rewrite <- (add_remove H45). generalize (remove_cardinal_1 H45). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S (S O))))) (remove (S (S (S (S O)))) B)))) (cardinal (remove (S (S (S (S O)))) B)), False *) rewrite H_card_rem; intro H_eq2. rewrite (empty_is_empty_1 (cardinal_inv_1 (eq_add_S _ _ H_eq2))); reflexivity... apply False_rec. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) assert (H44:=(@remove_1 B _ _ (refl_equal 4))). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) destruct (cardinal_inv_2 H_card_rem) as [b Hb]. destruct (NatSet.E.eq_dec b 1) as [Hb1|Hb1]. apply H41; rewrite Hb1 in Hb; assumption. destruct (NatSet.E.eq_dec b 2) as [Hb2|Hb2]. apply H42; rewrite Hb2 in Hb; assumption. destruct (NatSet.E.eq_dec b 3) as [Hb3|Hb3]. apply H43; rewrite Hb3 in Hb; assumption. destruct (NatSet.E.eq_dec b 4) as [Hb4|Hb4]. apply H44; rewrite Hb4 in Hb; assumption. destruct (NatSet.E.eq_dec b 5) as [Hb5|Hb5]. apply H45; rewrite <- Hb5; assumption. assert (H_sub':=@subset_remove_3 _ _ 4 H_sub). assert (Hb_town:=H_sub' _ Hb). unfold town_2 in Hb_town. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) destruct (proj1 (FM.add_iff _ _ b) Hb_town) as [Hb1_town|Hb1_town]. apply Hb1; rewrite Hb1_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb1_town) as [Hb2_town|Hb2_town]. apply Hb2; rewrite Hb2_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb2_town) as [Hb3_town|Hb3_town]. apply Hb3; rewrite Hb3_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb3_town) as [Hb4_town|Hb4_town]. apply Hb4; rewrite Hb4_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb4_town) as [Hb5_town|Hb5_town]. apply Hb5; rewrite Hb5_town; reflexivity. apply (proj1 (FM.empty_iff b) Hb5_town)... apply False_rec. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) destruct (In_dec 5 B) as [H5|H5]. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) assert (H_card_rem:|B\{5}|=1); [ rewrite <- (remove_cardinal_1 H5) in H_card; apply eq_add_S; assumption|]. assert (H51:=fun HH : 1∈(B\{5}) => H1 (remove_3 HH)). assert (H52:=fun HH : 2∈(B\{5}) => H2 (remove_3 HH)). assert (H53:=fun HH : 3∈(B\{5}) => H3 (remove_3 HH)). assert (H54:=fun HH : 4∈(B\{5}) => H4 (remove_3 HH)). assert (H55:=(@remove_1 B _ _ (refl_equal 5))). (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) destruct (cardinal_inv_2 H_card_rem) as [b Hb]. assert (H_sub':=@subset_remove_3 _ _ 5 H_sub). assert (Hb_town:=H_sub' _ Hb). unfold town_2 in Hb_town. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) destruct (proj1 (FM.add_iff _ _ b) Hb_town) as [Hb1_town|Hb1_town]. apply H51; rewrite <- Hb1_town in Hb; assumption. destruct (proj1 (FM.add_iff _ _ b) Hb1_town) as [Hb2_town|Hb2_town]. apply H52; rewrite <- Hb2_town in Hb; assumption. destruct (proj1 (FM.add_iff _ _ b) Hb2_town) as [Hb3_town|Hb3_town]. apply H53; rewrite <- Hb3_town in Hb; assumption. destruct (proj1 (FM.add_iff _ _ b) Hb3_town) as [Hb4_town|Hb4_town]. apply H54; rewrite <- Hb4_town in Hb; assumption. destruct (proj1 (FM.add_iff _ _ b) Hb4_town) as [Hb5_town|Hb5_town]. apply H55; rewrite <- Hb5_town in Hb; assumption. apply (proj1 (FM.empty_iff b) Hb5_town)... destruct (cardinal_inv_2 H_card) as [b Hb]. destruct (NatSet.E.eq_dec b 1) as [Hb1|Hb1]. apply H1; rewrite Hb1 in Hb; assumption. destruct (NatSet.E.eq_dec b 2) as [Hb2|Hb2]. apply H2; rewrite Hb2 in Hb; assumption. destruct (NatSet.E.eq_dec b 3) as [Hb3|Hb3]. apply H3; rewrite Hb3 in Hb; assumption. destruct (NatSet.E.eq_dec b 4) as [Hb4|Hb4]. apply H4; rewrite Hb4 in Hb; assumption. destruct (NatSet.E.eq_dec b 5) as [Hb5|Hb5]. apply H5; rewrite <- Hb5; assumption. assert (Hb_town:=H_sub _ Hb). unfold town_2 in Hb_town. (* Goal: sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S O)) (add (S (S (S O))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S O)) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S O)))) empty)))) (Equal B (add (S (S (S O))) (add (S (S (S (S (S O))))) empty)))) (Equal B (add (S (S (S (S O)))) (add (S (S (S (S (S O))))) empty))) *) (* Goal: sumor (sumor (sumbool (Equal B (add (S O) (add (S (S O)) empty))) (Equal B (add (S O) (add (S (S (S O))) empty)))) (Equal B (add (S O) (add (S (S (S (S O)))) empty)))) (Equal B (add (S O) (add (S (S (S (S (S O))))) empty))) *) (* Goal: Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) B)))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) B)))) (cardinal (remove (S O) B)), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) B)))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S O) B)))) (cardinal (remove (S O) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))) (cardinal (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B))))))), Equal (add (S O) (add (S (S O)) (remove (S (S O)) (remove (S O) (add (S O) (add (S (S (S O))) (remove (S (S (S O))) (remove (S O) (add (S O) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S O) B)))))))))))) (add (S O) (add (S (S O)) empty)) *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B)), False *) (* Goal: forall (_ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S O)) B)))) (cardinal (remove (S (S O)) B))) (_ : @Logic.eq nat (S (cardinal (remove (S (S (S O))) (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B)))))))) (cardinal (remove (S (S O)) (add (S (S O)) (add (S (S (S (S O)))) (remove (S (S (S (S O)))) (remove (S (S O)) B))))))), False *) (* Goal: False *) (* Goal: False *) (* Goal: forall _ : @Logic.eq nat (S (cardinal (remove (S (S (S (S O)))) (remove (S (S (S O))) B)))) (cardinal (remove (S (S (S O))) B)), False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) destruct (proj1 (FM.add_iff _ _ b) Hb_town) as [Hb1_town|Hb1_town]. apply Hb1; rewrite Hb1_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb1_town) as [Hb2_town|Hb2_town]. apply Hb2; rewrite Hb2_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb2_town) as [Hb3_town|Hb3_town]. apply Hb3; rewrite Hb3_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb3_town) as [Hb4_town|Hb4_town]. apply Hb4; rewrite Hb4_town; reflexivity. destruct (proj1 (FM.add_iff _ _ b) Hb4_town) as [Hb5_town|Hb5_town]. apply Hb5; rewrite Hb5_town; reflexivity. apply (proj1 (FM.empty_iff b) Hb5_town)... Qed. Qed. Remark acquintance_2: ∀ B, B⊆town_2 ⇒ |B| = 2 ⇒ ∃d, d∈(town_2\B) ∧ (∀ b, b∈B ⇒ d ℛ₂ b). Proof. (* Goal: forall (B : t) (_ : Subset B town_2) (_ : @Logic.eq nat (cardinal B) (S (S O))), @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) intros B H_sub H_card. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) destruct (subsets_2 B H_sub H_card) as [[[[[[[[[HB12|HB13]|HB14]|HB15]|HB23]|HB24]|HB25]|HB34]|HB35]|HB45]. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) exists 5; split. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S (S (S (S (S O))))) b *) (* Goal: In (S (S (S (S (S O))))) (diff town_2 B) *) rewrite HB12; apply mem_2; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S (S (S (S (S O))))) b *) intro b; rewrite HB12; intro Hb. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) destruct (proj1 (FM.add_iff _ _ b) Hb) as [H|H]. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) compute in H; rewrite <- H; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) destruct (proj1 (FM.add_iff _ _ b) H) as [H'|H']. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) compute in H'; rewrite <- H'; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) apply False_ind; apply (proj1 (FM.empty_iff b) H'). (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) exists 4; split. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S (S (S (S O)))) b *) (* Goal: In (S (S (S (S O)))) (diff town_2 B) *) rewrite HB13; apply mem_2; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S (S (S (S O)))) b *) intro b; rewrite HB13; intro Hb. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S O)))) b *) destruct (proj1 (FM.add_iff _ _ b) Hb) as [H|H]. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S O)))) b *) (* Goal: familiarity₂ (S (S (S (S O)))) b *) compute in H; rewrite <- H; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S O)))) b *) destruct (proj1 (FM.add_iff _ _ b) H) as [H'|H']. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S O)))) b *) (* Goal: familiarity₂ (S (S (S (S O)))) b *) compute in H'; rewrite <- H'; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S O)))) b *) apply False_ind; apply (proj1 (FM.empty_iff b) H'). (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) exists 3; split. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S (S (S O))) b *) (* Goal: In (S (S (S O))) (diff town_2 B) *) rewrite HB14; apply mem_2; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S (S (S O))) b *) intro b; rewrite HB14; intro Hb. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S O))) b *) destruct (proj1 (FM.add_iff _ _ b) Hb) as [H|H]. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S O))) b *) (* Goal: familiarity₂ (S (S (S O))) b *) compute in H; rewrite <- H; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S O))) b *) destruct (proj1 (FM.add_iff _ _ b) H) as [H'|H']. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S O))) b *) (* Goal: familiarity₂ (S (S (S O))) b *) compute in H'; rewrite <- H'; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S O))) b *) apply False_ind; apply (proj1 (FM.empty_iff b) H'). (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) exists 2; split. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S (S O)) b *) (* Goal: In (S (S O)) (diff town_2 B) *) rewrite HB15; apply mem_2; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S (S O)) b *) intro b; rewrite HB15; intro Hb. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S O)) b *) destruct (proj1 (FM.add_iff _ _ b) Hb) as [H|H]. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S O)) b *) (* Goal: familiarity₂ (S (S O)) b *) compute in H; rewrite <- H; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S O)) b *) destruct (proj1 (FM.add_iff _ _ b) H) as [H'|H']. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S O)) b *) (* Goal: familiarity₂ (S (S O)) b *) compute in H'; rewrite <- H'; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S O)) b *) apply False_ind; apply (proj1 (FM.empty_iff b) H'). (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) exists 5; split. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S (S (S (S (S O))))) b *) (* Goal: In (S (S (S (S (S O))))) (diff town_2 B) *) rewrite HB23; apply mem_2; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S (S (S (S (S O))))) b *) intro b; rewrite HB23; intro Hb. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) destruct (proj1 (FM.add_iff _ _ b) Hb) as [H|H]. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) compute in H; rewrite <- H; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) destruct (proj1 (FM.add_iff _ _ b) H) as [H'|H']. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) compute in H'; rewrite <- H'; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S (S (S (S (S O))))) b *) apply False_ind; apply (proj1 (FM.empty_iff b) H'). (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) exists 1; split. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S O) b *) (* Goal: In (S O) (diff town_2 B) *) rewrite HB24; apply mem_2; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S O) b *) intro b; rewrite HB24; intro Hb. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) destruct (proj1 (FM.add_iff _ _ b) Hb) as [H|H]. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) (* Goal: familiarity₂ (S O) b *) compute in H; rewrite <- H; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) destruct (proj1 (FM.add_iff _ _ b) H) as [H'|H']. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) (* Goal: familiarity₂ (S O) b *) compute in H'; rewrite <- H'; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) apply False_ind; apply (proj1 (FM.empty_iff b) H'). (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) exists 1; split. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S O) b *) (* Goal: In (S O) (diff town_2 B) *) rewrite HB25; apply mem_2; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S O) b *) intro b; rewrite HB25; intro Hb. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) destruct (proj1 (FM.add_iff _ _ b) Hb) as [H|H]. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) (* Goal: familiarity₂ (S O) b *) compute in H; rewrite <- H; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) destruct (proj1 (FM.add_iff _ _ b) H) as [H'|H']. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) (* Goal: familiarity₂ (S O) b *) compute in H'; rewrite <- H'; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) apply False_ind; apply (proj1 (FM.empty_iff b) H'). (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) exists 1; split. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S O) b *) (* Goal: In (S O) (diff town_2 B) *) rewrite HB34; apply mem_2; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S O) b *) intro b; rewrite HB34; intro Hb. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) destruct (proj1 (FM.add_iff _ _ b) Hb) as [H|H]. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) (* Goal: familiarity₂ (S O) b *) compute in H; rewrite <- H; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) destruct (proj1 (FM.add_iff _ _ b) H) as [H'|H']. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) (* Goal: familiarity₂ (S O) b *) compute in H'; rewrite <- H'; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) apply False_ind; apply (proj1 (FM.empty_iff b) H'). (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) exists 1; split. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S O) b *) (* Goal: In (S O) (diff town_2 B) *) rewrite HB35; apply mem_2; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S O) b *) intro b; rewrite HB35; intro Hb. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) destruct (proj1 (FM.add_iff _ _ b) Hb) as [H|H]. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) (* Goal: familiarity₂ (S O) b *) compute in H; rewrite <- H; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) destruct (proj1 (FM.add_iff _ _ b) H) as [H'|H']. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) (* Goal: familiarity₂ (S O) b *) compute in H'; rewrite <- H'; simpl; trivial. (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) (* Goal: familiarity₂ (S O) b *) apply False_ind; apply (proj1 (FM.empty_iff b) H'). (* Goal: @sig elt (fun d : elt => and (In d (diff town_2 B)) (forall (b : elt) (_ : In b B), familiarity₂ d b)) *) exists 3; split. (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S (S (S O))) b *) (* Goal: In (S (S (S O))) (diff town_2 B) *) rewrite HB45; apply mem_2; trivial. (* Goal: forall (b : elt) (_ : In b B), familiarity₂ (S (S (S O))) b *) intro b; rewrite HB45; intro Hb. (* Goal: familiarity₂ (S (S (S O))) b *) destruct (proj1 (FM.add_iff _ _ b) Hb) as [H|H]. (* Goal: familiarity₂ (S (S (S O))) b *) (* Goal: familiarity₂ (S (S (S O))) b *) compute in H; rewrite <- H; simpl; trivial. (* Goal: familiarity₂ (S (S (S O))) b *) destruct (proj1 (FM.add_iff _ _ b) H) as [H'|H']. (* Goal: familiarity₂ (S (S (S O))) b *) (* Goal: familiarity₂ (S (S (S O))) b *) compute in H'; rewrite <- H'; simpl; trivial. (* Goal: familiarity₂ (S (S (S O))) b *) apply False_ind; apply (proj1 (FM.empty_iff b) H'). Qed. Check (AMM11262 town_2 2 population₂ familiarity₂ familiarity₂_sym familiarity₂_extensional acquintance_2). Definition social_citizen_2:=AMM11262 town_2 2 population₂ familiarity₂ familiarity₂_sym familiarity₂_extensional acquintance_2. End example_five_inhabitants. Extraction "social2" social_citizen_2.
Require Import TS. Require Import sur_les_relations. Require Import sigma_lift. Inductive reg_beta : terms -> terms -> Prop := reg1_beta : forall a b : terms, reg_beta (app (lambda a) b) (env a (cons b id)). Hint Resolve reg1_beta. Inductive e_systemLSL : forall b : wsort, TS b -> TS b -> Prop := | beta1 : forall M N : terms, reg_beta M N -> e_systemLSL wt M N | SL1 : forall (b : wsort) (M N : TS b), e_systemSL _ M N -> e_systemLSL b M N. Hint Resolve beta1 SL1. Notation systemLSL := (e_systemLSL _) (only parsing). Inductive e_relLSL : forall b : wsort, TS b -> TS b -> Prop := | LSL_one_regle : forall (b : wsort) (M N : TS b), e_systemLSL _ M N -> e_relLSL b M N | LSL_context_app_l : forall a a' b : terms, e_relLSL wt a a' -> e_relLSL wt (app a b) (app a' b) | LSL_context_app_r : forall a b b' : terms, e_relLSL wt b b' -> e_relLSL wt (app a b) (app a b') | LSL_context_lambda : forall a a' : terms, e_relLSL wt a a' -> e_relLSL wt (lambda a) (lambda a') | LSL_context_env_t : forall (a a' : terms) (s : sub_explicits), e_relLSL wt a a' -> e_relLSL wt (env a s) (env a' s) | LSL_context_env_s : forall (a : terms) (s s' : sub_explicits), e_relLSL ws s s' -> e_relLSL wt (env a s) (env a s') | LSL_context_cons_t : forall (a a' : terms) (s : sub_explicits), e_relLSL wt a a' -> e_relLSL ws (cons a s) (cons a' s) | LSL_context_cons_s : forall (a : terms) (s s' : sub_explicits), e_relLSL ws s s' -> e_relLSL ws (cons a s) (cons a s') | LSL_context_comp_l : forall s s' t : sub_explicits, e_relLSL ws s s' -> e_relLSL ws (comp s t) (comp s' t) | LSL_context_comp_r : forall s t t' : sub_explicits, e_relLSL ws t t' -> e_relLSL ws (comp s t) (comp s t') | LSL_context_lift : forall s s' : sub_explicits, e_relLSL ws s s' -> e_relLSL ws (lift s) (lift s'). Notation relLSL := (e_relLSL _) (only parsing). Hint Resolve LSL_one_regle LSL_context_app_l LSL_context_app_r LSL_context_lambda LSL_context_env_t LSL_context_env_s LSL_context_cons_t LSL_context_cons_s LSL_context_comp_l LSL_context_comp_r LSL_context_lift. Definition e_relLSLstar (b : wsort) := explicit_star _ (e_relLSL b). Notation relLSLstar := (e_relLSLstar _) (only parsing). Hint Unfold e_relLSLstar. Goal e_relLSLstar _ (lambda (app (lambda (app (var 0) (var 0))) (lambda (app (var 0) (var 1))))) (lambda (app (var 0) (var 0))). red in |- *; apply star_trans1 with (lambda (env (app (var 0) (var 0)) (cons (lambda (app (var 0) (var 1))) id))). auto. apply star_trans1 with (lambda (app (env (var 0) (cons (lambda (app (var 0) (var 1))) id)) (env (var 0) (cons (lambda (app (var 0) (var 1))) id)))). auto. apply star_trans1 with (lambda (app (lambda (app (var 0) (var 1))) (env (var 0) (cons (lambda (app (var 0) (var 1))) id)))). auto 6. apply star_trans1 with (lambda (app (lambda (app (var 0) (var 1))) (lambda (app (var 0) (var 1))))). auto 6. apply star_trans1 with (lambda (env (app (var 0) (var 1)) (cons (lambda (app (var 0) (var 1))) id))). auto. apply star_trans1 with (lambda (app (env (var 0) (cons (lambda (app (var 0) (var 1))) id)) (env (var 1) (cons (lambda (app (var 0) (var 1))) id)))). auto. apply star_trans1 with (lambda (app (lambda (app (var 0) (var 1))) (env (var 1) (cons (lambda (app (var 0) (var 1))) id)))). auto 6. apply star_trans1 with (lambda (app (lambda (app (var 0) (var 1))) (env (var 0) id))). auto 6. apply star_trans1 with (lambda (env (app (var 0) (var 1)) (cons (env (var 0) id) id))). auto. apply star_trans1 with (lambda (app (env (var 0) (cons (env (var 0) id) id)) (env (var 1) (cons (env (var 0) id) id)))). auto 6. apply star_trans1 with (lambda (app (env (var 0) id) (env (var 1) (cons (env (var 0) id) id)))). auto 6. apply star_trans1 with (lambda (app (env (var 0) id) (env (var 0) id))). auto 6. apply star_trans1 with (lambda (app (var 0) (env (var 0) id))). auto 6. apply star_trans1 with (lambda (app (var 0) (var 0))); auto 6. Save exemple. Goal forall a a' b : terms, e_relLSLstar _ a a' -> e_relLSLstar _ (app a b) (app a' b). red in |- *; simple induction 1; intros. auto. apply star_trans1 with (app y b); auto. Save LSLstar_context_app_l. Hint Resolve LSLstar_context_app_l. Goal forall a b b' : terms, e_relLSLstar _ b b' -> e_relLSLstar _ (app a b) (app a b'). red in |- *; simple induction 1; intros. auto. apply star_trans1 with (app a y); auto. Save LSLstar_context_app_r. Hint Resolve LSLstar_context_app_r. Goal forall a a' b b' : terms, e_relLSLstar _ a a' -> e_relLSLstar _ b b' -> e_relLSLstar _ (app a b) (app a' b'). intros; red in |- *. apply star_trans with (app a' b). change (e_relLSLstar _ (app a b) (app a' b)) in |- *; auto. change (e_relLSLstar _ (app a' b) (app a' b')) in |- *; auto. Save LSLstar_context_app. Hint Resolve LSLstar_context_app. Goal forall a a' : terms, e_relLSLstar _ a a' -> e_relLSLstar _ (lambda a) (lambda a'). red in |- *; simple induction 1; intros. auto. apply star_trans1 with (lambda y); auto. Save LSLstar_context_lambda. Hint Resolve LSLstar_context_lambda. Goal forall (a a' : terms) (s : sub_explicits), e_relLSLstar _ a a' -> e_relLSLstar _ (env a s) (env a' s). red in |- *; simple induction 1; intros. auto. apply star_trans1 with (env y s); auto. Save LSLstar_context_env_t. Hint Resolve LSLstar_context_env_t. Goal forall (a : terms) (s s' : sub_explicits), e_relLSLstar _ s s' -> e_relLSLstar _ (env a s) (env a s'). red in |- *; simple induction 1; intros. auto. apply star_trans1 with (env a y); auto. Save LSLstar_context_env_s. Hint Resolve LSLstar_context_env_s. Goal forall (a a' : terms) (s s' : sub_explicits), e_relLSLstar _ a a' -> e_relLSLstar _ s s' -> e_relLSLstar _ (env a s) (env a' s'). intros; red in |- *. apply star_trans with (env a' s). change (e_relLSLstar _ (env a s) (env a' s)) in |- *; auto. change (e_relLSLstar _ (env a' s) (env a' s')) in |- *; auto. Save LSLstar_context_env. Hint Resolve LSLstar_context_env. Goal forall (a a' : terms) (s : sub_explicits), e_relLSLstar _ a a' -> e_relLSLstar _ (cons a s) (cons a' s). red in |- *; simple induction 1; intros. auto. apply star_trans1 with (cons y s); auto. Save LSLstar_context_cons_t. Hint Resolve LSLstar_context_cons_t. Goal forall (a : terms) (s s' : sub_explicits), e_relLSLstar _ s s' -> e_relLSLstar _ (cons a s) (cons a s'). red in |- *; simple induction 1; intros. auto. apply star_trans1 with (cons a y); auto. Save LSLstar_context_cons_s. Hint Resolve LSLstar_context_cons_s. Goal forall (a a' : terms) (s s' : sub_explicits), e_relLSLstar _ a a' -> e_relLSLstar _ s s' -> e_relLSLstar _ (cons a s) (cons a' s'). intros; red in |- *. apply star_trans with (cons a' s). change (e_relLSLstar _ (cons a s) (cons a' s)) in |- *; auto. change (e_relLSLstar _ (cons a' s) (cons a' s')) in |- *; auto. Save LSLstar_context_cons. Hint Resolve LSLstar_context_cons. Goal forall s s' t : sub_explicits, e_relLSLstar _ s s' -> e_relLSLstar _ (comp s t) (comp s' t). red in |- *; simple induction 1; intros. auto. apply star_trans1 with (comp y t); auto. Save LSLstar_context_comp_l. Hint Resolve LSLstar_context_comp_l. Goal forall s t t' : sub_explicits, e_relLSLstar _ t t' -> e_relLSLstar _ (comp s t) (comp s t'). red in |- *; simple induction 1; intros. auto. apply star_trans1 with (comp s y); auto. Save LSLstar_context_comp_r. Hint Resolve LSLstar_context_comp_r. Goal forall s s' t t' : sub_explicits, e_relLSLstar _ t t' -> e_relLSLstar _ s s' -> e_relLSLstar _ (comp s t) (comp s' t'). intros; red in |- *. apply star_trans with (comp s' t). change (e_relLSLstar _ (comp s t) (comp s' t)) in |- *; auto. change (e_relLSLstar _ (comp s' t) (comp s' t')) in |- *; auto. Save LSLstar_context_comp. Hint Resolve LSLstar_context_comp. Goal forall s s' : sub_explicits, e_relLSLstar _ s s' -> e_relLSLstar _ (lift s) (lift s'). red in |- *; simple induction 1; intros. auto. apply star_trans1 with (lift y); auto. Save LSLstar_context_lift. Hint Resolve LSLstar_context_lift.
Require Export GeoCoq.Elements.OriginalProofs.lemma_rectangleparallelogram. Require Export GeoCoq.Elements.OriginalProofs.proposition_34. Require Export GeoCoq.Elements.OriginalProofs.lemma_crossimpliesopposite. Require Export GeoCoq.Elements.OriginalProofs.lemma_samenotopposite. Require Export GeoCoq.Elements.OriginalProofs.lemma_crisscross. Section Euclid. Context `{Ax:area}. Lemma lemma_paste5 : forall B C D E L M b c d e l m, EF B M L D b m l d -> EF M C E L m c e l -> BetS B M C -> BetS b m c -> BetS E L D -> BetS e l d -> RE M C E L -> RE m c e l -> EF B C E D b c e d. Proof. (* Goal: forall (B C D E L M b c d e l m : @Point Ax0) (_ : @EF Ax0 Ax1 Ax2 Ax B M L D b m l d) (_ : @EF Ax0 Ax1 Ax2 Ax M C E L m c e l) (_ : @BetS Ax0 B M C) (_ : @BetS Ax0 b m c) (_ : @BetS Ax0 E L D) (_ : @BetS Ax0 e l d) (_ : @RE Ax0 M C E L) (_ : @RE Ax0 m c e l), @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) intros. (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (PG M C E L) by (conclude lemma_rectangleparallelogram). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (PG m c e l) by (conclude lemma_rectangleparallelogram). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) let Tf:=fresh in assert (Tf:exists P, (BetS M P E /\ BetS C P L)) by (conclude lemma_diagonalsmeet);destruct Tf as [P];spliter. (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) let Tf:=fresh in assert (Tf:exists p, (BetS m p e /\ BetS c p l)) by (conclude lemma_diagonalsmeet);destruct Tf as [p];spliter. (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par M C E L) by (conclude_def PG ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (nCol M C L) by (forward_using lemma_parallelNC). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par m c e l) by (conclude_def PG ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (nCol m c l) by (forward_using lemma_parallelNC). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Cong_3 C M L L E C) by (conclude proposition_34). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Cong_3 c m l l e c) by (conclude proposition_34). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET C M L L E C) by (conclude axiom_congruentequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET c m l l e c) by (conclude axiom_congruentequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (CR M E C L) by (conclude_def RE ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (CR m e c l) by (conclude_def RE ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET c m l c l e) by (forward_using axiom_ETpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET c l e c m l) by (conclude axiom_ETsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET c l e m c l) by (forward_using axiom_ETpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET m c l c l e) by (conclude axiom_ETsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET C M L C L E) by (forward_using axiom_ETpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET C L E C M L) by (conclude axiom_ETsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET C L E M C L) by (forward_using axiom_ETpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET M C L C L E) by (conclude axiom_ETsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (TS M C L E) by (forward_using lemma_crossimpliesopposite). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (TS m c l e) by (forward_using lemma_crossimpliesopposite). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET M C L m c l) by (conclude axiom_halvesofequals). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF M C E L e c m l) by (forward_using axiom_EFpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF e c m l M C E L) by (conclude axiom_EFsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF e c m l E C M L) by (forward_using axiom_EFpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF E C M L e c m l) by (conclude axiom_EFsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (TS E C L M) by (conclude lemma_oppositesidesymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (TS e c l m) by (conclude lemma_oppositesidesymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET M C L E C L) by (forward_using axiom_ETpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET E C L M C L) by (conclude axiom_ETsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET E C L C L M) by (forward_using axiom_ETpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET m c l e c l) by (forward_using axiom_ETpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET e c l m c l) by (conclude axiom_ETsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET e c l c l m) by (forward_using axiom_ETpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET E C L e c l) by (conclude axiom_halvesofequals). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF B M L D d b m l) by (forward_using axiom_EFpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF d b m l B M L D) by (conclude axiom_EFsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF d b m l D B M L) by (forward_using axiom_EFpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF D B M L d b m l) by (conclude axiom_EFsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col B M C) by (conclude_def Col ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col M C B) by (forward_using lemma_collinearorder). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq B C) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par E L M C) by (conclude lemma_parallelsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par E L B C) by (conclude lemma_collinearparallel). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par B C E L) by (conclude lemma_parallelsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col E L D) by (conclude_def Col ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq L D) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq D L) by (conclude lemma_inequalitysymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par B C D L) by (conclude lemma_collinearparallel). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq E L) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq M C) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (~ CR B D C L). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) (* Goal: not (@CR Ax0 B D C L) *) { (* Goal: not (@CR Ax0 B D C L) *) intro. (* Goal: False *) assert (~ Col C L M). (* Goal: False *) (* Goal: not (@Col Ax0 C L M) *) { (* Goal: not (@Col Ax0 C L M) *) intro. (* Goal: False *) assert (Col M C L) by (forward_using lemma_collinearorder). (* Goal: False *) assert (eq L L) by (conclude cn_equalityreflexive). (* Goal: False *) assert (Col E L L) by (conclude_def Col ). (* Goal: False *) assert (Meet E L M C) by (conclude_def Meet ). (* Goal: False *) assert (~ Meet E L M C) by (conclude_def Par ). (* Goal: False *) contradict. (* BG Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) (* BG Goal: False *) } (* Goal: False *) assert (~ Col C L D). (* Goal: False *) (* Goal: not (@Col Ax0 C L D) *) { (* Goal: not (@Col Ax0 C L D) *) intro. (* Goal: False *) assert (Col D L C) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col E L D) by (conclude_def Col ). (* Goal: False *) assert (Col D L E) by (forward_using lemma_collinearorder). (* Goal: False *) assert (neq L D) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (neq D L) by (conclude lemma_inequalitysymmetric). (* Goal: False *) assert (Col L E C) by (conclude lemma_collinear4). (* Goal: False *) assert (Col E L C) by (forward_using lemma_collinearorder). (* Goal: False *) assert (eq C C) by (conclude cn_equalityreflexive). (* Goal: False *) assert (Col M C C) by (conclude_def Col ). (* Goal: False *) assert (Meet E L M C) by (conclude_def Meet ). (* Goal: False *) assert (~ Meet E L M C) by (conclude_def Par ). (* Goal: False *) contradict. (* BG Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) (* BG Goal: False *) } (* Goal: False *) assert (eq L L) by (conclude cn_equalityreflexive). (* Goal: False *) assert (Col C L L) by (conclude_def Col ). (* Goal: False *) assert (BetS D L E) by (conclude axiom_betweennesssymmetry). (* Goal: False *) assert (Col C L P) by (conclude_def Col ). (* Goal: False *) assert (OS D M C L) by (unfold OS; exists E; exists L; exists P; splits;auto). (* Goal: False *) assert (BetS C M B) by (conclude axiom_betweennesssymmetry). (* Goal: False *) assert (neq C M) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (Out C M B) by (conclude lemma_ray4). (* Goal: False *) assert (eq C C) by (conclude cn_equalityreflexive). (* Goal: False *) assert (Col C C L) by (conclude_def Col ). (* Goal: False *) assert (OS D B C L) by (conclude lemma_sameside2). (* Goal: False *) assert (OS B D C L) by (forward_using lemma_samesidesymmetric). (* Goal: False *) assert (~ TS B C L D) by (conclude lemma_samenotopposite). (* Goal: False *) assert (~ Col B C L). (* Goal: False *) (* Goal: not (@Col Ax0 B C L) *) { (* Goal: not (@Col Ax0 B C L) *) intro. (* Goal: False *) assert (Col B M C) by (conclude_def Col ). (* Goal: False *) assert (Col B C M) by (forward_using lemma_collinearorder). (* Goal: False *) assert (neq B C) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (Col C M L) by (conclude lemma_collinear4). (* Goal: False *) assert (Col M C L) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col E L L) by (conclude_def Col ). (* Goal: False *) assert (Meet E L M C) by (conclude_def Meet ). (* Goal: False *) assert (~ Meet E L M C) by (conclude_def Par ). (* Goal: False *) contradict. (* BG Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) (* BG Goal: False *) } (* Goal: False *) assert (TS B C L D) by (conclude (lemma_crossimpliesopposite B D C L)). (* Goal: False *) contradict. (* BG Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) } (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (CR B L D C) by (conclude lemma_crisscross). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) let Tf:=fresh in assert (Tf:exists R, (BetS B R L /\ BetS D R C)) by (conclude_def CR );destruct Tf as [R];spliter. (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col b m c) by (conclude_def Col ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col m c b) by (forward_using lemma_collinearorder). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq b c) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par e l m c) by (conclude lemma_parallelsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par e l b c) by (conclude lemma_collinearparallel). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par b c e l) by (conclude lemma_parallelsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col e l d) by (conclude_def Col ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq l d) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq d l) by (conclude lemma_inequalitysymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par b c d l) by (conclude lemma_collinearparallel). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq e l) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq m c) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (~ CR b d c l). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) (* Goal: not (@CR Ax0 b d c l) *) { (* Goal: not (@CR Ax0 b d c l) *) intro. (* Goal: False *) assert (~ Col c l m). (* Goal: False *) (* Goal: not (@Col Ax0 c l m) *) { (* Goal: not (@Col Ax0 c l m) *) intro. (* Goal: False *) assert (Col m c l) by (forward_using lemma_collinearorder). (* Goal: False *) assert (eq l l) by (conclude cn_equalityreflexive). (* Goal: False *) assert (Col e l l) by (conclude_def Col ). (* Goal: False *) assert (Meet e l m c) by (conclude_def Meet ). (* Goal: False *) assert (~ Meet e l m c) by (conclude_def Par ). (* Goal: False *) contradict. (* BG Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) (* BG Goal: False *) } (* Goal: False *) assert (~ Col c l d). (* Goal: False *) (* Goal: not (@Col Ax0 c l d) *) { (* Goal: not (@Col Ax0 c l d) *) intro. (* Goal: False *) assert (Col d l c) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col e l d) by (conclude_def Col ). (* Goal: False *) assert (Col d l e) by (forward_using lemma_collinearorder). (* Goal: False *) assert (neq l d) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (neq d l) by (conclude lemma_inequalitysymmetric). (* Goal: False *) assert (Col l e c) by (conclude lemma_collinear4). (* Goal: False *) assert (Col e l c) by (forward_using lemma_collinearorder). (* Goal: False *) assert (eq c c) by (conclude cn_equalityreflexive). (* Goal: False *) assert (Col m c c) by (conclude_def Col ). (* Goal: False *) assert (Meet e l m c) by (conclude_def Meet ). (* Goal: False *) assert (~ Meet e l m c) by (conclude_def Par ). (* Goal: False *) contradict. (* BG Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) (* BG Goal: False *) } (* Goal: False *) assert (eq l l) by (conclude cn_equalityreflexive). (* Goal: False *) assert (Col c l l) by (conclude_def Col ). (* Goal: False *) assert (BetS d l e) by (conclude axiom_betweennesssymmetry). (* Goal: False *) assert (Col c l p) by (conclude_def Col ). (* Goal: False *) assert (OS d m c l) by (unfold OS; exists e;exists l;exists p;splits;auto). (* Goal: False *) assert (BetS c m b) by (conclude axiom_betweennesssymmetry). (* Goal: False *) assert (neq c m) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (Out c m b) by (conclude lemma_ray4). (* Goal: False *) assert (eq c c) by (conclude cn_equalityreflexive). (* Goal: False *) assert (Col c c l) by (conclude_def Col ). (* Goal: False *) assert (OS d b c l) by (conclude lemma_sameside2). (* Goal: False *) assert (OS b d c l) by (forward_using lemma_samesidesymmetric). (* Goal: False *) assert (~ TS b c l d) by (conclude lemma_samenotopposite). (* Goal: False *) assert (~ Col b c l). (* Goal: False *) (* Goal: not (@Col Ax0 b c l) *) { (* Goal: not (@Col Ax0 b c l) *) intro. (* Goal: False *) assert (Col b m c) by (conclude_def Col ). (* Goal: False *) assert (Col b c m) by (forward_using lemma_collinearorder). (* Goal: False *) assert (neq b c) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (Col c m l) by (conclude lemma_collinear4). (* Goal: False *) assert (Col m c l) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col e l l) by (conclude_def Col ). (* Goal: False *) assert (Meet e l m c) by (conclude_def Meet ). (* Goal: False *) assert (~ Meet e l m c) by (conclude_def Par ). (* Goal: False *) contradict. (* BG Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) (* BG Goal: False *) } (* Goal: False *) assert (TS b c l d) by (conclude (lemma_crossimpliesopposite b d c l)). (* Goal: False *) contradict. (* BG Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) } (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (CR b l d c) by (conclude lemma_crisscross). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) let Tf:=fresh in assert (Tf:exists r, (BetS b r l /\ BetS d r c)) by (conclude_def CR );destruct Tf as [r];spliter. (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF D B C L d b c l) by (conclude axiom_paste2). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF D B C L b d l c) by (forward_using axiom_EFpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF b d l c D B C L) by (conclude axiom_EFsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF b d l c B D L C) by (forward_using axiom_EFpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF B D L C b d l c) by (conclude axiom_EFsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET E C L l e c) by (forward_using axiom_ETpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET l e c E C L) by (conclude axiom_ETsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET l e c L E C) by (forward_using axiom_ETpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (ET L E C l e c) by (conclude axiom_ETsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (BetS D L E) by (conclude axiom_betweennesssymmetry). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (BetS d l e) by (conclude axiom_betweennesssymmetry). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par B C L E) by (forward_using lemma_parallelflip). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col E L D) by (conclude_def Col ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col L E D) by (forward_using lemma_collinearorder). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq E D) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq D E) by (conclude lemma_inequalitysymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par B C D E) by (conclude lemma_collinearparallel). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par M L C E) by (conclude_def PG ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par C E M L) by (conclude lemma_parallelsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (TP C E M L) by (conclude lemma_paralleldef2B). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (OS M L C E) by (conclude_def TP ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (OS L M C E) by (forward_using lemma_samesidesymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq M C) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq C M) by (conclude lemma_inequalitysymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (BetS C M B) by (conclude axiom_betweennesssymmetry). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Out C M B) by (conclude lemma_ray4). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (eq C C) by (conclude cn_equalityreflexive). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col C C E) by (conclude_def Col ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (OS L B C E) by (conclude lemma_sameside2). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (OS B L C E) by (forward_using lemma_samesidesymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq E L) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Out E L D) by (conclude lemma_ray4). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (eq E E) by (conclude cn_equalityreflexive). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col C E E) by (conclude_def Col ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (OS B D C E) by (conclude lemma_sameside2). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (OS D B C E) by (forward_using lemma_samesidesymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (~ CR B D C E). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) (* Goal: not (@CR Ax0 B D C E) *) { (* Goal: not (@CR Ax0 B D C E) *) intro. (* Goal: False *) assert (~ Col B C E). (* Goal: False *) (* Goal: not (@Col Ax0 B C E) *) { (* Goal: not (@Col Ax0 B C E) *) intro. (* Goal: False *) assert (eq E E) by (conclude cn_equalityreflexive). (* Goal: False *) assert (Col D E E) by (conclude_def Col ). (* Goal: False *) assert (Meet B C D E) by (conclude_def Meet ). (* Goal: False *) assert (~ Meet B C D E) by (conclude_def Par ). (* Goal: False *) contradict. (* BG Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) (* BG Goal: False *) } (* Goal: False *) assert (TS B C E D) by (conclude (lemma_crossimpliesopposite B D C E)). (* Goal: False *) assert (~ TS B C E D) by (conclude lemma_samenotopposite). (* Goal: False *) contradict. (* BG Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) } (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (CR B E D C) by (conclude lemma_crisscross). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) let Tf:=fresh in assert (Tf:exists T, (BetS B T E /\ BetS D T C)) by (conclude_def CR );destruct Tf as [T];spliter. (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par b c l e) by (forward_using lemma_parallelflip). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col e l d) by (conclude_def Col ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col l e d) by (forward_using lemma_collinearorder). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq e d) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq d e) by (conclude lemma_inequalitysymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par b c d e) by (conclude lemma_collinearparallel). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par m l c e) by (conclude_def PG ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Par c e m l) by (conclude lemma_parallelsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (TP c e m l) by (conclude lemma_paralleldef2B). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (OS m l c e) by (conclude_def TP ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (OS l m c e) by (forward_using lemma_samesidesymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq m c) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq c m) by (conclude lemma_inequalitysymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (BetS c m b) by (conclude axiom_betweennesssymmetry). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Out c m b) by (conclude lemma_ray4). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (eq c c) by (conclude cn_equalityreflexive). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col c c e) by (conclude_def Col ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (OS l b c e) by (conclude lemma_sameside2). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (OS b l c e) by (forward_using lemma_samesidesymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (neq e l) by (forward_using lemma_betweennotequal). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Out e l d) by (conclude lemma_ray4). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (eq e e) by (conclude cn_equalityreflexive). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (Col c e e) by (conclude_def Col ). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (OS b d c e) by (conclude lemma_sameside2). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (OS d b c e) by (forward_using lemma_samesidesymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (~ CR b d c e). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) (* Goal: not (@CR Ax0 b d c e) *) { (* Goal: not (@CR Ax0 b d c e) *) intro. (* Goal: False *) assert (~ Col b c e). (* Goal: False *) (* Goal: not (@Col Ax0 b c e) *) { (* Goal: not (@Col Ax0 b c e) *) intro. (* Goal: False *) assert (eq e e) by (conclude cn_equalityreflexive). (* Goal: False *) assert (Col d e e) by (conclude_def Col ). (* Goal: False *) assert (Meet b c d e) by (conclude_def Meet ). (* Goal: False *) assert (~ Meet b c d e) by (conclude_def Par ). (* Goal: False *) contradict. (* BG Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) (* BG Goal: False *) } (* Goal: False *) assert (TS b c e d) by (conclude (lemma_crossimpliesopposite b d c e)). (* Goal: False *) assert (~ TS b c e d) by (conclude lemma_samenotopposite). (* Goal: False *) contradict. (* BG Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) } (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (CR b e d c) by (conclude lemma_crisscross). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) let Tf:=fresh in assert (Tf:exists t, (BetS b t e /\ BetS d t c)) by (conclude_def CR );destruct Tf as [t];spliter. (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF B D E C b d e c) by (conclude axiom_paste2). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF B D E C b c e d) by (forward_using axiom_EFpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF b c e d B D E C) by (conclude axiom_EFsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF b c e d B C E D) by (forward_using axiom_EFpermutation). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) assert (EF B C E D b c e d) by (conclude axiom_EFsymmetric). (* Goal: @EF Ax0 Ax1 Ax2 Ax B C E D b c e d *) close. Qed. End Euclid.
Definition Relation (U : Set) := U -> U -> Prop. Definition Reflexive (U : Set) (R : Relation U) : Prop := forall x : U, R x x. Definition Transitive (U : Set) (R : Relation U) : Prop := forall x y z : U, R x y -> R y z -> R x z. Definition Symmetric (U : Set) (R : Relation U) : Prop := forall x y : U, R x y -> R y x. Inductive Equivalence (U : Set) (R : Relation U) : Prop := Definition_of_equivalence : Reflexive U R -> Symmetric U R -> Transitive U R -> Equivalence U R. Definition Negation (U : Set) (R : Relation U) : Relation U := fun x y : U => ~ R x y. Hint Unfold Negation. Theorem Sym_imp_NegSym : forall (U : Set) (R : Relation U), Symmetric U R -> Symmetric U (Negation U R). Proof. (* Goal: forall (U : Set) (R : Relation U) (_ : Symmetric U R), Symmetric U (Negation U R) *) unfold Symmetric, Negation in |- *. (* Goal: forall (U : Set) (R : Relation U) (_ : forall (x y : U) (_ : R x y), R y x) (x y : U) (_ : not (R x y)), not (R y x) *) intros U R H' x y H'0; red in |- *; intro H'1; auto. Qed. Hint Resolve Sym_imp_NegSym. Definition Irreflexive (U : Set) (R : Relation U) : Prop := forall x : U, ~ R x x. Definition Separating (U : Set) (R : Relation U) : Prop := forall x y z : U, R x y -> R x z \/ R y z. Inductive Apartness (U : Set) (R : Relation U) : Prop := Definition_of_apartness : Irreflexive U R -> Separating U R -> Apartness U R. Hint Unfold Reflexive Irreflexive Symmetric Transitive. Hint Resolve Definition_of_equivalence Definition_of_apartness. Parameter Point : Set. Parameter Line : Set. Parameter DiPt : Point -> Point -> Prop. Parameter DiLn : Line -> Line -> Prop. Parameter ConLn : Line -> Line -> Prop. Axiom apart_dipt : Apartness Point DiPt. Axiom apart_diln : Apartness Line DiLn. Axiom apart_con : Apartness Line ConLn. Hint Resolve apart_dipt apart_diln apart_con. Theorem Apart_imp_Sym : forall (U : Set) (R : Relation U), Apartness U R -> Symmetric U R. Proof. (* Goal: forall (U : Set) (R : Relation U) (_ : Apartness U R), Symmetric U R *) intros U R H'; elim H'. (* Goal: forall (_ : Irreflexive U R) (_ : Separating U R), Symmetric U R *) intros H'0 H'1; red in |- *. (* Goal: forall (x y : U) (_ : R x y), R y x *) intros x y H'2; red in H'1. (* Goal: R y x *) elim (H'1 x y x); trivial. (* Goal: forall _ : R x x, R y x *) intro H'3; elim (H'0 x); trivial. Qed. Hint Resolve Apart_imp_Sym. Theorem sym_DiPt : forall x y : Point, DiPt x y -> DiPt y x. Proof. (* Goal: forall (x y : Point) (_ : DiPt x y), DiPt y x *) intros x y H'; cut (Symmetric Point DiPt); auto. Qed. Theorem sym_DiLn : forall x y : Line, DiLn x y -> DiLn y x. Proof. (* Goal: forall (x y : Line) (_ : DiLn x y), DiLn y x *) intros x y H'; cut (Symmetric Line DiLn); auto. Qed. Theorem sym_ConLn : forall x y : Line, ConLn x y -> ConLn y x. Proof. (* Goal: forall (x y : Line) (_ : ConLn x y), ConLn y x *) intros x y H'; cut (Symmetric Line ConLn); auto. Qed. Hint Immediate sym_DiPt sym_DiLn sym_ConLn. Theorem Neg_apart_equiv : forall (U : Set) (R : Relation U), Apartness U R -> Equivalence U (Negation U R). Proof. (* Goal: forall (U : Set) (R : Relation U) (_ : Apartness U R), Equivalence U (Negation U R) *) intros U R H'; elim H'. (* Goal: forall (_ : Irreflexive U R) (_ : Separating U R), Equivalence U (Negation U R) *) constructor 1; auto. (* Goal: Transitive U (Negation U R) *) unfold Transitive, Negation in |- *. (* Goal: forall (x y z : U) (_ : not (R x y)) (_ : not (R y z)), not (R x z) *) intros x y z H'2 H'3; red in |- *; intro H'4. (* Goal: False *) red in H0. (* Goal: False *) elim (H0 x z y); auto. (* Goal: forall _ : R z y, False *) cut (Symmetric U R); auto. Qed. Hint Resolve Neg_apart_equiv. Definition EqPt := Negation Point DiPt. Definition EqLn := Negation Line DiLn. Definition Par := Negation Line ConLn. Theorem equiv_EqPt : Equivalence Point EqPt. Proof. (* Goal: Equivalence Point EqPt *) unfold EqPt in |- *; auto. Qed. Hint Resolve equiv_EqPt. Theorem equiv_EqLn : Equivalence Line EqLn. Proof. (* Goal: Equivalence Line EqLn *) unfold EqLn in |- *; auto. Qed. Hint Resolve equiv_EqLn. Theorem equiv_Par : Equivalence Line Par. Proof. (* Goal: Equivalence Line Par *) unfold Par in |- *; auto. Qed. Hint Resolve equiv_Par. Theorem sym_EqPt : forall x y : Point, EqPt x y -> EqPt y x. Proof. (* Goal: forall (x y : Point) (_ : EqPt x y), EqPt y x *) intros x y H'; cut (Symmetric Point EqPt); auto. (* Goal: Symmetric Point EqPt *) unfold EqPt at 1 in |- *; auto. Qed. Theorem sym_EqLn : forall x y : Line, EqLn x y -> EqLn y x. Proof. (* Goal: forall (x y : Line) (_ : EqLn x y), EqLn y x *) intros x y H'; cut (Symmetric Line EqLn); auto. (* Goal: Symmetric Line EqLn *) unfold EqLn at 1 in |- *; auto. Qed. Theorem sym_Par : forall x y : Line, Par x y -> Par y x. Proof. (* Goal: forall (x y : Line) (_ : Par x y), Par y x *) intros x y H'; cut (Symmetric Line Par); auto. (* Goal: Symmetric Line Par *) unfold Par at 1 in |- *; auto. Qed. Hint Immediate sym_EqPt sym_EqLn sym_Par. Parameter Apart : Point -> Line -> Prop. Definition Incident (a : Point) (l : Line) := ~ Apart a l. Record Segment : Set := Seg {origin : Point; extremity : Point; Seg_cond : DiPt origin extremity}. Record Twolines : Set := Twol {line1 : Line; line2 : Line; Twol_cond : ConLn line1 line2}. Axiom line : forall x : Segment, {l : Line | Incident (origin x) l /\ Incident (extremity x) l}. Axiom point : forall x : Twolines, {a : Point | Incident a (line1 x) /\ Incident a (line2 x)}. Definition ln : Segment -> Line. Proof. (* Goal: forall _ : Segment, Line *) intro x; elim (line x); intros x0 H'; exact x0. Qed. Definition pt : Twolines -> Point. Proof. (* Goal: forall _ : Twolines, Point *) intro x; elim (point x); intros x0 H'; exact x0. Qed. Theorem inc_ln1 : forall x : Segment, Incident (origin x) (ln x). Proof. (* Goal: forall x : Segment, Incident (origin x) (ln x) *) intro x; elim x. (* Goal: forall (origin0 extremity : Point) (Seg_cond : DiPt origin0 extremity), Incident (origin (Seg origin0 extremity Seg_cond)) (ln (Seg origin0 extremity Seg_cond)) *) intros a b d; unfold ln in |- *; simpl in |- *. (* Goal: Incident a (@sig_rec Line (fun l : Line => and (Incident a l) (Incident b l)) (fun _ : @sig Line (fun l : Line => and (Incident a l) (Incident b l)) => Line) (fun (x0 : Line) (_ : and (Incident a x0) (Incident b x0)) => x0) (line (Seg a b d))) *) elim (line (Seg a b d)); simpl in |- *. (* Goal: forall (x : Line) (_ : and (Incident a x) (Incident b x)), Incident a x *) tauto. Qed. Theorem inc_ln2 : forall x : Segment, Incident (extremity x) (ln x). Proof. (* Goal: forall x : Segment, Incident (extremity x) (ln x) *) intro x; elim x. (* Goal: forall (origin extremity0 : Point) (Seg_cond : DiPt origin extremity0), Incident (extremity (Seg origin extremity0 Seg_cond)) (ln (Seg origin extremity0 Seg_cond)) *) intros a b d; unfold ln in |- *; simpl in |- *. (* Goal: Incident b (@sig_rec Line (fun l : Line => and (Incident a l) (Incident b l)) (fun _ : @sig Line (fun l : Line => and (Incident a l) (Incident b l)) => Line) (fun (x0 : Line) (_ : and (Incident a x0) (Incident b x0)) => x0) (line (Seg a b d))) *) elim (line (Seg a b d)); simpl in |- *. (* Goal: forall (x : Line) (_ : and (Incident a x) (Incident b x)), Incident b x *) tauto. Qed. Theorem inc_pt1 : forall x : Twolines, Incident (pt x) (line1 x). Proof. (* Goal: forall x : Twolines, Incident (pt x) (line1 x) *) intro x; elim x. (* Goal: forall (line2 line3 : Line) (Twol_cond : ConLn line2 line3), Incident (pt (Twol line2 line3 Twol_cond)) (line1 (Twol line2 line3 Twol_cond)) *) intros a b d; unfold pt in |- *; simpl in |- *. (* Goal: Incident (@sig_rec Point (fun a0 : Point => and (Incident a0 a) (Incident a0 b)) (fun _ : @sig Point (fun a0 : Point => and (Incident a0 a) (Incident a0 b)) => Point) (fun (x0 : Point) (_ : and (Incident x0 a) (Incident x0 b)) => x0) (point (Twol a b d))) a *) elim (point (Twol a b d)); simpl in |- *. (* Goal: forall (x : Point) (_ : and (Incident x a) (Incident x b)), Incident x a *) tauto. Qed. Theorem inc_pt2 : forall x : Twolines, Incident (pt x) (line2 x). Proof. (* Goal: forall x : Twolines, Incident (pt x) (line2 x) *) intro x; elim x. (* Goal: forall (line1 line3 : Line) (Twol_cond : ConLn line1 line3), Incident (pt (Twol line1 line3 Twol_cond)) (line2 (Twol line1 line3 Twol_cond)) *) intros a b d; unfold pt in |- *; simpl in |- *. (* Goal: Incident (@sig_rec Point (fun a0 : Point => and (Incident a0 a) (Incident a0 b)) (fun _ : @sig Point (fun a0 : Point => and (Incident a0 a) (Incident a0 b)) => Point) (fun (x0 : Point) (_ : and (Incident x0 a) (Incident x0 b)) => x0) (point (Twol a b d))) b *) elim (point (Twol a b d)); simpl in |- *. (* Goal: forall (x : Point) (_ : and (Incident x a) (Incident x b)), Incident x b *) tauto. Qed. Hint Resolve inc_ln1 inc_ln2 inc_pt1 inc_pt2. Axiom el_ax : forall (x : Segment) (l m : Line), DiLn l m -> (Apart (origin x) l \/ Apart (extremity x) l) \/ Apart (origin x) m \/ Apart (extremity x) m. Axiom cmp_apt_dipt : forall (a b : Point) (l : Line), Apart a l -> DiPt a b \/ Apart b l. Axiom cmp_apt_diln : forall (a : Point) (l m : Line), Apart a l -> DiLn l m \/ Apart a m. Axiom cmp_con_diln : forall l m n : Line, ConLn l m -> DiLn m n \/ ConLn l n. Record Triangle : Set := Tri {summit : Point; base : Segment; Tri_cond : Apart summit (ln base)}. Theorem Triangle_def : forall t : Triangle, Apart (summit t) (ln (base t)). Proof. (* Goal: forall t : Triangle, Apart (summit t) (ln (base t)) *) intro t; elim t. (* Goal: forall (summit0 : Point) (base0 : Segment) (Tri_cond : Apart summit0 (ln base0)), Apart (summit (Tri summit0 base0 Tri_cond)) (ln (base (Tri summit0 base0 Tri_cond))) *) simpl in |- *. (* Goal: forall (summit : Point) (base : Segment) (_ : Apart summit (ln base)), Apart summit (ln base) *) intros s b H'; exact H'. Qed. Hint Resolve Triangle_def. Definition SPar : Relation Line := fun l m : Line => Par l m /\ DiLn l m. Record Parallelogram : Set := Pgram {side1 : Segment; side2 : Segment; side3 : Segment; side4 : Segment; connect1 : origin side3 = origin side1 /\ extremity side3 = origin side2; connect2 : origin side4 = extremity side1 /\ extremity side4 = extremity side2; parsides_i : SPar (ln side1) (ln side2); parsides_ii : SPar (ln side3) (ln side4)}.
From Coq Require Import ssreflect ssrbool ssrfun. From mathcomp Require Import ssrnat bigop. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Delimit Scope pcm_scope with pcm. Open Scope pcm_scope. Module PCM. Record mixin_of (T : Type) := Mixin { valid_op : T -> bool; join_op : T -> T -> T; unit_op : T; _ : commutative join_op; _ : associative join_op; _ : left_id unit_op join_op; _ : forall x y, valid_op (join_op x y) -> valid_op x; _ : valid_op unit_op}. Section ClassDef. Notation class_of := mixin_of (only parsing). Structure type : Type := Pack {sort : Type; _ : class_of sort}. Local Coercion sort : type >-> Sortclass. Variables (T : Type) (cT : type). Definition class := let: Pack _ c as cT' := cT return class_of cT' in c. Definition pack c := @Pack T c. Definition clone := fun c & cT -> T & phant_id (pack c) cT => pack c. Definition valid := valid_op class. Definition join := join_op class. Definition unit := unit_op class. End ClassDef. Arguments unit [cT]. Module Exports. Coercion sort : type >-> Sortclass. Notation pcm := type. Notation PCMMixin := Mixin. Notation PCM T m := (@pack T m). Notation "[ 'pcmMixin' 'of' T ]" := (class _ : mixin_of T) (at level 0, format "[ 'pcmMixin' 'of' T ]") : pcm_scope. Notation "[ 'pcm' 'of' T 'for' C ]" := (@clone T C _ idfun id) (at level 0, format "[ 'pcm' 'of' T 'for' C ]") : pcm_scope. Notation "[ 'pcm' 'of' T ]" := (@clone T _ _ id id) (at level 0, format "[ 'pcm' 'of' T ]") : pcm_scope. Notation "x \+ y" := (join x y) (at level 43, left associativity) : pcm_scope. Notation valid := valid. Notation Unit := unit. Arguments unit [cT]. Prenex Implicits valid join unit. Section Laws. Variable U V : pcm. Lemma joinC (x y : U) : x \+ y = y \+ x. Proof. (* Goal: @eq (sort U) (@join U x y) (@join U y x) *) by case: U x y=>tp [v j z Cj *]; apply: Cj. Qed. Lemma joinA (x y z : U) : x \+ (y \+ z) = x \+ y \+ z. Proof. (* Goal: @eq (sort U) (@join U x (@join U y z)) (@join U (@join U x y) z) *) by case: U x y z=>tp [v j z Cj Aj *]; apply: Aj. Qed. Lemma joinAC (x y z : U) : x \+ y \+ z = x \+ z \+ y. Proof. (* Goal: @eq (sort U) (@join U (@join U x y) z) (@join U (@join U x z) y) *) by rewrite -joinA (joinC y) joinA. Qed. Lemma joinCA (x y z : U) : x \+ (y \+ z) = y \+ (x \+ z). Proof. (* Goal: @eq (sort U) (@join U x (@join U y z)) (@join U y (@join U x z)) *) by rewrite joinA (joinC x) -joinA. Qed. Lemma validL (x y : U) : valid (x \+ y) -> valid x. Proof. (* Goal: forall _ : is_true (@PCM.valid U (@join U x y)), is_true (@PCM.valid U x) *) case: U x y=>tp [v j z Cj Aj Uj /= Mj inv f ?]; apply: Mj. Qed. Lemma validR (x y : U) : valid (x \+ y) -> valid y. Proof. (* Goal: forall _ : is_true (@PCM.valid U (@join U x y)), is_true (@PCM.valid U y) *) by rewrite joinC; apply: validL. Qed. Lemma validE (x y : U) : valid (x \+ y) -> valid x * valid y. Proof. (* Goal: forall _ : is_true (@PCM.valid U (@join U x y)), prod (is_true (@PCM.valid U x)) (is_true (@PCM.valid U y)) *) by move=>X; rewrite (validL X) (validR X). Qed. Lemma unitL (x : U) : Unit \+ x = x. Proof. (* Goal: @eq (sort U) (@join U (@unit U) x) x *) by case: U x=>tp [v j z Cj Aj Uj *]; apply: Uj. Qed. Lemma unitR (x : U) : x \+ Unit = x. Proof. (* Goal: @eq (sort U) (@join U x (@unit U)) x *) by rewrite joinC unitL. Qed. Lemma valid_unit : valid (@Unit U). Proof. (* Goal: is_true (@PCM.valid U (@unit U)) *) by case: U=>tp [v j z Cj Aj Uj Vm Vu *]. Qed. Lemma validAR (x y z : U) : valid (x \+ y \+ z) -> valid (y \+ z). Proof. (* Goal: forall _ : is_true (@PCM.valid U (@join U (@join U x y) z)), is_true (@PCM.valid U (@join U y z)) *) by rewrite -joinA; apply: validR. Qed. Lemma validAL (x y z : U) : valid (x \+ (y \+ z)) -> valid (x \+ y). Proof. (* Goal: forall _ : is_true (@PCM.valid U (@join U x (@join U y z))), is_true (@PCM.valid U (@join U x y)) *) by rewrite joinA; apply: validL. Qed. End Laws. Hint Resolve valid_unit : core. Section UnfoldingRules. Variable U : pcm. Lemma pcm_joinE (x y : U) : x \+ y = join_op (class U) x y. Proof. (* Goal: @eq (sort U) (@join U x y) (@join_op (sort U) (class U) x y) *) by []. Qed. Lemma pcm_validE (x : U) : valid x = valid_op (class U) x. Proof. (* Goal: @eq bool (@PCM.valid U x) (@valid_op (sort U) (class U) x) *) by []. Qed. Lemma pcm_unitE : unit = unit_op (class U). Proof. (* Goal: @eq (sort U) (@unit U) (@unit_op (sort U) (class U)) *) by []. Qed. Definition pcmE := (pcm_joinE, pcm_validE, pcm_unitE). Definition pull (x y : U) := (joinC y x, joinCA y x). End UnfoldingRules. End Exports. End PCM. Export PCM.Exports. Definition precise (U : pcm) (P : U -> Prop) := forall s1 s2 t1 t2, valid (s1 \+ t1) -> P s1 -> P s2 -> s1 \+ t1 = s2 \+ t2 -> s1 = s2. Module CancellativePCM. Variant mixin_of (U : pcm) := Mixin of forall x1 x2 x : U, valid (x1 \+ x) -> x1 \+ x = x2 \+ x -> x1 = x2. Section ClassDef. Record class_of (U : Type) := Class { base : PCM.mixin_of U; mixin : mixin_of (PCM.Pack base)}. Local Coercion base : class_of >-> PCM.mixin_of. Structure type : Type := Pack {sort : Type; _ : class_of sort}. Local Coercion sort : type >-> Sortclass. Variables (T : Type) (cT : type). Definition class := let: Pack _ c as cT' := cT return class_of cT' in c. Definition clone c of phant_id class c := @Pack T c. Definition pack b0 (m0 : mixin_of (PCM.Pack b0)) := fun m & phant_id m0 m => Pack (@Class T b0 m). Definition pcm := PCM.Pack class. End ClassDef. Module Exports. Coercion base : class_of >-> PCM.mixin_of. Coercion sort : type >-> Sortclass. Coercion pcm : type >-> PCM.type. Canonical Structure pcm. Notation cpcm := type. Notation CPCMMixin := Mixin. Notation CPCM T m := (@pack T _ _ m id). Notation "[ 'cpcm' 'of' T 'for' cT ]" := (@clone T cT _ id) (at level 0, format "[ 'cpcm' 'of' T 'for' cT ]") : pcm_scope. Notation "[ 'cpcm' 'of' T ]" := (@clone T _ _ id) (at level 0, format "[ 'cpcm' 'of' T ]") : pcm_scope. Section Lemmas. Variable U : cpcm. Lemma joinKx (x1 x2 x : U) : valid (x1 \+ x) -> x1 \+ x = x2 \+ x -> x1 = x2. Proof. (* Goal: forall (_ : is_true (@PCM.valid (pcm U) (@PCM.join (pcm U) x1 x))) (_ : @eq (PCM.sort (pcm U)) (@PCM.join (pcm U) x1 x) (@PCM.join (pcm U) x2 x)), @eq (sort U) x1 x2 *) by case: U x1 x2 x=>V [b][K] T; apply: K. Qed. Lemma joinxK (x x1 x2 : U) : valid (x \+ x1) -> x \+ x1 = x \+ x2 -> x1 = x2. Proof. (* Goal: forall (_ : is_true (@PCM.valid (pcm U) (@PCM.join (pcm U) x x1))) (_ : @eq (PCM.sort (pcm U)) (@PCM.join (pcm U) x x1) (@PCM.join (pcm U) x x2)), @eq (sort U) x1 x2 *) by rewrite !(joinC x); apply: joinKx. Qed. Lemma cancPL (P : U -> Prop) s1 s2 t1 t2 : precise P -> valid (s1 \+ t1) -> P s1 -> P s2 -> s1 \+ t1 = s2 \+ t2 -> (s1 = s2) * (t1 = t2). Proof. (* Goal: forall (_ : @precise (pcm U) P) (_ : is_true (@PCM.valid (pcm U) (@PCM.join (pcm U) s1 t1))) (_ : P s1) (_ : P s2) (_ : @eq (PCM.sort (pcm U)) (@PCM.join (pcm U) s1 t1) (@PCM.join (pcm U) s2 t2)), prod (@eq (PCM.sort (pcm U)) s1 s2) (@eq (PCM.sort (pcm U)) t1 t2) *) move=>H V H1 H2 E; move: (H _ _ _ _ V H1 H2 E)=>X. (* Goal: prod (@eq (PCM.sort (pcm U)) s1 s2) (@eq (PCM.sort (pcm U)) t1 t2) *) by rewrite -X in E *; rewrite (joinxK V E). Qed. Lemma cancPR (P : U -> Prop) s1 s2 t1 t2 : precise P -> valid (s1 \+ t1) -> P t1 -> P t2 -> s1 \+ t1 = s2 \+ t2 -> (s1 = s2) * (t1 = t2). Proof. (* Goal: forall (_ : @precise (pcm U) P) (_ : is_true (@PCM.valid (pcm U) (@PCM.join (pcm U) s1 t1))) (_ : P t1) (_ : P t2) (_ : @eq (PCM.sort (pcm U)) (@PCM.join (pcm U) s1 t1) (@PCM.join (pcm U) s2 t2)), prod (@eq (PCM.sort (pcm U)) s1 s2) (@eq (PCM.sort (pcm U)) t1 t2) *) move=>H V H1 H2 E. (* Goal: prod (@eq (PCM.sort (pcm U)) s1 s2) (@eq (PCM.sort (pcm U)) t1 t2) *) rewrite (joinC s1) (joinC s2) in E V. (* Goal: prod (@eq (PCM.sort (pcm U)) s1 s2) (@eq (PCM.sort (pcm U)) t1 t2) *) by rewrite !(cancPL H V H1 H2 E). Qed. End Lemmas. End Exports. End CancellativePCM. Export CancellativePCM.Exports. Module TPCM. Record mixin_of (U : pcm) := Mixin { undef_op : U; unitb_op : U -> bool; _ : forall x, reflect (x = Unit) (unitb_op x); _ : forall x y : U, x \+ y = Unit -> x = Unit /\ y = Unit; _ : ~~ valid undef_op; _ : forall x, undef_op \+ x = undef_op}. Section ClassDef. Record class_of (U : Type) := Class { base : PCM.mixin_of U; mixin : mixin_of (PCM.Pack base)}. Local Coercion base : class_of >-> PCM.mixin_of. Structure type : Type := Pack {sort : Type; _ : class_of sort}. Local Coercion sort : type >-> Sortclass. Variables (T : Type) (cT : type). Definition class := let: Pack _ c as cT' := cT return class_of cT' in c. Definition clone c of phant_id class c := @Pack T c. Definition pack b0 (m0 : mixin_of (PCM.Pack b0)) := fun m & phant_id m0 m => Pack (@Class T b0 m). Definition pcm := PCM.Pack class. Definition unitb := unitb_op (mixin class). Definition undef : pcm := undef_op (mixin class). End ClassDef. Module Exports. Coercion base : class_of >-> PCM.mixin_of. Coercion sort : type >-> Sortclass. Coercion pcm : type >-> PCM.type. Canonical Structure pcm. Notation tpcm := type. Notation TPCMMixin := Mixin. Notation TPCM T m := (@pack T _ _ m id). Notation "[ 'tpcm' 'of' T 'for' cT ]" := (@clone T cT _ id) (at level 0, format "[ 'tpcm' 'of' T 'for' cT ]") : pcm_scope. Notation "[ 'tpcm' 'of' T ]" := (@clone T _ _ id) (at level 0, format "[ 'tpcm' 'of' T ]") : pcm_scope. Notation undef := undef. Notation unitb := unitb. Arguments undef [cT]. Prenex Implicits undef. Section Lemmas. Variable U : tpcm. Lemma unitbP (x : U) : reflect (x = Unit) (unitb x). Proof. (* Goal: Bool.reflect (@eq (sort U) x (@PCM.unit (pcm U))) (@TPCM.unitb U x) *) by case: U x=>V [b][u]. Qed. Lemma unitbE : unitb (Unit : U). Proof. (* Goal: is_true (@TPCM.unitb U (@PCM.unit (pcm U) : sort U)) *) by case: unitbP. Qed. Lemma joinE0 (x y : U) : x \+ y = Unit <-> (x = Unit) * (y = Unit). Proof. (* Goal: iff (@eq (PCM.sort (pcm U)) (@PCM.join (pcm U) x y) (@PCM.unit (pcm U))) (prod (@eq (sort U) x (@PCM.unit (pcm U))) (@eq (sort U) y (@PCM.unit (pcm U)))) *) case: U x y=>V [b][u1 u2] H1 H2 H3 T x y; split; first by apply: H2. (* Goal: forall _ : prod (@eq (sort (@Pack V (@Class V b (@Mixin (@PCM.Pack V b) u1 u2 H1 H2 H3 T)))) x (@PCM.unit (pcm (@Pack V (@Class V b (@Mixin (@PCM.Pack V b) u1 u2 H1 H2 H3 T)))))) (@eq (sort (@Pack V (@Class V b (@Mixin (@PCM.Pack V b) u1 u2 H1 H2 H3 T)))) y (@PCM.unit (pcm (@Pack V (@Class V b (@Mixin (@PCM.Pack V b) u1 u2 H1 H2 H3 T)))))), @eq (PCM.sort (pcm (@Pack V (@Class V b (@Mixin (@PCM.Pack V b) u1 u2 H1 H2 H3 T))))) (@PCM.join (pcm (@Pack V (@Class V b (@Mixin (@PCM.Pack V b) u1 u2 H1 H2 H3 T)))) x y) (@PCM.unit (pcm (@Pack V (@Class V b (@Mixin (@PCM.Pack V b) u1 u2 H1 H2 H3 T))))) *) by case=>->->; rewrite unitL. Qed. Lemma valid_undefN : ~~ valid (@undef U). Proof. (* Goal: is_true (negb (@PCM.valid (pcm U) (@TPCM.undef U))) *) by case: U=>V [b][u]. Qed. Lemma valid_undef : valid (@undef U) = false. Proof. (* Goal: @eq bool (@PCM.valid (pcm U) (@TPCM.undef U)) false *) by rewrite (negbTE valid_undefN). Qed. Lemma undef_join (x : U) : undef \+ x = undef. Proof. (* Goal: @eq (PCM.sort (pcm U)) (@PCM.join (pcm U) (@TPCM.undef U) x) (@TPCM.undef U) *) by case: U x=>V [b][u]. Qed. Lemma join_undef (x : U) : x \+ undef = undef. Proof. (* Goal: @eq (PCM.sort (pcm U)) (@PCM.join (pcm U) x (@TPCM.undef U)) (@TPCM.undef U) *) by rewrite joinC undef_join. Qed. Lemma undef0 : (undef : U) <> (Unit : U). Proof. (* Goal: not (@eq (sort U) (@TPCM.undef U : sort U) (@PCM.unit (pcm U) : sort U)) *) by move=>E; move: (@valid_unit U); rewrite -E valid_undef. Qed. Definition undefE := (undef_join, join_undef, valid_undef). End Lemmas. End Exports. End TPCM. Export TPCM.Exports. Canonical pcm_monoid (U : pcm) := Monoid.Law (@joinA U) (@unitL U) (@unitR U). Canonical pcm_comoid (U : pcm) := Monoid.ComLaw (@joinC U). Section BigPartialMorph. Variables (R1 : Type) (R2 : pcm) (K : R1 -> R2 -> Type) (f : R2 -> R1). Variables (id1 : R1) (op1 : R1 -> R1 -> R1). Hypotheses (f_op : forall x y : R2, valid (x \+ y) -> f (x \+ y) = op1 (f x) (f y)) (f_id : f Unit = id1). Lemma big_pmorph I r (P : pred I) F : valid (\big[PCM.join/Unit]_(i <- r | P i) F i) -> Proof. (* Goal: forall _ : is_true (@PCM.valid R2 (@BigOp.bigop (PCM.sort R2) I (@PCM.unit R2) r (fun i : I => @BigBody (PCM.sort R2) I i (@PCM.join R2) (P i) (F i)))), @eq R1 (f (@BigOp.bigop (PCM.sort R2) I (@PCM.unit R2) r (fun i : I => @BigBody (PCM.sort R2) I i (@PCM.join R2) (P i) (F i)))) (@BigOp.bigop R1 I id1 r (fun i : I => @BigBody R1 I i op1 (P i) (f (F i)))) *) rewrite unlock; elim: r=>[|x r IH] //=; case: ifP=>// H V. (* Goal: @eq R1 (f (@PCM.join R2 (F x) (@reducebig (PCM.sort R2) I (@PCM.unit R2) r (fun i : I => @BigBody (PCM.sort R2) I i (@PCM.join R2) (P i) (F i))))) (op1 (f (F x)) (@reducebig R1 I id1 r (fun i : I => @BigBody R1 I i op1 (P i) (f (F i))))) *) by rewrite f_op // IH //; apply: validR V. Qed. End BigPartialMorph. Definition natPCMMix := PCMMixin addnC addnA add0n (fun x y => @id true) (erefl _). Canonical natPCM := Eval hnf in PCM nat natPCMMix. Definition multPCMMix := PCMMixin mulnC mulnA mul1n (fun x y => @id true) (erefl _). Definition multPCM := Eval hnf in PCM nat multPCMMix. Definition maxPCMMix := PCMMixin maxnC maxnA max0n (fun x y => @id true) (erefl _). Definition maxPCM := Eval hnf in PCM nat maxPCMMix. Definition bool_orPCMMix := PCMMixin orbC orbA orFb (fun x y => @id true) (erefl _). Definition bool_orPCM := Eval hnf in PCM bool bool_orPCMMix. Module ProdPCM. Section ProdPCM. Variables (U V : pcm). Local Notation tp := (U * V)%type. Definition pvalid := [fun x : tp => valid x.1 && valid x.2]. Definition pjoin := [fun x1 x2 : tp => (x1.1 \+ x2.1, x1.2 \+ x2.2)]. Definition punit : tp := (Unit, Unit). Lemma joinC x y : pjoin x y = pjoin y x. Lemma joinA x y z : pjoin x (pjoin y z) = pjoin (pjoin x y) z. Lemma validL x y : pvalid (pjoin x y) -> pvalid x. Lemma unitL x : pjoin punit x = x. Lemma validU : pvalid punit. Proof. (* Goal: is_true (@fun_of_simpl (prod (PCM.sort U) (PCM.sort V)) bool pvalid punit) *) by rewrite /pvalid /= !valid_unit. Qed. End ProdPCM. End ProdPCM. Definition prodPCMMixin U V := PCMMixin (@ProdPCM.joinC U V) (@ProdPCM.joinA U V) (@ProdPCM.unitL U V) (@ProdPCM.validL U V) (@ProdPCM.validU U V). Canonical prodPCM U V := Eval hnf in PCM (_ * _) (@prodPCMMixin U V). Section Simplification. Variable U V : pcm. Lemma pcmPJ (x1 y1 : U) (x2 y2 : V) : (x1, x2) \+ (y1, y2) = (x1 \+ y1, x2 \+ y2). Proof. (* Goal: @eq (PCM.sort (prodPCM U V)) (@PCM.join (prodPCM U V) (@pair (PCM.sort U) (PCM.sort V) x1 x2) (@pair (PCM.sort U) (PCM.sort V) y1 y2)) (@pair (PCM.sort U) (PCM.sort V) (@PCM.join U x1 y1) (@PCM.join V x2 y2)) *) by []. Qed. Lemma pcm_peta (x : prodPCM U V) : x = (x.1, x.2). Proof. (* Goal: @eq (PCM.sort (prodPCM U V)) x (@pair (PCM.sort U) (PCM.sort V) (@fst (PCM.sort U) (PCM.sort V) x) (@snd (PCM.sort U) (PCM.sort V) x)) *) by case: x. Qed. Lemma pcmPV (x : prodPCM U V) : valid x = valid x.1 && valid x.2. Proof. (* Goal: @eq bool (@PCM.valid (prodPCM U V) x) (andb (@PCM.valid U (@fst (PCM.sort U) (PCM.sort V) x)) (@PCM.valid V (@snd (PCM.sort U) (PCM.sort V) x))) *) by rewrite pcmE. Qed. Definition pcmPE := (pcmPJ, pcmPV). End Simplification. Section ProdTPCM. Variables (U V : tpcm). Lemma prod_unitb (x : prodPCM U V) : reflect (x = Unit) (unitb x.1 && unitb x.2). Proof. (* Goal: Bool.reflect (@eq (PCM.sort (prodPCM (TPCM.pcm U) (TPCM.pcm V))) x (@PCM.unit (prodPCM (TPCM.pcm U) (TPCM.pcm V)))) (andb (@TPCM.unitb U (@fst (PCM.sort (TPCM.pcm U)) (PCM.sort (TPCM.pcm V)) x)) (@TPCM.unitb V (@snd (PCM.sort (TPCM.pcm U)) (PCM.sort (TPCM.pcm V)) x))) *) case: x=>x1 x2; case: andP=>/= H; constructor. (* Goal: not (@eq (prod (TPCM.sort U) (TPCM.sort V)) (@pair (TPCM.sort U) (TPCM.sort V) x1 x2) (@PCM.unit (prodPCM (TPCM.pcm U) (TPCM.pcm V)))) *) (* Goal: @eq (prod (TPCM.sort U) (TPCM.sort V)) (@pair (TPCM.sort U) (TPCM.sort V) x1 x2) (@PCM.unit (prodPCM (TPCM.pcm U) (TPCM.pcm V))) *) - (* Goal: not (@eq (prod (TPCM.sort U) (TPCM.sort V)) (@pair (TPCM.sort U) (TPCM.sort V) x1 x2) (@PCM.unit (prodPCM (TPCM.pcm U) (TPCM.pcm V)))) *) (* Goal: @eq (prod (TPCM.sort U) (TPCM.sort V)) (@pair (TPCM.sort U) (TPCM.sort V) x1 x2) (@PCM.unit (prodPCM (TPCM.pcm U) (TPCM.pcm V))) *) by case: H=>/unitbP -> /unitbP ->. (* Goal: not (@eq (prod (TPCM.sort U) (TPCM.sort V)) (@pair (TPCM.sort U) (TPCM.sort V) x1 x2) (@PCM.unit (prodPCM (TPCM.pcm U) (TPCM.pcm V)))) *) by case=>X1 X2; elim: H; rewrite X1 X2 !unitbE. Qed. Lemma prod_join0E (x y : prodPCM U V) : x \+ y = Unit -> x = Unit /\ y = Unit. Proof. (* Goal: forall _ : @eq (PCM.sort (prodPCM (TPCM.pcm U) (TPCM.pcm V))) (@PCM.join (prodPCM (TPCM.pcm U) (TPCM.pcm V)) x y) (@PCM.unit (prodPCM (TPCM.pcm U) (TPCM.pcm V))), and (@eq (PCM.sort (prodPCM (TPCM.pcm U) (TPCM.pcm V))) x (@PCM.unit (prodPCM (TPCM.pcm U) (TPCM.pcm V)))) (@eq (PCM.sort (prodPCM (TPCM.pcm U) (TPCM.pcm V))) y (@PCM.unit (prodPCM (TPCM.pcm U) (TPCM.pcm V)))) *) by case: x y=>x1 x2 [y1 y2][] /joinE0 [->->] /joinE0 [->->]. Qed. Lemma prod_valid_undef : ~~ valid (@undef U, @undef V). Proof. (* Goal: is_true (negb (@PCM.valid (prodPCM (TPCM.pcm U) (TPCM.pcm V)) (@pair (PCM.sort (TPCM.pcm U)) (PCM.sort (TPCM.pcm V)) (@TPCM.undef U) (@TPCM.undef V)))) *) by rewrite pcmPV negb_and !valid_undef. Qed. Lemma prod_undef_join x : (@undef U, @undef V) \+ x = (@undef U, @undef V). Proof. (* Goal: @eq (PCM.sort (prodPCM (TPCM.pcm U) (TPCM.pcm V))) (@PCM.join (prodPCM (TPCM.pcm U) (TPCM.pcm V)) (@pair (PCM.sort (TPCM.pcm U)) (PCM.sort (TPCM.pcm V)) (@TPCM.undef U) (@TPCM.undef V)) x) (@pair (PCM.sort (TPCM.pcm U)) (PCM.sort (TPCM.pcm V)) (@TPCM.undef U) (@TPCM.undef V)) *) by case: x=>x1 x2; rewrite pcmPE !undef_join. Qed. Definition prodTPCMMix := TPCMMixin prod_unitb prod_join0E prod_valid_undef prod_undef_join. Canonical prodTPCM := Eval hnf in TPCM (U * V) prodTPCMMix. End ProdTPCM. Module UnitPCM. Section UnitPCM. Definition uvalid (x : unit) := true. Definition ujoin (x y : unit) := tt. Definition uunit := tt. Lemma ujoinC x y : ujoin x y = ujoin y x. Proof. (* Goal: @eq unit (ujoin x y) (ujoin y x) *) by []. Qed. Lemma ujoinA x y z : ujoin x (ujoin y z) = ujoin (ujoin x y) z. Proof. (* Goal: @eq unit (ujoin x (ujoin y z)) (ujoin (ujoin x y) z) *) by []. Qed. Lemma uvalidL x y : uvalid (ujoin x y) -> uvalid x. Proof. (* Goal: forall _ : is_true (uvalid (ujoin x y)), is_true (uvalid x) *) by []. Qed. Lemma uunitL x : ujoin uunit x = x. Proof. (* Goal: @eq unit (ujoin uunit x) x *) by case: x. Qed. Lemma uvalidU : uvalid uunit. Proof. (* Goal: is_true (uvalid uunit) *) by []. Qed. End UnitPCM. End UnitPCM. Definition unitPCMMixin := PCMMixin UnitPCM.ujoinC UnitPCM.ujoinA End BoolConjPCM. Definition boolPCMMixin := PCMMixin andbC andbA BoolConjPCM.unitL (fun x y => @id true) (erefl _). Canonical boolConjPCM := Eval hnf in PCM bool boolPCMMixin. Definition pcm_preord (U : pcm) (x y : U) := exists z, y = x \+ z. Notation "[ 'pcm' x '<=' y ]" := (@pcm_preord _ x y) (at level 0, x, y at level 69, format "[ '[hv' 'pcm' x '/ ' <= y ']' ]") : type_scope. Section PleqLemmas. Variable U : pcm. Implicit Types x y z : U. Lemma pleq_unit x : [pcm Unit <= x]. Proof. (* Goal: @pcm_preord U (@PCM.unit U) x *) by exists x; rewrite unitL. Qed. Lemma pleq_refl x : [pcm x <= x]. Proof. (* Goal: @pcm_preord U x x *) by exists Unit; rewrite unitR. Qed. Lemma pleq_trans x y z : [pcm x <= y] -> [pcm y <= z] -> [pcm x <= z]. Proof. (* Goal: forall (_ : @pcm_preord U x y) (_ : @pcm_preord U y z), @pcm_preord U x z *) by case=>a -> [b ->]; exists (a \+ b); rewrite joinA. Qed. Lemma pleq_join2r x x1 x2 : [pcm x1 <= x2] -> [pcm x1 \+ x <= x2 \+ x]. Proof. (* Goal: forall _ : @pcm_preord U x1 x2, @pcm_preord U (@PCM.join U x1 x) (@PCM.join U x2 x) *) by case=>a ->; exists a; rewrite joinAC. Qed. Lemma pleq_join2l x x1 x2 : [pcm x1 <= x2] -> [pcm x \+ x1 <= x \+ x2]. Proof. (* Goal: forall _ : @pcm_preord U x1 x2, @pcm_preord U (@PCM.join U x x1) (@PCM.join U x x2) *) by rewrite !(joinC x); apply: pleq_join2r. Qed. Lemma pleq_joinr x1 x2 : [pcm x1 <= x1 \+ x2]. Proof. (* Goal: @pcm_preord U x1 (@PCM.join U x1 x2) *) by exists x2. Qed. Lemma pleq_joinl x1 x2 : [pcm x2 <= x1 \+ x2]. Proof. (* Goal: @pcm_preord U x2 (@PCM.join U x1 x2) *) by rewrite joinC; apply: pleq_joinr. Qed. Lemma pleqV (x1 x2 : U) : [pcm x1 <= x2] -> valid x2 -> valid x1. Proof. (* Goal: forall (_ : @pcm_preord U x1 x2) (_ : is_true (@PCM.valid U x2)), is_true (@PCM.valid U x1) *) by case=>x -> /validL. Qed. Lemma pleq_validL (x x1 x2 : U) : [pcm x1 <= x2] -> valid (x \+ x2) -> valid (x \+ x1). Proof. (* Goal: forall (_ : @pcm_preord U x1 x2) (_ : is_true (@PCM.valid U (@PCM.join U x x2))), is_true (@PCM.valid U (@PCM.join U x x1)) *) by case=>a ->; rewrite joinA; apply: validL. Qed. Lemma pleq_validR (x x1 x2 : U) : [pcm x1 <= x2] -> valid (x2 \+ x) -> valid (x1 \+ x). Proof. (* Goal: forall (_ : @pcm_preord U x1 x2) (_ : is_true (@PCM.valid U (@PCM.join U x2 x))), is_true (@PCM.valid U (@PCM.join U x1 x)) *) by rewrite -!(joinC x); apply: pleq_validL. Qed. Lemma pleq_joinxK (V : cpcm) (x x1 x2 : V) : valid (x2 \+ x) -> [pcm x1 \+ x <= x2 \+ x] -> [pcm x1 <= x2]. Proof. (* Goal: forall (_ : is_true (@PCM.valid (CancellativePCM.pcm V) (@PCM.join (CancellativePCM.pcm V) x2 x))) (_ : @pcm_preord (CancellativePCM.pcm V) (@PCM.join (CancellativePCM.pcm V) x1 x) (@PCM.join (CancellativePCM.pcm V) x2 x)), @pcm_preord (CancellativePCM.pcm V) x1 x2 *) by move=>W [a]; rewrite joinAC=>/(joinKx W) ->; exists a. Qed. Lemma pleq_joinKx (V : cpcm) (x x1 x2 : V) : valid (x \+ x2) -> [pcm x \+ x1 <= x \+ x2] -> [pcm x1 <= x2]. Proof. (* Goal: forall (_ : is_true (@PCM.valid (CancellativePCM.pcm V) (@PCM.join (CancellativePCM.pcm V) x x2))) (_ : @pcm_preord (CancellativePCM.pcm V) (@PCM.join (CancellativePCM.pcm V) x x1) (@PCM.join (CancellativePCM.pcm V) x x2)), @pcm_preord (CancellativePCM.pcm V) x1 x2 *) by rewrite !(joinC x); apply: pleq_joinxK. Qed. End PleqLemmas. Hint Resolve pleq_unit pleq_refl pleq_joinr pleq_joinl : core. Definition local (U : pcm) (f : U -> U -> option U) := forall p x y r, valid (x \+ (p \+ y)) -> f x (p \+ y) = Some r -> valid (r \+ p \+ y) /\ f (x \+ p) y = Some (r \+ p). Lemma localV U f x y r : @local U f -> valid (x \+ y) -> f x y = Some r -> valid (r \+ y). Proof. (* Goal: forall (_ : @local U f) (_ : is_true (@PCM.valid U (@PCM.join U x y))) (_ : @eq (option (PCM.sort U)) (f x y) (@Some (PCM.sort U) r)), is_true (@PCM.valid U (@PCM.join U r y)) *) by move=>H V E; move: (H Unit x y r); rewrite unitL !unitR; case. Qed. Lemma idL (U : pcm) : @local U (fun x y => Some x). Proof. (* Goal: @local U (fun x _ : PCM.sort U => @Some (PCM.sort U) x) *) by move=>p x y _ V [<-]; rewrite -joinA. Qed.
Require Import StructTact.StructTactics. Require Import FunctionalExtensionality. Definition update {A B : Type} (A_eq_dec : forall x y : A, {x = y} + {x <> y}) st h (v : B) := fun nm => if A_eq_dec nm h then v else st nm. Section update. Variables A B : Type. Hypothesis A_eq_dec : forall x y : A, {x = y} + {x <> y}. Lemma update_diff : forall (sigma : A -> B) x v y, x <> y -> update A_eq_dec sigma x v y = sigma y. Proof. (* Goal: forall (sigma : forall _ : A, B) (x : A) (v : B) (y : A) (_ : not (@eq A x y)), @eq B (@update A B A_eq_dec sigma x v y) (sigma y) *) unfold update. (* Goal: forall (sigma : forall _ : A, B) (x : A) (v : B) (y : A) (_ : not (@eq A x y)), @eq B (if A_eq_dec y x then v else sigma y) (sigma y) *) intros. (* Goal: @eq B (if A_eq_dec y x then v else sigma y) (sigma y) *) break_if; congruence. Qed. Lemma update_nop : forall (sigma : A -> B) x y, update A_eq_dec sigma x (sigma x) y = sigma y. Proof. (* Goal: forall (sigma : forall _ : A, B) (x y : A), @eq B (@update A B A_eq_dec sigma x (sigma x) y) (sigma y) *) unfold update. (* Goal: forall (sigma : forall _ : A, B) (x y : A), @eq B (if A_eq_dec y x then sigma x else sigma y) (sigma y) *) intros. (* Goal: @eq B (if A_eq_dec y x then sigma x else sigma y) (sigma y) *) break_if; congruence. Qed. Lemma update_eq : forall (sigma : A -> B) x y v, x = y -> update A_eq_dec sigma x v y = v. Proof. (* Goal: forall (sigma : forall _ : A, B) (x y : A) (v : B) (_ : @eq A x y), @eq B (@update A B A_eq_dec sigma x v y) v *) intros. (* Goal: @eq B (@update A B A_eq_dec sigma x v y) v *) subst. (* Goal: @eq B (@update A B A_eq_dec sigma y v y) v *) unfold update. (* Goal: @eq B (if A_eq_dec y y then v else sigma y) v *) break_if; congruence. Qed. Lemma update_same : forall (sigma : A -> B) x v, update A_eq_dec sigma x v x = v. Proof. (* Goal: forall (sigma : forall _ : A, B) (x : A) (v : B), @eq B (@update A B A_eq_dec sigma x v x) v *) intros. (* Goal: @eq B (@update A B A_eq_dec sigma x v x) v *) rewrite update_eq; auto. Qed. Lemma update_nop_ext : forall (sigma : A -> B) h, update A_eq_dec sigma h (sigma h) = sigma. Proof. (* Goal: forall (sigma : forall _ : A, B) (h : A), @eq (forall _ : A, B) (@update A B A_eq_dec sigma h (sigma h)) sigma *) intros. (* Goal: @eq (forall _ : A, B) (@update A B A_eq_dec sigma h (sigma h)) sigma *) apply functional_extensionality. (* Goal: forall x : A, @eq B (@update A B A_eq_dec sigma h (sigma h) x) (sigma x) *) intros. (* Goal: @eq B (@update A B A_eq_dec sigma h (sigma h) x) (sigma x) *) apply update_nop. Qed. Lemma update_nop_ext' : forall (sigma : A -> B) y v, sigma y = v -> update A_eq_dec sigma y v = sigma. Proof. (* Goal: forall (sigma : forall _ : A, B) (y : A) (v : B) (_ : @eq B (sigma y) v), @eq (forall _ : A, B) (@update A B A_eq_dec sigma y v) sigma *) intros. (* Goal: @eq (forall _ : A, B) (@update A B A_eq_dec sigma y v) sigma *) subst. (* Goal: @eq (forall _ : A, B) (@update A B A_eq_dec sigma y (sigma y)) sigma *) apply update_nop_ext. Qed. Lemma update_overwrite : forall (sigma : A -> B) h st st', update A_eq_dec (update A_eq_dec sigma h st) h st' = update A_eq_dec sigma h st'. Proof. (* Goal: forall (sigma : forall _ : A, B) (h : A) (st st' : B), @eq (forall _ : A, B) (@update A B A_eq_dec (@update A B A_eq_dec sigma h st) h st') (@update A B A_eq_dec sigma h st') *) intros. (* Goal: @eq (forall _ : A, B) (@update A B A_eq_dec (@update A B A_eq_dec sigma h st) h st') (@update A B A_eq_dec sigma h st') *) apply functional_extensionality. (* Goal: forall x : A, @eq B (@update A B A_eq_dec (@update A B A_eq_dec sigma h st) h st' x) (@update A B A_eq_dec sigma h st' x) *) intros. (* Goal: @eq B (@update A B A_eq_dec (@update A B A_eq_dec sigma h st) h st' x) (@update A B A_eq_dec sigma h st' x) *) destruct (A_eq_dec h x). (* Goal: @eq B (@update A B A_eq_dec (@update A B A_eq_dec sigma h st) h st' x) (@update A B A_eq_dec sigma h st' x) *) (* Goal: @eq B (@update A B A_eq_dec (@update A B A_eq_dec sigma h st) h st' x) (@update A B A_eq_dec sigma h st' x) *) - (* Goal: @eq B (@update A B A_eq_dec (@update A B A_eq_dec sigma h st) h st' x) (@update A B A_eq_dec sigma h st' x) *) repeat rewrite update_eq; auto. (* BG Goal: @eq B (@update A B A_eq_dec (@update A B A_eq_dec sigma h st) h st' x) (@update A B A_eq_dec sigma h st' x) *) - (* Goal: @eq B (@update A B A_eq_dec (@update A B A_eq_dec sigma h st) h st' x) (@update A B A_eq_dec sigma h st' x) *) repeat rewrite update_diff; auto. Qed. End update. Lemma update_fun_comm : forall A B C A_eq_dec (f : B -> C) (st : A -> B) y v x, f (update A_eq_dec st y v x) = update A_eq_dec (fun x => f (st x)) y (f v) x. Proof. (* Goal: forall (A B C : Type) (A_eq_dec : forall x y : A, sumbool (@eq A x y) (not (@eq A x y))) (f : forall _ : B, C) (st : forall _ : A, B) (y : A) (v : B) (x : A), @eq C (f (@update A B A_eq_dec st y v x)) (@update A C A_eq_dec (fun x0 : A => f (st x0)) y (f v) x) *) intros. (* Goal: @eq C (f (@update A B A_eq_dec st y v x)) (@update A C A_eq_dec (fun x : A => f (st x)) y (f v) x) *) destruct (A_eq_dec x y); subst; repeat first [rewrite update_diff by congruence | rewrite update_eq by auto ]; auto. Qed. Ltac update_destruct_goal := match goal with | [ |- context [ update ?eq_dec _ ?y _ ?x ] ] => destruct (eq_dec y x) end. Ltac update_destruct_hyp := match goal with | [ _ : context [ update ?eq_dec _ ?y _ ?x ] |- _ ] => destruct (eq_dec y x) end. Ltac update_destruct := update_destruct_goal || update_destruct_hyp. Ltac rewrite_update' H := first [rewrite update_diff in H by congruence | rewrite update_eq in H by auto ]. Ltac rewrite_update := repeat match goal with | [ H : context [ update _ _ _ _ _ ] |- _ ] => rewrite_update' H; repeat rewrite_update' H | [ |- _ ] => repeat (try rewrite update_diff by congruence; try rewrite update_eq by auto) end. Ltac destruct_update := repeat (update_destruct; subst; rewrite_update). Ltac destruct_update_hyp := repeat ((update_destruct_hyp || update_destruct_goal); subst; rewrite_update). Ltac update_destruct_simplify := update_destruct; subst; rewrite_update; simpl in *. Ltac update_destruct_simplify_hyp := update_destruct_hyp || update_destruct_goal; subst; rewrite_update; simpl in *. Ltac update_destruct_max_simplify := update_destruct; subst_max; rewrite_update; simpl in *.
Require Export GeoCoq.Elements.OriginalProofs.lemma_triangletoparallelogram. Require Export GeoCoq.Elements.OriginalProofs.lemma_PGrotate. Require Export GeoCoq.Elements.OriginalProofs.proposition_35. Section Euclid. Context `{Ax:area}. Lemma proposition_37 : forall A B C D, Par A D B C -> ET A B C D B C. Proof. (* Goal: forall (A B C D : @Point Ax0) (_ : @Par Ax0 A D B C), @ET Ax0 Ax1 Ax2 Ax A B C D B C *) intros. (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Par B C A D) by (conclude lemma_parallelsymmetric). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Par C B A D) by (forward_using lemma_parallelflip). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (eq A A) by (conclude cn_equalityreflexive). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (eq D D) by (conclude cn_equalityreflexive). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Col A D A) by (conclude_def Col ). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Col A D D) by (conclude_def Col ). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) let Tf:=fresh in assert (Tf:exists E, (PG A E B C /\ Col A D E)) by (conclude lemma_triangletoparallelogram);destruct Tf as [E];spliter. (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) let Tf:=fresh in assert (Tf:exists F, (PG D F B C /\ Col A D F)) by (conclude lemma_triangletoparallelogram);destruct Tf as [F];spliter. (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (PG E B C A) by (conclude lemma_PGrotate). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (PG F B C D) by (conclude lemma_PGrotate). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Col D A F) by (forward_using lemma_collinearorder). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Col D A E) by (forward_using lemma_collinearorder). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (nCol C A D) by (forward_using lemma_parallelNC). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (neq A D) by (forward_using lemma_NCdistinct). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (neq D A) by (conclude lemma_inequalitysymmetric). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Col A F E) by (conclude lemma_collinear4). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Col E A D) by (forward_using lemma_collinearorder). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Col E A F) by (forward_using lemma_collinearorder). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (EF E B C A F B C D) by (conclude proposition_35). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Cong_3 B E A A C B) by (conclude proposition_34). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Cong_3 B F D D C B) by (conclude proposition_34). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) let Tf:=fresh in assert (Tf:exists M, (BetS E M C /\ BetS B M A)) by (conclude lemma_diagonalsmeet);destruct Tf as [M];spliter. (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) let Tf:=fresh in assert (Tf:exists m, (BetS F m C /\ BetS B m D)) by (conclude lemma_diagonalsmeet);destruct Tf as [m];spliter. (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Col B M A) by (conclude_def Col ). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Col B m D) by (conclude_def Col ). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Col B A M) by (forward_using lemma_collinearorder). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Col B D m) by (forward_using lemma_collinearorder). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Par E B C A) by (conclude_def PG ). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (nCol E B A) by (forward_using lemma_parallelNC). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (nCol B A E) by (forward_using lemma_NCorder). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (TS E B A C) by (conclude_def TS ). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (TS C B A E) by (conclude lemma_oppositesidesymmetric). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (Par D F B C) by (conclude_def PG ). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (nCol D F B) by (forward_using lemma_parallelNC). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (nCol B D F) by (forward_using lemma_NCorder). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (TS F B D C) by (conclude_def TS ). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (TS C B D F) by (conclude lemma_oppositesidesymmetric). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (ET B E A A C B) by (conclude axiom_congruentequal). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (ET B E A C B A) by (forward_using axiom_ETpermutation). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (ET C B A B E A) by (conclude axiom_ETsymmetric). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (ET C B A B A E) by (forward_using axiom_ETpermutation). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (ET B F D D C B) by (conclude axiom_congruentequal). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (ET B F D C B D) by (forward_using axiom_ETpermutation). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (ET C B D B F D) by (conclude axiom_ETsymmetric). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (ET C B D B D F) by (forward_using axiom_ETpermutation). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (EF E B C A C B F D) by (forward_using axiom_EFpermutation). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (EF C B F D E B C A) by (conclude axiom_EFsymmetric). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (EF C B F D C B E A) by (forward_using axiom_EFpermutation). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (EF C B E A C B F D) by (conclude axiom_EFsymmetric). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (ET C B A C B D) by (conclude axiom_halvesofequals). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (ET C B A D B C) by (forward_using axiom_ETpermutation). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (ET D B C C B A) by (conclude axiom_ETsymmetric). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (ET D B C A B C) by (forward_using axiom_ETpermutation). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) assert (ET A B C D B C) by (conclude axiom_ETsymmetric). (* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D B C *) close. Qed. End Euclid.
Require Import Omega. Require Import Zcomplements. Require Import Zpower. Require Import Zlogarithm. Require Import ZArithRing. Section definitions. Record diadic : Set := Diadic {Dnum : Z; Dexp : Z}. Definition Dshift (n : Z) (x : diadic) := Diadic (Dnum x) (Dexp x + n). Definition Dzero (x : Z) := Diadic 0 x. Definition is_Dzero (x : diadic) := Dnum x = 0%Z. Inductive rounding_mode : Set := | Rounding_sup : rounding_mode | Rounding_inf : rounding_mode | Rounding_nearest : rounding_mode | Rounding_zero : rounding_mode. Definition Rounding_mode_opp (m : rounding_mode) := match m with | Rounding_sup => Rounding_inf | Rounding_inf => Rounding_sup | Rounding_nearest => Rounding_nearest | Rounding_zero => Rounding_zero end. End definitions. Section comparisons. Definition Dcompare (x y : diadic) : Datatypes.comparison := let nx := Dnum x in let ny := Dnum y in let ex := Dexp x in let ey := Dexp y in (two_p (ex - Zmin ex ey) * nx ?= two_p (ey - Zmin ex ey) * ny)%Z. Definition Deq (x y : diadic) := match Dcompare x y with | Datatypes.Eq => True | Datatypes.Lt => False | Datatypes.Gt => False end. Definition Dneq (x y : diadic) := match Dcompare x y with | Datatypes.Eq => False | Datatypes.Lt => True | Datatypes.Gt => True end. Definition Dle (x y : diadic) := match Dcompare x y with | Datatypes.Eq => True | Datatypes.Lt => True | Datatypes.Gt => False end. Definition Dlt (x y : diadic) := match Dcompare x y with | Datatypes.Eq => False | Datatypes.Lt => True | Datatypes.Gt => False end. Definition Dge (x y : diadic) := match Dcompare x y with | Datatypes.Eq => True | Datatypes.Lt => False | Datatypes.Gt => True end. Definition Dgt (x y : diadic) := match Dcompare x y with | Datatypes.Eq => False | Datatypes.Lt => False | Datatypes.Gt => True end. Definition Deq_bool (x y : diadic) := match Dcompare x y with | Datatypes.Eq => true | Datatypes.Lt => false | Datatypes.Gt => false end. Definition Dneq_bool (x y : diadic) := match Dcompare x y with | Datatypes.Eq => false | Datatypes.Lt => true | Datatypes.Gt => true end. Definition Dle_bool (x y : diadic) := match Dcompare x y with | Datatypes.Eq => true | Datatypes.Lt => true | Datatypes.Gt => false end. Definition Dlt_bool (x y : diadic) := match Dcompare x y with | Datatypes.Eq => false | Datatypes.Lt => true | Datatypes.Gt => false end. Definition Dge_bool (x y : diadic) := match Dcompare x y with | Datatypes.Eq => true | Datatypes.Lt => false | Datatypes.Gt => true end. Definition Dgt_bool (x y : diadic) := match Dcompare x y with | Datatypes.Eq => false | Datatypes.Lt => false | Datatypes.Gt => true end. Lemma Dcompare_shift : forall (x y : diadic) (n : Z), Dcompare (Dshift n x) (Dshift n y) = Dcompare x y. Proof. (* Goal: forall (x y : diadic) (n : Z), @eq comparison (Dcompare (Dshift n x) (Dshift n y)) (Dcompare x y) *) unfold Dcompare in |- *; simpl in |- *; intros; rewrite (Zmin.Zmin_plus (Dexp x) (Dexp y) n). (* Goal: @eq comparison (Z.compare (Z.mul (two_p (Z.sub (Z.add (Dexp x) n) (Z.add (Z.min (Dexp x) (Dexp y)) n))) (Dnum x)) (Z.mul (two_p (Z.sub (Z.add (Dexp y) n) (Z.add (Z.min (Dexp x) (Dexp y)) n))) (Dnum y))) (Z.compare (Z.mul (two_p (Z.sub (Dexp x) (Z.min (Dexp x) (Dexp y)))) (Dnum x)) (Z.mul (two_p (Z.sub (Dexp y) (Z.min (Dexp x) (Dexp y)))) (Dnum y))) *) do 2 rewrite BinInt.Zminus_plus_simpl_r. (* Goal: @eq comparison (Z.compare (Z.mul (two_p (Z.sub (Dexp x) (Z.min (Dexp x) (Dexp y)))) (Dnum x)) (Z.mul (two_p (Z.sub (Dexp y) (Z.min (Dexp x) (Dexp y)))) (Dnum y))) (Z.compare (Z.mul (two_p (Z.sub (Dexp x) (Z.min (Dexp x) (Dexp y)))) (Dnum x)) (Z.mul (two_p (Z.sub (Dexp y) (Z.min (Dexp x) (Dexp y)))) (Dnum y))) *) reflexivity. Qed. Lemma eq_Deq : forall x y : diadic, x = y -> Deq x y. Proof. (* Goal: forall (x y : diadic) (_ : @eq diadic x y), Deq x y *) intros; rewrite H; unfold Deq in |- *; unfold Dcompare in |- *; apply Zcompare.Zcompare_eq_case; trivial. Qed. Lemma Dcompare_zero : forall (x : diadic) (n : Z), Dcompare x (Dzero n) = (Dnum x ?= 0)%Z. Proof. (* Goal: forall (x : diadic) (n : Z), @eq comparison (Dcompare x (Dzero n)) (Z.compare (Dnum x) Z0) *) intros (nx, ex) n. (* Goal: @eq comparison (Dcompare (Diadic nx ex) (Dzero n)) (Z.compare (Dnum (Diadic nx ex)) Z0) *) unfold Dcompare in |- *; simpl in |- *. (* Goal: @eq comparison (Z.compare (Z.mul (two_p (Z.sub ex (Z.min ex n))) nx) (Z.mul (two_p (Z.sub n (Z.min ex n))) Z0)) (Z.compare nx Z0) *) symmetry in |- *. (* Goal: @eq comparison (Z.compare nx Z0) (Z.compare (Z.mul (two_p (Z.sub ex (Z.min ex n))) nx) (Z.mul (two_p (Z.sub n (Z.min ex n))) Z0)) *) replace (two_p (n - Zmin ex n) * 0)%Z with (two_p (ex - Zmin ex n) * 0)%Z. (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex n))) Z0) (Z.mul (two_p (Z.sub n (Z.min ex n))) Z0) *) (* Goal: @eq comparison (Z.compare nx Z0) (Z.compare (Z.mul (two_p (Z.sub ex (Z.min ex n))) nx) (Z.mul (two_p (Z.sub ex (Z.min ex n))) Z0)) *) apply Zmult_compare_compat_l. (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex n))) Z0) (Z.mul (two_p (Z.sub n (Z.min ex n))) Z0) *) (* Goal: Z.gt (two_p (Z.sub ex (Z.min ex n))) Z0 *) apply two_p_gt_ZERO. (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex n))) Z0) (Z.mul (two_p (Z.sub n (Z.min ex n))) Z0) *) (* Goal: Z.le Z0 (Z.sub ex (Z.min ex n)) *) generalize (Zle_min_l ex n); generalize (Zmin ex n); intro; omega. (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex n))) Z0) (Z.mul (two_p (Z.sub n (Z.min ex n))) Z0) *) do 2 rewrite Zmult_0_r; reflexivity. Qed. Lemma Deq_shift : forall (x y : diadic) (n : Z), Deq x y -> Deq (Dshift n x) (Dshift n y). Proof. (* Goal: forall (x y : diadic) (n : Z) (_ : Deq x y), Deq (Dshift n x) (Dshift n y) *) unfold Deq in |- *; intros; rewrite (Dcompare_shift x y n); trivial. Qed. Lemma Deq_x_shift_x : forall (x : diadic) (n : Z), (0 <= n)%Z -> Deq x (Diadic (Dnum x * two_p n) (Dexp x - n)). Proof. (* Goal: forall (x : diadic) (n : Z) (_ : Z.le Z0 n), Deq x (Diadic (Z.mul (Dnum x) (two_p n)) (Z.sub (Dexp x) n)) *) intros (nx, ex) n Hn; unfold Deq in |- *; unfold Dcompare in |- *; simpl in |- *. (* Goal: match Z.compare (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) (Z.mul (two_p (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n)))) (Z.mul nx (two_p n))) with | Eq => True | Lt => False | Gt => False end *) cut ((two_p (ex - Zmin ex (ex - n)) * nx)%Z = (two_p (ex - n - Zmin ex (ex - n)) * (nx * two_p n))%Z). (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) (Z.mul (two_p (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n)))) (Z.mul nx (two_p n))) *) (* Goal: forall _ : @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) (Z.mul (two_p (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n)))) (Z.mul nx (two_p n))), match Z.compare (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) (Z.mul (two_p (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n)))) (Z.mul nx (two_p n))) with | Eq => True | Lt => False | Gt => False end *) intro H; rewrite H. (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) (Z.mul (two_p (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n)))) (Z.mul nx (two_p n))) *) (* Goal: match Z.compare (Z.mul (two_p (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n)))) (Z.mul nx (two_p n))) (Z.mul (two_p (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n)))) (Z.mul nx (two_p n))) with | Eq => True | Lt => False | Gt => False end *) generalize (two_p (ex - n - Zmin ex (ex - n)) * (nx * two_p n))%Z. (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) (Z.mul (two_p (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n)))) (Z.mul nx (two_p n))) *) (* Goal: forall z : Z, match Z.compare z z with | Eq => True | Lt => False | Gt => False end *) intros. (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) (Z.mul (two_p (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n)))) (Z.mul nx (two_p n))) *) (* Goal: match Z.compare z z with | Eq => True | Lt => False | Gt => False end *) generalize (Zcompare.Zcompare_refl z). (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) (Z.mul (two_p (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n)))) (Z.mul nx (two_p n))) *) (* Goal: forall _ : @eq comparison (Z.compare z z) Eq, match Z.compare z z with | Eq => True | Lt => False | Gt => False end *) elim (z ?= z)%Z; discriminate || trivial. (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) (Z.mul (two_p (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n)))) (Z.mul nx (two_p n))) *) rewrite (Zmult_comm nx (two_p n)). (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) (Z.mul (two_p (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n)))) (Z.mul (two_p n) nx)) *) rewrite <- Zmult_assoc_reverse. (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) (Z.mul (Z.mul (two_p (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n)))) (two_p n)) nx) *) rewrite <- two_p_is_exp. (* Goal: Z.le Z0 n *) (* Goal: Z.le Z0 (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n))) *) (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) (Z.mul (two_p (Z.add (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n))) n)) nx) *) ring_simplify (ex - n - Zmin ex (ex - n) + n)%Z (ex - Zmin ex (ex - n))%Z. (* Goal: Z.le Z0 n *) (* Goal: Z.le Z0 (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n))) *) (* Goal: @eq Z (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) (Z.mul (two_p (Z.sub ex (Z.min ex (Z.sub ex n)))) nx) *) reflexivity. (* Goal: Z.le Z0 n *) (* Goal: Z.le Z0 (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n))) *) generalize (Zle_min_l ex (ex - n)) (Zle_min_r ex (ex - n)). (* Goal: Z.le Z0 n *) (* Goal: forall (_ : Z.le (Z.min ex (Z.sub ex n)) ex) (_ : Z.le (Z.min ex (Z.sub ex n)) (Z.sub ex n)), Z.le Z0 (Z.sub (Z.sub ex n) (Z.min ex (Z.sub ex n))) *) omega. (* Goal: Z.le Z0 n *) assumption. Qed. Lemma Dle_Zle : forall n1 n2 d : Z, (n1 <= n2)%Z -> Dle (Diadic n1 d) (Diadic n2 d). Proof. (* Goal: forall (n1 n2 d : Z) (_ : Z.le n1 n2), Dle (Diadic n1 d) (Diadic n2 d) *) intros; unfold Dle in |- *; unfold Dcompare in |- *; simpl in |- *. (* Goal: match Z.compare (Z.mul (two_p (Z.sub d (Z.min d d))) n1) (Z.mul (two_p (Z.sub d (Z.min d d))) n2) with | Eq => True | Lt => True | Gt => False end *) rewrite (Zmin_n_n d). (* Goal: match Z.compare (Z.mul (two_p (Z.sub d d)) n1) (Z.mul (two_p (Z.sub d d)) n2) with | Eq => True | Lt => True | Gt => False end *) rewrite <- (Zminus_diag_reverse d). (* Goal: match Z.compare (Z.mul (two_p Z0) n1) (Z.mul (two_p Z0) n2) with | Eq => True | Lt => True | Gt => False end *) unfold two_p in |- *. (* Goal: match Z.compare (Z.mul (Zpos xH) n1) (Z.mul (Zpos xH) n2) with | Eq => True | Lt => True | Gt => False end *) rewrite (Zcompare_mult_compat 1 n1 n2). (* Goal: match Z.compare n1 n2 with | Eq => True | Lt => True | Gt => False end *) apply Zcompare.Zle_compare; assumption. Qed. Lemma Dlt_Zlt : forall n1 n2 d : Z, (n1 < n2)%Z -> Dlt (Diadic n1 d) (Diadic n2 d). Proof. (* Goal: forall (n1 n2 d : Z) (_ : Z.lt n1 n2), Dlt (Diadic n1 d) (Diadic n2 d) *) intros; unfold Dlt in |- *; unfold Dcompare in |- *; simpl in |- *. (* Goal: match Z.compare (Z.mul (two_p (Z.sub d (Z.min d d))) n1) (Z.mul (two_p (Z.sub d (Z.min d d))) n2) with | Eq => False | Lt => True | Gt => False end *) rewrite (Zmin_n_n d). (* Goal: match Z.compare (Z.mul (two_p (Z.sub d d)) n1) (Z.mul (two_p (Z.sub d d)) n2) with | Eq => False | Lt => True | Gt => False end *) rewrite <- (Zminus_diag_reverse d). (* Goal: match Z.compare (Z.mul (two_p Z0) n1) (Z.mul (two_p Z0) n2) with | Eq => False | Lt => True | Gt => False end *) unfold two_p in |- *. (* Goal: match Z.compare (Z.mul (Zpos xH) n1) (Z.mul (Zpos xH) n2) with | Eq => False | Lt => True | Gt => False end *) rewrite (Zcompare_mult_compat 1 n1 n2). (* Goal: match Z.compare n1 n2 with | Eq => False | Lt => True | Gt => False end *) apply Zcompare.Zlt_compare; assumption. Qed. Lemma Dge_Zge : forall n1 n2 d : Z, (n1 >= n2)%Z -> Dge (Diadic n1 d) (Diadic n2 d). Proof. (* Goal: forall (n1 n2 d : Z) (_ : Z.ge n1 n2), Dge (Diadic n1 d) (Diadic n2 d) *) intros; unfold Dge in |- *; unfold Dcompare in |- *; simpl in |- *. (* Goal: match Z.compare (Z.mul (two_p (Z.sub d (Z.min d d))) n1) (Z.mul (two_p (Z.sub d (Z.min d d))) n2) with | Eq => True | Lt => False | Gt => True end *) rewrite (Zmin_n_n d). (* Goal: match Z.compare (Z.mul (two_p (Z.sub d d)) n1) (Z.mul (two_p (Z.sub d d)) n2) with | Eq => True | Lt => False | Gt => True end *) rewrite <- (Zminus_diag_reverse d). (* Goal: match Z.compare (Z.mul (two_p Z0) n1) (Z.mul (two_p Z0) n2) with | Eq => True | Lt => False | Gt => True end *) unfold two_p in |- *. (* Goal: match Z.compare (Z.mul (Zpos xH) n1) (Z.mul (Zpos xH) n2) with | Eq => True | Lt => False | Gt => True end *) rewrite (Zcompare_mult_compat 1 n1 n2). (* Goal: match Z.compare n1 n2 with | Eq => True | Lt => False | Gt => True end *) apply Zcompare.Zge_compare; assumption. Qed. Lemma Dgt_Zgt : forall n1 n2 d : Z, (n1 > n2)%Z -> Dgt (Diadic n1 d) (Diadic n2 d). Proof. (* Goal: forall (n1 n2 d : Z) (_ : Z.gt n1 n2), Dgt (Diadic n1 d) (Diadic n2 d) *) intros; unfold Dgt in |- *; unfold Dcompare in |- *; simpl in |- *. (* Goal: match Z.compare (Z.mul (two_p (Z.sub d (Z.min d d))) n1) (Z.mul (two_p (Z.sub d (Z.min d d))) n2) with | Eq => False | Lt => False | Gt => True end *) rewrite (Zmin_n_n d). (* Goal: match Z.compare (Z.mul (two_p (Z.sub d d)) n1) (Z.mul (two_p (Z.sub d d)) n2) with | Eq => False | Lt => False | Gt => True end *) rewrite <- (Zminus_diag_reverse d). (* Goal: match Z.compare (Z.mul (two_p Z0) n1) (Z.mul (two_p Z0) n2) with | Eq => False | Lt => False | Gt => True end *) unfold two_p in |- *. (* Goal: match Z.compare (Z.mul (Zpos xH) n1) (Z.mul (Zpos xH) n2) with | Eq => False | Lt => False | Gt => True end *) rewrite (Zcompare_mult_compat 1 n1 n2). (* Goal: match Z.compare n1 n2 with | Eq => False | Lt => False | Gt => True end *) apply Zcompare.Zgt_compare; assumption. Qed. Lemma Dle_refl : forall x y : diadic, Deq x y -> Dle x y. Proof. (* Goal: forall (x y : diadic) (_ : Deq x y), Dle x y *) unfold Deq in |- *; unfold Dle in |- *; intros x y; elim (Dcompare x y); trivial. Qed. End comparisons. Section operations. Definition Dsucc (x : diadic) := Diadic (Dnum x + 1) (Dexp x). Definition Dpred (x : diadic) := Diadic (Dnum x - 1) (Dexp x). Definition Dadd (x y : diadic) := let nx := Dnum x in let ny := Dnum y in let ex := Dexp x in let ey := Dexp y in Diadic (two_p (ex - Zmin ex ey) * nx + two_p (ey - Zmin ex ey) * ny) (Zmin ex ey). Definition Dopp (x : diadic) := Diadic (- Dnum x) (Dexp x). Definition Dabs (x : diadic) := Diadic (Zabs (Dnum x)) (Dexp x). Definition Dminus (x y : diadic) := Dadd x (Dopp y). Definition Dmult (x y : diadic) := Diadic (Dnum x * Dnum y) (Dexp x + Dexp y). Definition Dproj (m : rounding_mode) (x : diadic) (P : diadic -> Prop) (y : diadic) := P y /\ match m with | Rounding_sup => forall z : diadic, P z -> Dle x z -> Dle y z | Rounding_inf => forall z : diadic, P z -> Dle z x -> Dle z y | Rounding_nearest => forall z : diadic, P z -> Dle (Dabs (Dminus x y)) (Dabs (Dminus x z)) | Rounding_zero => forall z : diadic, P z -> IF Dle (Dzero 0) x then Dle z x -> Dle z y else Dle z x -> Dle z y end. Lemma ZROUND_inf_spec : forall (p : positive) (x : Z), {y : Z | (y * two_power_pos p <= x < Zsucc y * two_power_pos p)%Z}. Proof. (* Goal: forall (p : positive) (x : Z), @sig Z (fun y : Z => and (Z.le (Z.mul y (two_power_pos p)) x) (Z.lt x (Z.mul (Z.succ y) (two_power_pos p)))) *) intros; elim (Zdiv_rest_correct x p); intros q r Hx Hr1 Hr2; exists q; rewrite (Zplus_0_r_reverse (q * two_power_pos p)); rewrite Hx; split; [ apply Zplus_le_compat_l; assumption | unfold Zsucc in |- *; rewrite Zmult_plus_distr_l; apply Zplus_lt_compat_l; rewrite Zmult_1_l; assumption ]. Qed. Definition ZROUND_inf (p : positive) (x : Z) := let (x', p) := ZROUND_inf_spec p x in x'. Lemma ZROUND_sup_spec : forall (p : positive) (x : Z), {y : Z | (Zpred y * two_power_pos p < x <= y * two_power_pos p)%Z}. Proof. (* Goal: forall (p : positive) (x : Z), @sig Z (fun y : Z => and (Z.lt (Z.mul (Z.pred y) (two_power_pos p)) x) (Z.le x (Z.mul y (two_power_pos p)))) *) intros; elim (Zdiv_rest_correct x p); intros q r; elim r; [ intros Hx Hr; exists q; rewrite Hx; rewrite <- Zplus_0_r_reverse; split; [ apply Zmult_gt_0_lt_compat_r; [ compute in |- *; reflexivity | apply Zlt_pred ] | apply Zle_refl ] | intros p0 Hx Hr1 Hr2; exists (Zsucc q); rewrite Hx; split; [ replace (Zpred (Zsucc q) * two_power_pos p)%Z with (q * two_power_pos p + 0)%Z; [ apply Zplus_lt_compat_l; compute in |- *; reflexivity | rewrite <- Zpred_succ; rewrite <- Zplus_0_r_reverse; reflexivity ] | unfold Zsucc in |- *; rewrite Zmult_plus_distr_l; apply Zplus_le_compat_l; rewrite Zmult_1_l; apply Zlt_le_weak; assumption ] | intros p0 Hx Hr1 Hr2; absurd (Datatypes.Gt = Datatypes.Gt); [ exact Hr1 | reflexivity ] ]. Qed. Definition ZROUND_sup (p : positive) (x : Z) := let (x', p) := ZROUND_sup_spec p x in x'. Lemma ZROUND_correct : forall (m : rounding_mode) (p : positive) (x : Z), {y : Z | match m with | Rounding_inf => (y * two_power_pos p <= x < Zsucc y * two_power_pos p)%Z | Rounding_sup => (Zpred y * two_power_pos p < x <= y * two_power_pos p)%Z | Rounding_nearest => match (x - ZROUND_inf p x ?= ZROUND_sup p x - x)%Z with | Datatypes.Eq => Proof. (* Goal: forall (m : rounding_mode) (p : positive) (x : Z), @sig Z (fun y : Z => match m with | Rounding_sup => and (Z.lt (Z.mul (Z.pred y) (two_power_pos p)) x) (Z.le x (Z.mul y (two_power_pos p))) | Rounding_inf => and (Z.le (Z.mul y (two_power_pos p)) x) (Z.lt x (Z.mul (Z.succ y) (two_power_pos p))) | Rounding_nearest => match Z.compare (Z.sub x (ZROUND_inf p x)) (Z.sub (ZROUND_sup p x) x) with | Eq => if Z.even (ZROUND_inf p x) then and (Z.le (Z.mul y (two_power_pos p)) x) (Z.lt x (Z.mul (Z.succ y) (two_power_pos p))) else and (Z.lt (Z.mul (Z.pred y) (two_power_pos p)) x) (Z.le x (Z.mul y (two_power_pos p))) | Lt => and (Z.le (Z.mul y (two_power_pos p)) x) (Z.lt x (Z.mul (Z.succ y) (two_power_pos p))) | Gt => and (Z.lt (Z.mul (Z.pred y) (two_power_pos p)) x) (Z.le x (Z.mul y (two_power_pos p))) end | Rounding_zero => match x with | Z0 => @eq Z y Z0 | Zpos p0 => and (Z.le (Z.mul y (two_power_pos p)) x) (Z.lt x (Z.mul (Z.succ y) (two_power_pos p))) | Zneg p0 => and (Z.lt (Z.mul (Z.pred y) (two_power_pos p)) x) (Z.le x (Z.mul y (two_power_pos p))) end end) *) simple destruct m; [ exact ZROUND_sup_spec | exact ZROUND_inf_spec | intros p x; elim (x - ZROUND_inf p x ?= ZROUND_sup p x - x)%Z; [ elim (Zeven.Zeven_bool (ZROUND_inf p x)); [ apply ZROUND_inf_spec | apply ZROUND_sup_spec ] | apply ZROUND_inf_spec | apply ZROUND_sup_spec ] | simple induction x; [ exists 0%Z; reflexivity | intro; apply ZROUND_inf_spec | intro; apply ZROUND_sup_spec ] ]. Qed. Definition ZROUND (m : rounding_mode) (p : positive) (x : Z) := let (x', p) := ZROUND_correct m p x in x'. Definition POS_ROUND (m : rounding_mode) (p n : positive) := BinInt.Zabs_N (ZROUND m p (Zpos n)). Definition NEG_ROUND (m : rounding_mode) (p n : positive) := BinInt.Zabs_N (- ZROUND m p (Zneg n)). Definition Ddouble (d : diadic) := Dshift 1 d. Axiom ROUND_spec : forall (m : rounding_mode) (p : Z) (x : diadic), {y : diadic | N_digits (Dexp y) = p /\ match m with | Rounding_inf => Dle y x /\ Dlt x (Dsucc y) | Rounding_sup => Dlt (Dpred y) x /\ Dle x y | Rounding_nearest => Dle (Dpred (Ddouble y)) (Ddouble x) /\ Dle (Ddouble x) (Dsucc (Ddouble y)) | Rounding_zero => IF Dlt (Dzero 0) x then Dle y x /\ Dlt x (Dsucc y) else Dlt (Dpred y) x /\ Dle x y end}. Definition ROUND (m : rounding_mode) (p : Z) (d : diadic) := let (x, _) := ROUND_spec m p d in x. Definition ANTIROUND (m : rounding_mode) (p : Z) (x : diadic) := let nx := Dnum x in let ex := Dexp x in match (p - ex)%Z with | Zpos q => ZROUND m q nx | Zneg q => (nx * two_power_pos q)%Z | Z0 => nx end. Parameter Ddiv : rounding_mode -> Z -> diadic -> diadic -> diadic. Parameter Dsqrt : rounding_mode -> Z -> positive -> Z -> diadic. End operations.
Definition swapXY_def u : {poly {poly R}} := (u ^ map_poly polyC).['Y]. Definition swapXY := locked_with swapXY_key swapXY_def. Canonical swapXY_unlockable := [unlockable fun swapXY]. Definition sizeY u : nat := \max_(i < size u) (size u`_i). Definition poly_XaY p : {poly {poly R}} := p^:P \Po ('X + 'Y). Definition poly_XmY p : {poly {poly R}} := p^:P \Po ('X * 'Y). Definition sub_annihilant p q := resultant (poly_XaY p) q^:P. Definition div_annihilant p q := resultant (poly_XmY p) q^:P. Lemma swapXY_polyC p : swapXY p%:P = p^:P. Proof. (* Goal: @eq (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) (swapXY (@polyC (poly_ringType R) p)) (@map_poly R (poly_ringType R) (@polyC R) p) *) by rewrite unlock map_polyC hornerC. Qed. Lemma swapXY_X : swapXY 'X = 'Y. Proof. (* Goal: @eq (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) (swapXY (polyX (poly_ringType R))) (@polyC (poly_ringType R) (polyX R)) *) by rewrite unlock map_polyX hornerX. Qed. Lemma swapXY_Y : swapXY 'Y = 'X. Proof. (* Goal: @eq (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) (swapXY (@polyC (poly_ringType R) (polyX R))) (polyX (poly_ringType R)) *) by rewrite swapXY_polyC map_polyX. Qed. Lemma swapXY_is_additive : additive swapXY. Proof. (* Goal: @GRing.Additive.axiom (poly_zmodType (poly_ringType R)) (poly_zmodType (poly_ringType R)) swapXY *) by move=> u v; rewrite unlock rmorphB !hornerE. Qed. Canonical swapXY_addf := Additive swapXY_is_additive. Lemma coef_swapXY u i j : (swapXY u)`_i`_j = u`_j`_i. Lemma swapXYK : involutive swapXY. Proof. (* Goal: @involutive (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) swapXY *) by move=> u; apply/polyP=> i; apply/polyP=> j; rewrite !coef_swapXY. Qed. Lemma swapXY_map_polyC p : swapXY p^:P = p%:P. Proof. (* Goal: @eq (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) (swapXY (@map_poly R (poly_ringType R) (@polyC R) p)) (@polyC (poly_ringType R) p) *) by rewrite -swapXY_polyC swapXYK. Qed. Lemma swapXY_eq0 u : (swapXY u == 0) = (u == 0). Proof. (* Goal: @eq bool (@eq_op (poly_eqType (poly_ringType R)) (swapXY u) (GRing.zero (poly_zmodType (poly_ringType R)))) (@eq_op (poly_eqType (poly_ringType R)) u (GRing.zero (poly_zmodType (poly_ringType R)))) *) by rewrite (inv_eq swapXYK) raddf0. Qed. Lemma swapXY_is_multiplicative : multiplicative swapXY. Proof. (* Goal: @GRing.RMorphism.mixin_of (poly_ringType (poly_ringType R)) (poly_ringType (poly_ringType R)) swapXY *) split=> [u v|]; last by rewrite swapXY_polyC map_polyC. (* Goal: @eq (GRing.Ring.sort (poly_ringType (poly_ringType R))) (swapXY (@GRing.mul (poly_ringType (poly_ringType R)) u v)) (@GRing.mul (poly_ringType (poly_ringType R)) (swapXY u) (swapXY v)) *) apply/polyP=> i; apply/polyP=> j; rewrite coef_swapXY !coefM !coef_sum. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S j))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S j))) (fun i0 : Finite.sort (ordinal_finType (S j)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S j))) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul (poly_ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) u) (@nat_of_ord (S j) i0)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) v) (subn j (@nat_of_ord (S j) i0))))) i))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun i0 : Finite.sort (ordinal_finType (S i)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul (poly_ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) (swapXY u)) (@nat_of_ord (S i) i0)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) (swapXY v)) (subn i (@nat_of_ord (S i) i0))))) j))) *) rewrite (eq_bigr _ (fun _ _ => coefM _ _ _)) exchange_big /=. (* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (S i)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j0 : ordinal (S i) => @BigBody (GRing.Ring.sort R) (ordinal (S i)) j0 (@GRing.add (GRing.Ring.zmodType R)) true (@BigOp.bigop (GRing.Ring.sort R) (ordinal (S j)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S j))) (fun i0 : ordinal (S j) => @BigBody (GRing.Ring.sort R) (ordinal (S j)) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@nth (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) u) (@nat_of_ord (S j) i0))) (@nat_of_ord (S i) j0)) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@nth (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) v) (subn j (@nat_of_ord (S j) i0)))) (subn i (@nat_of_ord (S i) j0)))))))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (S i)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun i0 : ordinal (S i) => @BigBody (GRing.Ring.sort R) (ordinal (S i)) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul (poly_ringType R) (@nth (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) (swapXY u)) (@nat_of_ord (S i) i0)) (@nth (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) (swapXY v)) (subn i (@nat_of_ord (S i) i0))))) j))) *) apply: eq_bigr => j1 _; rewrite coefM; apply: eq_bigr=> i1 _. (* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@nth (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) u) (@nat_of_ord (S j) i1))) (@nat_of_ord (S i) j1)) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@nth (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) v) (subn j (@nat_of_ord (S j) i1)))) (subn i (@nat_of_ord (S i) j1)))) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@nth (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) (swapXY u)) (@nat_of_ord (S i) j1))) (@nat_of_ord (S j) i1)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@nth (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) (swapXY v)) (subn i (@nat_of_ord (S i) j1)))) (subn j (@nat_of_ord (S j) i1)))) *) by rewrite !coef_swapXY. Qed. Canonical swapXY_rmorphism := AddRMorphism swapXY_is_multiplicative. Lemma swapXY_is_scalable : scalable_for (map_poly polyC \; *%R) swapXY. Proof. (* Goal: @GRing.Linear.mixin_of (poly_ringType R) (poly_lmodType (poly_ringType R)) (GRing.Ring.zmodType (poly_ringType (poly_ringType R))) (@catcomp (forall _ : GRing.Ring.sort (poly_ringType (poly_ringType R)), GRing.Ring.sort (poly_ringType (poly_ringType R))) (@poly_of (poly_ringType R) (Phant (GRing.Ring.sort (poly_ringType R)))) (@poly_of R (Phant (GRing.Ring.sort R))) tt (@map_poly R (poly_ringType R) (@polyC R)) (@GRing.mul (poly_ringType (poly_ringType R)))) swapXY *) by move=> p u /=; rewrite -mul_polyC rmorphM /= swapXY_polyC. Qed. Canonical swapXY_linear := AddLinear swapXY_is_scalable. Canonical swapXY_lrmorphism := [lrmorphism of swapXY]. Lemma swapXY_comp_poly p u : swapXY (p^:P \Po u) = p^:P \Po swapXY u. Proof. (* Goal: @eq (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) (swapXY (@comp_poly (poly_ringType R) u (@map_poly R (poly_ringType R) (@polyC R) p))) (@comp_poly (poly_ringType R) (swapXY u) (@map_poly R (poly_ringType R) (@polyC R) p)) *) rewrite -horner_map; congr _.[_]; rewrite -!map_poly_comp /=. (* Goal: @eq (@poly_of (poly_ringType (poly_ringType R)) (Phant (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))))) (@map_poly R (poly_ringType (poly_ringType R)) (@funcomp (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.Ring.sort R) tt (@funcomp (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) (@poly_of R (Phant (GRing.Ring.sort R))) tt swapXY (@polyC (poly_ringType R))) (@polyC R)) p) (@map_poly R (poly_ringType (poly_ringType R)) (@funcomp (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.Ring.sort R) tt (@polyC (poly_ringType R)) (@polyC R)) p) *) by apply: eq_map_poly => x; rewrite /= swapXY_polyC map_polyC. Qed. Lemma max_size_coefXY u i : size u`_i <= sizeY u. Proof. (* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) u) i))) (sizeY u)) *) have [ltiu | /(nth_default 0)->] := ltnP i (size u); last by rewrite size_poly0. (* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) u) i))) (sizeY u)) *) exact: (bigmax_sup (Ordinal ltiu)). Qed. Lemma max_size_lead_coefXY u : size (lead_coef u) <= sizeY u. Proof. (* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@lead_coef (poly_ringType R) u))) (sizeY u)) *) by rewrite lead_coefE max_size_coefXY. Qed. Lemma max_size_evalX u : size u.['X] <= sizeY u + (size u).-1. Proof. (* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@horner (poly_ringType R) u (polyX R)))) (addn (sizeY u) (Nat.pred (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) u))))) *) rewrite horner_coef (leq_trans (size_sum _ _ _)) //; apply/bigmax_leqP=> i _. (* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul (poly_ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) u) (@nat_of_ord (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) u)) i)) (@GRing.exp (poly_ringType R) (polyX R) (@nat_of_ord (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) u)) i))))) (addn (sizeY u) (Nat.pred (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) u))))) *) rewrite (leq_trans (size_mul_leq _ _)) // size_polyXn addnS. (* Goal: is_true (leq (Nat.pred (S (addn (@size (GRing.Ring.sort R) (@polyseq R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) u) (@nat_of_ord (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) u)) i)))) (@nat_of_ord (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) u)) i)))) (addn (sizeY u) (Nat.pred (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) u))))) *) by rewrite leq_add ?max_size_coefXY //= -ltnS (leq_trans _ (leqSpred _)). Qed. Lemma max_size_evalC u x : size u.[x%:P] <= sizeY u. Proof. (* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@horner (poly_ringType R) u (@polyC R x)))) (sizeY u)) *) rewrite horner_coef (leq_trans (size_sum _ _ _)) //; apply/bigmax_leqP=> i _. (* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul (poly_ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) u) (@nat_of_ord (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) u)) i)) (@GRing.exp (poly_ringType R) (@polyC R x) (@nat_of_ord (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) u)) i))))) (sizeY u)) *) rewrite (leq_trans (size_mul_leq _ _)) // -polyC_exp size_polyC addnC -subn1. (* Goal: is_true (leq (subn (addn (nat_of_bool (negb (@eq_op (GRing.Ring.eqType R) (@GRing.exp R x (@nat_of_ord (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) u)) i)) (GRing.zero (GRing.Ring.zmodType R))))) (@size (GRing.Ring.sort R) (@polyseq R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) u) (@nat_of_ord (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) u)) i))))) (S O)) (sizeY u)) *) by rewrite (leq_trans _ (max_size_coefXY _ i)) // leq_subLR leq_add2r leq_b1. Qed. Lemma sizeYE u : sizeY u = size (swapXY u). Proof. (* Goal: @eq nat (sizeY u) (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) (swapXY u))) *) apply/eqP; rewrite eqn_leq; apply/andP; split. (* Goal: is_true (leq (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) (swapXY u))) (sizeY u)) *) (* Goal: is_true (leq (sizeY u) (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) (swapXY u)))) *) apply/bigmax_leqP=> /= i _; apply/leq_sizeP => j /(nth_default 0) u_j_0. (* Goal: is_true (leq (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) (swapXY u))) (sizeY u)) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@nth (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) u) (@nat_of_ord (@size (@poly_of R (Phant (GRing.Ring.sort R))) (@polyseq (poly_ringType R) u)) i))) j) (GRing.zero (GRing.Ring.zmodType R)) *) by rewrite -coef_swapXY u_j_0 coef0. (* Goal: is_true (leq (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) (swapXY u))) (sizeY u)) *) apply/leq_sizeP=> j le_uY_j; apply/polyP=> i; rewrite coef_swapXY coef0. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) (@polyseq (poly_ringType R) u) i)) j) (GRing.zero (GRing.Ring.zmodType R)) *) by rewrite nth_default // (leq_trans _ le_uY_j) ?max_size_coefXY. Qed. Lemma sizeY_eq0 u : (sizeY u == 0%N) = (u == 0). Proof. (* Goal: @eq bool (@eq_op nat_eqType (sizeY u) O) (@eq_op (poly_eqType (poly_ringType R)) u (GRing.zero (poly_zmodType (poly_ringType R)))) *) by rewrite sizeYE size_poly_eq0 swapXY_eq0. Qed. Lemma sizeY_mulX u : sizeY (u * 'X) = sizeY u. Proof. (* Goal: @eq nat (sizeY (@GRing.mul (poly_ringType (poly_ringType R)) u (polyX (poly_ringType R)))) (sizeY u) *) rewrite !sizeYE rmorphM /= swapXY_X rreg_size //. (* Goal: @GRing.rreg (poly_ringType R) (polyX R) *) by have /monic_comreg[_ /rreg_lead] := monicX R. Qed. Lemma swapXY_poly_XaY p : swapXY (poly_XaY p) = poly_XaY p. Proof. (* Goal: @eq (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) (swapXY (poly_XaY p)) (poly_XaY p) *) by rewrite swapXY_comp_poly rmorphD /= swapXY_X swapXY_Y addrC. Qed. Lemma swapXY_poly_XmY p : swapXY (poly_XmY p) = poly_XmY p. Proof. (* Goal: @eq (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) (swapXY (poly_XmY p)) (poly_XmY p) *) by rewrite swapXY_comp_poly rmorphM /= swapXY_X swapXY_Y commr_polyX. Qed. Lemma poly_XaY0 : poly_XaY 0 = 0. Proof. (* Goal: @eq (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) (poly_XaY (GRing.zero (poly_zmodType R))) (GRing.zero (poly_zmodType (poly_ringType R))) *) by rewrite /poly_XaY rmorph0 comp_poly0. Qed. Lemma poly_XmY0 : poly_XmY 0 = 0. Proof. (* Goal: @eq (@poly_of (poly_ringType R) (Phant (@poly_of R (Phant (GRing.Ring.sort R))))) (poly_XmY (GRing.zero (poly_zmodType R))) (GRing.zero (poly_zmodType (poly_ringType R))) *) by rewrite /poly_XmY rmorph0 comp_poly0. Qed. End PolyXY_Ring. Prenex Implicits swapXY sizeY poly_XaY poly_XmY sub_annihilant div_annihilant. Prenex Implicits swapXYK. Lemma swapXY_map (R S : ringType) (f : {additive R -> S}) u : swapXY (u ^ map_poly f) = swapXY u ^ map_poly f. Proof. (* Goal: @eq (@poly_of (poly_ringType S) (Phant (@poly_of S (Phant (GRing.Ring.sort S))))) (@swapXY S (@map_poly (poly_ringType R) (poly_ringType S) (@map_poly R S (@GRing.Additive.apply (GRing.Ring.zmodType R) (GRing.Ring.zmodType S) (Phant (forall _ : GRing.Ring.sort R, GRing.Ring.sort S)) f)) u)) (@map_poly (poly_ringType R) (poly_ringType S) (@map_poly R S (@GRing.Additive.apply (GRing.Ring.zmodType R) (GRing.Ring.zmodType S) (Phant (forall _ : GRing.Ring.sort R, GRing.Ring.sort S)) f)) (@swapXY R u)) *) by apply/polyP=> i; apply/polyP=> j; rewrite !(coef_map, coef_swapXY). Qed. Section PolyXY_ComRing. Variable R : comRingType. Implicit Types (u : {poly {poly R}}) (p : {poly R}) (x y : R). Lemma horner_swapXY u x : (swapXY u).[x%:P] = u ^ eval x. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (@horner (poly_ringType (GRing.ComRing.ringType R)) (@swapXY (GRing.ComRing.ringType R) u) (@polyC (GRing.ComRing.ringType R) x)) (@map_poly (poly_ringType (GRing.ComRing.ringType R)) (GRing.ComRing.ringType R) (@horner_eval R x) u) *) apply/polyP=> i /=; rewrite coef_map /= /eval horner_coef coef_sum -sizeYE. (* Goal: @eq (GRing.ComRing.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (Finite.sort (ordinal_finType (@sizeY (GRing.ComRing.ringType R) u))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (ordinal_finType (@sizeY (GRing.ComRing.ringType R) u))) (fun i0 : Finite.sort (ordinal_finType (@sizeY (GRing.ComRing.ringType R) u)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (Finite.sort (ordinal_finType (@sizeY (GRing.ComRing.ringType R) u))) i0 (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@polyseq (GRing.ComRing.ringType R) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (GRing.zero (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (@polyseq (poly_ringType (GRing.ComRing.ringType R)) (@swapXY (GRing.ComRing.ringType R) u)) (@nat_of_ord (@sizeY (GRing.ComRing.ringType R) u) i0)) (@GRing.exp (poly_ringType (GRing.ComRing.ringType R)) (@polyC (GRing.ComRing.ringType R) x) (@nat_of_ord (@sizeY (GRing.ComRing.ringType R) u) i0)))) i))) (@horner (GRing.ComRing.ringType R) (@nth (@poly_of (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (@polyseq (poly_ringType (GRing.ComRing.ringType R)) u) i) x) *) rewrite (horner_coef_wide _ (max_size_coefXY u i)); apply: eq_bigr=> j _. (* Goal: @eq (GRing.ComRing.sort R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@polyseq (GRing.ComRing.ringType R) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (GRing.zero (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (@polyseq (poly_ringType (GRing.ComRing.ringType R)) (@swapXY (GRing.ComRing.ringType R) u)) (@nat_of_ord (@sizeY (GRing.ComRing.ringType R) u) j)) (@GRing.exp (poly_ringType (GRing.ComRing.ringType R)) (@polyC (GRing.ComRing.ringType R) x) (@nat_of_ord (@sizeY (GRing.ComRing.ringType R) u) j)))) i) (@GRing.mul (GRing.ComRing.ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@polyseq (GRing.ComRing.ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (GRing.zero (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (@polyseq (poly_ringType (GRing.ComRing.ringType R)) u) i)) (@nat_of_ord (@sizeY (GRing.ComRing.ringType R) u) j)) (@GRing.exp (GRing.ComRing.ringType R) x (@nat_of_ord (@sizeY (GRing.ComRing.ringType R) u) j))) *) by rewrite -polyC_exp coefMC coef_swapXY. Qed. Lemma horner_polyC u x : u.[x%:P] = swapXY u ^ eval x. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (@horner (poly_ringType (GRing.ComRing.ringType R)) u (@polyC (GRing.ComRing.ringType R) x)) (@map_poly (poly_ringType (GRing.ComRing.ringType R)) (GRing.ComRing.ringType R) (@horner_eval R x) (@swapXY (GRing.ComRing.ringType R) u)) *) by rewrite -horner_swapXY swapXYK. Qed. Lemma horner2_swapXY u x y : (swapXY u).[x, y] = u.[y, x]. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@horner (GRing.ComRing.ringType R) (@horner (poly_ringType (GRing.ComRing.ringType R)) (@swapXY (GRing.ComRing.ringType R) u) (@polyC (GRing.ComRing.ringType R) x)) y) (@horner (GRing.ComRing.ringType R) (@horner (poly_ringType (GRing.ComRing.ringType R)) u (@polyC (GRing.ComRing.ringType R) y)) x) *) by rewrite horner_swapXY -{1}(hornerC y x) horner_map. Qed. Lemma horner_poly_XaY p v : (poly_XaY p).[v] = p \Po (v + 'X). Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (@horner (poly_ringType (GRing.ComRing.ringType R)) (@poly_XaY (GRing.ComRing.ringType R) p) v) (@comp_poly (GRing.ComRing.ringType R) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R))) v (polyX (GRing.ComRing.ringType R))) p) *) by rewrite horner_comp !hornerE. Qed. Lemma horner_poly_XmY p v : (poly_XmY p).[v] = p \Po (v * 'X). Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (@horner (poly_ringType (GRing.ComRing.ringType R)) (@poly_XmY (GRing.ComRing.ringType R) p) v) (@comp_poly (GRing.ComRing.ringType R) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) v (polyX (GRing.ComRing.ringType R))) p) *) by rewrite horner_comp !hornerE. Qed. End PolyXY_ComRing. Section PolyXY_Idomain. Variable R : idomainType. Implicit Types (p q : {poly R}) (x y : R). Lemma size_poly_XaY p : size (poly_XaY p) = size p. Proof. (* Goal: @eq nat (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@poly_XaY (GRing.IntegralDomain.ringType R) p))) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) *) by rewrite size_comp_poly2 ?size_XaddC // size_map_polyC. Qed. Lemma poly_XaY_eq0 p : (poly_XaY p == 0) = (p == 0). Proof. (* Goal: @eq bool (@eq_op (poly_eqType (poly_ringType (GRing.IntegralDomain.ringType R))) (@poly_XaY (GRing.IntegralDomain.ringType R) p) (GRing.zero (poly_zmodType (poly_ringType (GRing.IntegralDomain.ringType R))))) (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))) *) by rewrite -!size_poly_eq0 size_poly_XaY. Qed. Lemma size_poly_XmY p : size (poly_XmY p) = size p. Proof. (* Goal: @eq nat (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@poly_XmY (GRing.IntegralDomain.ringType R) p))) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) *) by rewrite size_comp_poly2 ?size_XmulC ?polyX_eq0 ?size_map_polyC. Qed. Lemma poly_XmY_eq0 p : (poly_XmY p == 0) = (p == 0). Proof. (* Goal: @eq bool (@eq_op (poly_eqType (poly_ringType (GRing.IntegralDomain.ringType R))) (@poly_XmY (GRing.IntegralDomain.ringType R) p) (GRing.zero (poly_zmodType (poly_ringType (GRing.IntegralDomain.ringType R))))) (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))) *) by rewrite -!size_poly_eq0 size_poly_XmY. Qed. Lemma lead_coef_poly_XaY p : lead_coef (poly_XaY p) = (lead_coef p)%:P. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType R)))) (@lead_coef (poly_ringType (GRing.IntegralDomain.ringType R)) (@poly_XaY (GRing.IntegralDomain.ringType R) p)) (@polyC (GRing.IntegralDomain.ringType R) (@lead_coef (GRing.IntegralDomain.ringType R) p)) *) rewrite lead_coef_comp ?size_XaddC // -['Y]opprK -polyC_opp lead_coefXsubC. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType R)))) (@GRing.mul (GRing.IntegralDomain.ringType (poly_idomainType R)) (@lead_coef (GRing.IntegralDomain.ringType (poly_idomainType R)) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) p)) (@GRing.exp (GRing.IntegralDomain.ringType (poly_idomainType R)) (GRing.one (GRing.IntegralDomain.ringType (poly_idomainType R))) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType (poly_idomainType R))) (@polyseq (GRing.IntegralDomain.ringType (poly_idomainType R)) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) p)))))) (@polyC (GRing.IntegralDomain.ringType R) (@lead_coef (GRing.IntegralDomain.ringType R) p)) *) by rewrite expr1n mulr1 lead_coef_map_inj //; apply: polyC_inj. Qed. Lemma sub_annihilant_in_ideal p q : 1 < size p -> 1 < size q -> {uv : {poly {poly R}} * {poly {poly R}} | size uv.1 < size q /\ size uv.2 < size p Proof. (* Goal: forall (_ : is_true (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (_ : is_true (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))), @sig2 (prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)))))) (fun uv : prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) => and (is_true (leq (S (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv)))) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))) (is_true (leq (S (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv)))) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))))) (fun uv : prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) => forall x y : GRing.IntegralDomain.sort R, @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@horner (GRing.IntegralDomain.ringType R) (@sub_annihilant (GRing.IntegralDomain.ringType R) p q) y) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) p (@GRing.add (GRing.IntegralDomain.zmodType R) x y))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) q x)))) *) rewrite -size_poly_XaY -(size_map_polyC q) => p1_gt1 q1_gt1. (* Goal: @sig2 (prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)))))) (fun uv : prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) => and (is_true (leq (S (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv)))) (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))))) (is_true (leq (S (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv)))) (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@poly_XaY (GRing.IntegralDomain.ringType R) p)))))) (fun uv : prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) => forall x y : GRing.IntegralDomain.sort R, @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@horner (GRing.IntegralDomain.ringType R) (@sub_annihilant (GRing.IntegralDomain.ringType R) p q) y) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) p (@GRing.add (GRing.IntegralDomain.zmodType R) x y))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) q x)))) *) have [uv /= [ub_u ub_v Dr]] := resultant_in_ideal p1_gt1 q1_gt1. (* Goal: @sig2 (prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)))))) (fun uv : prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) => and (is_true (leq (S (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv)))) (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))))) (is_true (leq (S (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv)))) (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@poly_XaY (GRing.IntegralDomain.ringType R) p)))))) (fun uv : prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) => forall x y : GRing.IntegralDomain.sort R, @eq (GRing.IntegralDomain.sort R) (@horner (GRing.IntegralDomain.ringType R) (@sub_annihilant (GRing.IntegralDomain.ringType R) p q) y) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) p (@GRing.add (GRing.IntegralDomain.zmodType R) x y))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) q x)))) *) exists uv => // x y; rewrite -[r in r.[y]](hornerC _ x%:P) Dr. (* Goal: @eq (GRing.IntegralDomain.sort R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R))))) (@GRing.mul (poly_ringType (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R)))) (@fst (@poly_of (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R))) (Phant (@poly_of (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType R)) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R))) (Phant (@poly_of (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType R)) (Phant (GRing.IntegralDomain.sort R))))) uv) (@poly_XaY (GRing.IntegralDomain.ringType R) p)) (@GRing.mul (poly_ringType (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R)))) (@snd (@poly_of (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R))) (Phant (@poly_of (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType R)) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R))) (Phant (@poly_of (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType R)) (Phant (GRing.IntegralDomain.sort R))))) uv) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) p (@GRing.add (GRing.IntegralDomain.zmodType R) x y))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) q x))) *) by rewrite !(hornerE, horner_comp). Qed. Lemma sub_annihilantP p q x y : p != 0 -> q != 0 -> p.[x] = 0 -> q.[y] = 0 -> Proof. (* Goal: forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))) (_ : is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) q (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))) (_ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@horner (GRing.IntegralDomain.ringType R) p x) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))) (_ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@horner (GRing.IntegralDomain.ringType R) q y) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@horner (GRing.IntegralDomain.ringType R) (@sub_annihilant (GRing.IntegralDomain.ringType R) p q) (@GRing.add (GRing.IntegralDomain.zmodType R) x (@GRing.opp (GRing.IntegralDomain.zmodType R) y))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) *) move=> nz_p nz_q px0 qy0. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@horner (GRing.IntegralDomain.ringType R) (@sub_annihilant (GRing.IntegralDomain.ringType R) p q) (@GRing.add (GRing.IntegralDomain.zmodType R) x (@GRing.opp (GRing.IntegralDomain.zmodType R) y))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) *) have p_gt1: size p > 1 by have /rootP/root_size_gt1-> := px0. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@horner (GRing.IntegralDomain.ringType R) (@sub_annihilant (GRing.IntegralDomain.ringType R) p q) (@GRing.add (GRing.IntegralDomain.zmodType R) x (@GRing.opp (GRing.IntegralDomain.zmodType R) y))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) *) have q_gt1: size q > 1 by have /rootP/root_size_gt1-> := qy0. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@horner (GRing.IntegralDomain.ringType R) (@sub_annihilant (GRing.IntegralDomain.ringType R) p q) (@GRing.add (GRing.IntegralDomain.zmodType R) x (@GRing.opp (GRing.IntegralDomain.zmodType R) y))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) *) have [uv /= _ /(_ y)->] := sub_annihilant_in_ideal p_gt1 q_gt1. (* Goal: @eq (GRing.IntegralDomain.sort R) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) y)) (@GRing.add (GRing.IntegralDomain.zmodType R) x (@GRing.opp (GRing.IntegralDomain.zmodType R) y))) (@horner (GRing.IntegralDomain.ringType R) p (@GRing.add (GRing.IntegralDomain.zmodType R) y (@GRing.add (GRing.IntegralDomain.zmodType R) x (@GRing.opp (GRing.IntegralDomain.zmodType R) y))))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) y)) (@GRing.add (GRing.IntegralDomain.zmodType R) x (@GRing.opp (GRing.IntegralDomain.zmodType R) y))) (@horner (GRing.IntegralDomain.ringType R) q y))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) *) by rewrite (addrC y) subrK px0 qy0 !mulr0 addr0. Qed. Lemma sub_annihilant_neq0 p q : p != 0 -> q != 0 -> sub_annihilant p q != 0. Proof. (* Goal: forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))) (_ : is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) q (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))), is_true (negb (@eq_op (GRing.Ring.eqType (poly_ringType (GRing.IntegralDomain.ringType R))) (@sub_annihilant (GRing.IntegralDomain.ringType R) p q) (GRing.zero (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType R)))))) *) rewrite resultant_eq0; set p1 := poly_XaY p => nz_p nz_q. (* Goal: is_true (negb (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType (poly_idomainType R))) (@polyseq (GRing.IntegralDomain.ringType (poly_idomainType R)) (Pdiv.Idomain.gcdp (poly_idomainType R) p1 (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q)))))) *) have [nz_p1 nz_q1]: p1 != 0 /\ q^:P != 0 by rewrite poly_XaY_eq0 map_polyC_eq0. (* Goal: is_true (negb (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType (poly_idomainType R))) (@polyseq (GRing.IntegralDomain.ringType (poly_idomainType R)) (Pdiv.Idomain.gcdp (poly_idomainType R) p1 (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q)))))) *) rewrite -leqNgt eq_leq //; apply/eqP/Bezout_coprimepPn=> // [[[u v]]] /=. (* Goal: forall (_ : is_true (andb (andb (leq (S O) (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (GRing.IntegralDomain.ringType (poly_idomainType R)) u))) (leq (S (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (GRing.IntegralDomain.ringType (poly_idomainType R)) u))) (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (GRing.IntegralDomain.ringType (poly_idomainType R)) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))))) (andb (leq (S O) (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (GRing.IntegralDomain.ringType (poly_idomainType R)) v))) (leq (S (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (GRing.IntegralDomain.ringType (poly_idomainType R)) v))) (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (GRing.IntegralDomain.ringType (poly_idomainType R)) p1)))))) (_ : @eq (@poly_of (GRing.IntegralDomain.ringType (poly_idomainType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (poly_idomainType R))) u p1) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (poly_idomainType R))) v (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))), False *) rewrite !size_poly_gt0 -andbA => /and4P[nz_u ltuq nz_v _] Duv. (* Goal: False *) have /eqP/= := congr1 (size \o (lead_coef \o swapXY)) Duv. (* Goal: forall _ : is_true (@eq_op nat_eqType (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@lead_coef (poly_ringType (GRing.IntegralDomain.ringType R)) (@swapXY (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (poly_idomainType R))) u p1))))) (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@lead_coef (poly_ringType (GRing.IntegralDomain.ringType R)) (@swapXY (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (poly_idomainType R))) v (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))))))), False *) rewrite ltn_eqF // !rmorphM !lead_coefM (leq_trans (leq_ltn_trans _ ltuq)) //=. (* Goal: is_true (leq (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (GRing.IntegralDomain.ringType (poly_idomainType R)) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))) (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType (poly_idomainType R)) (@lead_coef (GRing.IntegralDomain.ringType (poly_idomainType R)) (@swapXY (GRing.IntegralDomain.ringType R) v)) (@lead_coef (GRing.IntegralDomain.ringType (poly_idomainType R)) (@swapXY (GRing.IntegralDomain.ringType R) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))))))) *) (* Goal: is_true (leq (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType (poly_idomainType R)) (@lead_coef (GRing.IntegralDomain.ringType (poly_idomainType R)) (@swapXY (GRing.IntegralDomain.ringType R) u)) (@lead_coef (GRing.IntegralDomain.ringType (poly_idomainType R)) (@swapXY (GRing.IntegralDomain.ringType R) p1))))) (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (GRing.IntegralDomain.ringType (poly_idomainType R)) u))) *) rewrite -{2}[u]swapXYK -sizeYE swapXY_poly_XaY lead_coef_poly_XaY. (* Goal: is_true (leq (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (GRing.IntegralDomain.ringType (poly_idomainType R)) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))) (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType (poly_idomainType R)) (@lead_coef (GRing.IntegralDomain.ringType (poly_idomainType R)) (@swapXY (GRing.IntegralDomain.ringType R) v)) (@lead_coef (GRing.IntegralDomain.ringType (poly_idomainType R)) (@swapXY (GRing.IntegralDomain.ringType R) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))))))) *) (* Goal: is_true (leq (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType (poly_idomainType R)) (@lead_coef (GRing.IntegralDomain.ringType (poly_idomainType R)) (@swapXY (GRing.IntegralDomain.ringType R) u)) (@polyC (GRing.IntegralDomain.ringType R) (@lead_coef (GRing.IntegralDomain.ringType R) p))))) (@sizeY (GRing.IntegralDomain.ringType R) (@swapXY (GRing.IntegralDomain.ringType R) u))) *) by rewrite mulrC mul_polyC size_scale ?max_size_lead_coefXY ?lead_coef_eq0. (* Goal: is_true (leq (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (GRing.IntegralDomain.ringType (poly_idomainType R)) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))) (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType (poly_idomainType R)) (@lead_coef (GRing.IntegralDomain.ringType (poly_idomainType R)) (@swapXY (GRing.IntegralDomain.ringType R) v)) (@lead_coef (GRing.IntegralDomain.ringType (poly_idomainType R)) (@swapXY (GRing.IntegralDomain.ringType R) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))))))) *) rewrite swapXY_map_polyC lead_coefC size_map_polyC. (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)) (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType (poly_idomainType R)) (@lead_coef (GRing.IntegralDomain.ringType (poly_idomainType R)) (@swapXY (GRing.IntegralDomain.ringType R) v)) q)))) *) set v1 := lead_coef _; have nz_v1: v1 != 0 by rewrite lead_coef_eq0 swapXY_eq0. (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)) (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType (poly_idomainType R)) v1 q)))) *) rewrite [in rhs in _ <= rhs]polySpred ?mulf_neq0 // size_mul //. (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)) (S (Nat.pred (Nat.pred (addn (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) v1)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q))))))) *) by rewrite (polySpred nz_v1) addnC addnS polySpred // ltnS leq_addr. Qed. Lemma div_annihilant_in_ideal p q : 1 < size p -> 1 < size q -> {uv : {poly {poly R}} * {poly {poly R}} | size uv.1 < size q /\ size uv.2 < size p Proof. (* Goal: forall (_ : is_true (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (_ : is_true (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))), @sig2 (prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)))))) (fun uv : prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) => and (is_true (leq (S (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv)))) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))) (is_true (leq (S (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv)))) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))))) (fun uv : prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) => forall x y : GRing.IntegralDomain.sort R, @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@horner (GRing.IntegralDomain.ringType R) (@div_annihilant (GRing.IntegralDomain.ringType R) p q) y) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) p (@GRing.mul (GRing.IntegralDomain.ringType R) x y))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) q x)))) *) rewrite -size_poly_XmY -(size_map_polyC q) => p1_gt1 q1_gt1. (* Goal: @sig2 (prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)))))) (fun uv : prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) => and (is_true (leq (S (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv)))) (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))))) (is_true (leq (S (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv)))) (@size (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@poly_XmY (GRing.IntegralDomain.ringType R) p)))))) (fun uv : prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) => forall x y : GRing.IntegralDomain.sort R, @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@horner (GRing.IntegralDomain.ringType R) (@div_annihilant (GRing.IntegralDomain.ringType R) p q) y) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) p (@GRing.mul (GRing.IntegralDomain.ringType R) x y))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) q x)))) *) have [uv /= [ub_u ub_v Dr]] := resultant_in_ideal p1_gt1 q1_gt1. (* Goal: @sig2 (prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)))))) (fun uv : prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) => and (is_true (leq (S (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv)))) (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))))) (is_true (leq (S (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv)))) (@size (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@polyseq (poly_ringType (GRing.IntegralDomain.ringType R)) (@poly_XmY (GRing.IntegralDomain.ringType R) p)))))) (fun uv : prod (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) => forall x y : GRing.IntegralDomain.sort R, @eq (GRing.IntegralDomain.sort R) (@horner (GRing.IntegralDomain.ringType R) (@div_annihilant (GRing.IntegralDomain.ringType R) p q) y) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) p (@GRing.mul (GRing.IntegralDomain.ringType R) x y))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) q x)))) *) exists uv => // x y; rewrite -[r in r.[y]](hornerC _ x%:P) Dr. (* Goal: @eq (GRing.IntegralDomain.sort R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R))))) (@GRing.mul (poly_ringType (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R)))) (@fst (@poly_of (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R))) (Phant (@poly_of (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType R)) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R))) (Phant (@poly_of (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType R)) (Phant (GRing.IntegralDomain.sort R))))) uv) (@poly_XmY (GRing.IntegralDomain.ringType R) p)) (@GRing.mul (poly_ringType (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R)))) (@snd (@poly_of (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R))) (Phant (@poly_of (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType R)) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R))) (Phant (@poly_of (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType R)) (Phant (GRing.IntegralDomain.sort R))))) uv) (@map_poly (GRing.IntegralDomain.ringType R) (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R)) q))) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) p (@GRing.mul (GRing.IntegralDomain.ringType R) x y))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@horner (GRing.IntegralDomain.ringType R) (@horner (poly_ringType (GRing.IntegralDomain.ringType R)) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType R)) (Phant (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))))) uv) (@polyC (GRing.IntegralDomain.ringType R) x)) y) (@horner (GRing.IntegralDomain.ringType R) q x))) *) by rewrite !(hornerE, horner_comp). Qed. Lemma div_annihilant_neq0 p q : p != 0 -> q.[0] != 0 -> div_annihilant p q != 0. End PolyXY_Idomain. Section PolyXY_Field. Variables (F E : fieldType) (FtoE : {rmorphism F -> E}). Local Notation pFtoE := (map_poly (GRing.RMorphism.apply FtoE)). Lemma div_annihilantP (p q : {poly E}) (x y : E) : p != 0 -> q != 0 -> y != 0 -> p.[x] = 0 -> q.[y] = 0 -> Proof. (* Goal: forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.Field.ringType E)) p (GRing.zero (poly_zmodType (GRing.Field.ringType E)))))) (_ : is_true (negb (@eq_op (poly_eqType (GRing.Field.ringType E)) q (GRing.zero (poly_zmodType (GRing.Field.ringType E)))))) (_ : is_true (negb (@eq_op (GRing.Field.eqType E) y (GRing.zero (GRing.Field.zmodType E))))) (_ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) p x) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E)))) (_ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) q y) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E)))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@div_annihilant (GRing.Field.ringType E) p q) (@GRing.mul (GRing.Field.ringType E) x (@GRing.inv (GRing.Field.unitRingType E) y))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *) move=> nz_p nz_q nz_y px0 qy0. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@div_annihilant (GRing.Field.ringType E) p q) (@GRing.mul (GRing.Field.ringType E) x (@GRing.inv (GRing.Field.unitRingType E) y))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *) have p_gt1: size p > 1 by have /rootP/root_size_gt1-> := px0. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@div_annihilant (GRing.Field.ringType E) p q) (@GRing.mul (GRing.Field.ringType E) x (@GRing.inv (GRing.Field.unitRingType E) y))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *) have q_gt1: size q > 1 by have /rootP/root_size_gt1-> := qy0. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@div_annihilant (GRing.Field.ringType E) p q) (@GRing.mul (GRing.Field.ringType E) x (@GRing.inv (GRing.Field.unitRingType E) y))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *) have [uv /= _ /(_ y)->] := div_annihilant_in_ideal p_gt1 q_gt1. (* Goal: @eq (GRing.Field.sort E) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType E))) (@GRing.mul (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) (@horner (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) (@horner (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType E))) (@fst (@poly_of (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType E))) (Phant (@poly_of (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) (Phant (GRing.Field.sort E))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType E))) (Phant (@poly_of (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) (Phant (GRing.Field.sort E))))) uv) (@polyC (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) y)) (@GRing.mul (GRing.Field.ringType E) x (@GRing.inv (GRing.Field.unitRingType E) y))) (@horner (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) p (@GRing.mul (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) y (@GRing.mul (GRing.Field.ringType E) x (@GRing.inv (GRing.Field.unitRingType E) y))))) (@GRing.mul (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) (@horner (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) (@horner (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType E))) (@snd (@poly_of (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType E))) (Phant (@poly_of (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) (Phant (GRing.Field.sort E))))) (@poly_of (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType E))) (Phant (@poly_of (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) (Phant (GRing.Field.sort E))))) uv) (@polyC (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) y)) (@GRing.mul (GRing.Field.ringType E) x (@GRing.inv (GRing.Field.unitRingType E) y))) (@horner (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) q y))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *) by rewrite (mulrC y) divfK // px0 qy0 !mulr0 addr0. Qed. Lemma map_sub_annihilantP (p q : {poly F}) (x y : E) : p != 0 -> q != 0 ->(p ^ FtoE).[x] = 0 -> (q ^ FtoE).[y] = 0 -> Proof. (* Goal: forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.Field.ringType F)) p (GRing.zero (poly_zmodType (GRing.Field.ringType F)))))) (_ : is_true (negb (@eq_op (poly_eqType (GRing.Field.ringType F)) q (GRing.zero (poly_zmodType (GRing.Field.ringType F)))))) (_ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) p) x) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E)))) (_ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) q) y) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E)))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@sub_annihilant (GRing.Field.ringType F) p q)) (@GRing.add (GRing.Field.zmodType E) x (@GRing.opp (GRing.Field.zmodType E) y))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *) move=> nz_p nz_q px0 qy0; have pFto0 := map_poly_eq0 FtoE. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@sub_annihilant (GRing.Field.ringType F) p q)) (@GRing.add (GRing.Field.zmodType E) x (@GRing.opp (GRing.Field.zmodType E) y))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *) rewrite map_resultant ?pFto0 ?lead_coef_eq0 ?map_poly_eq0 ?poly_XaY_eq0 //. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@resultant (poly_ringType (GRing.Field.ringType E)) (@map_poly (poly_ringType (GRing.Field.ringType F)) (poly_ringType (GRing.Field.ringType E)) (@GRing.RMorphism.apply (poly_ringType (GRing.Field.ringType F)) (poly_ringType (GRing.Field.ringType E)) (Phant (forall _ : @poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))), GRing.Ring.sort (poly_ringType (GRing.Field.ringType E)))) (@map_poly_rmorphism (GRing.Field.ringType F) (GRing.Field.ringType E) FtoE)) (@poly_XaY (GRing.Field.ringType F) p)) (@map_poly (poly_ringType (GRing.Field.ringType F)) (poly_ringType (GRing.Field.ringType E)) (@GRing.RMorphism.apply (poly_ringType (GRing.Field.ringType F)) (poly_ringType (GRing.Field.ringType E)) (Phant (forall _ : @poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))), GRing.Ring.sort (poly_ringType (GRing.Field.ringType E)))) (@map_poly_rmorphism (GRing.Field.ringType F) (GRing.Field.ringType E) FtoE)) (@map_poly (GRing.Field.ringType F) (poly_ringType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F)) q))) (@GRing.add (GRing.Field.zmodType E) x (@GRing.opp (GRing.Field.zmodType E) y))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *) rewrite map_comp_poly rmorphD /= map_polyC /= !map_polyX -!map_poly_comp /=. (* Goal: @eq (GRing.Field.sort E) (@horner (GRing.Field.ringType E) (@resultant (poly_ringType (GRing.Field.ringType E)) (@comp_poly (poly_ringType (GRing.Field.ringType E)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (poly_ringType (GRing.Field.ringType E)))) (polyX (poly_ringType (GRing.Field.ringType E))) (@polyC (poly_ringType (GRing.Field.ringType E)) (polyX (GRing.Field.ringType E)))) (@map_poly (GRing.Field.ringType F) (poly_ringType (GRing.Field.ringType E)) (@funcomp (@poly_of (GRing.Field.ringType E) (Phant (GRing.Field.sort E))) (@poly_of (GRing.Field.ringType F) (Phant (GRing.Field.sort F))) (GRing.Field.sort F) tt (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE)) (@polyC (GRing.Field.ringType F))) p)) (@map_poly (GRing.Field.ringType F) (poly_ringType (GRing.Field.ringType E)) (@funcomp (@poly_of (GRing.Field.ringType E) (Phant (GRing.Field.sort E))) (@poly_of (GRing.Field.ringType F) (Phant (GRing.Field.sort F))) (GRing.Field.sort F) tt (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE)) (@polyC (GRing.Field.ringType F))) q)) (@GRing.add (GRing.Field.zmodType E) x (@GRing.opp (GRing.Field.zmodType E) y))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *) by rewrite !(eq_map_poly (map_polyC _)) !map_poly_comp sub_annihilantP ?pFto0. Qed. Lemma map_div_annihilantP (p q : {poly F}) (x y : E) : p != 0 -> q != 0 -> y != 0 -> (p ^ FtoE).[x] = 0 -> (q ^ FtoE).[y] = 0 -> Proof. (* Goal: forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.Field.ringType F)) p (GRing.zero (poly_zmodType (GRing.Field.ringType F)))))) (_ : is_true (negb (@eq_op (poly_eqType (GRing.Field.ringType F)) q (GRing.zero (poly_zmodType (GRing.Field.ringType F)))))) (_ : is_true (negb (@eq_op (GRing.Field.eqType E) y (GRing.zero (GRing.Field.zmodType E))))) (_ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) p) x) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E)))) (_ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) q) y) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E)))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@div_annihilant (GRing.Field.ringType F) p q)) (@GRing.mul (GRing.Field.ringType E) x (@GRing.inv (GRing.Field.unitRingType E) y))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *) move=> nz_p nz_q nz_y px0 qy0; have pFto0 := map_poly_eq0 FtoE. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@div_annihilant (GRing.Field.ringType F) p q)) (@GRing.mul (GRing.Field.ringType E) x (@GRing.inv (GRing.Field.unitRingType E) y))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *) rewrite map_resultant ?pFto0 ?lead_coef_eq0 ?map_poly_eq0 ?poly_XmY_eq0 //. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (@horner (GRing.Field.ringType E) (@resultant (poly_ringType (GRing.Field.ringType E)) (@map_poly (poly_ringType (GRing.Field.ringType F)) (poly_ringType (GRing.Field.ringType E)) (@GRing.RMorphism.apply (poly_ringType (GRing.Field.ringType F)) (poly_ringType (GRing.Field.ringType E)) (Phant (forall _ : @poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))), GRing.Ring.sort (poly_ringType (GRing.Field.ringType E)))) (@map_poly_rmorphism (GRing.Field.ringType F) (GRing.Field.ringType E) FtoE)) (@poly_XmY (GRing.Field.ringType F) p)) (@map_poly (poly_ringType (GRing.Field.ringType F)) (poly_ringType (GRing.Field.ringType E)) (@GRing.RMorphism.apply (poly_ringType (GRing.Field.ringType F)) (poly_ringType (GRing.Field.ringType E)) (Phant (forall _ : @poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))), GRing.Ring.sort (poly_ringType (GRing.Field.ringType E)))) (@map_poly_rmorphism (GRing.Field.ringType F) (GRing.Field.ringType E) FtoE)) (@map_poly (GRing.Field.ringType F) (poly_ringType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F)) q))) (@GRing.mul (GRing.Field.ringType E) x (@GRing.inv (GRing.Field.unitRingType E) y))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *) rewrite map_comp_poly rmorphM /= map_polyC /= !map_polyX -!map_poly_comp /=. (* Goal: @eq (GRing.Field.sort E) (@horner (GRing.Field.ringType E) (@resultant (poly_ringType (GRing.Field.ringType E)) (@comp_poly (poly_ringType (GRing.Field.ringType E)) (@GRing.mul (poly_ringType (poly_ringType (GRing.Field.ringType E))) (polyX (poly_ringType (GRing.Field.ringType E))) (@polyC (poly_ringType (GRing.Field.ringType E)) (polyX (GRing.Field.ringType E)))) (@map_poly (GRing.Field.ringType F) (poly_ringType (GRing.Field.ringType E)) (@funcomp (@poly_of (GRing.Field.ringType E) (Phant (GRing.Field.sort E))) (@poly_of (GRing.Field.ringType F) (Phant (GRing.Field.sort F))) (GRing.Field.sort F) tt (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE)) (@polyC (GRing.Field.ringType F))) p)) (@map_poly (GRing.Field.ringType F) (poly_ringType (GRing.Field.ringType E)) (@funcomp (@poly_of (GRing.Field.ringType E) (Phant (GRing.Field.sort E))) (@poly_of (GRing.Field.ringType F) (Phant (GRing.Field.sort F))) (GRing.Field.sort F) tt (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE)) (@polyC (GRing.Field.ringType F))) q)) (@GRing.mul (GRing.Field.ringType E) x (@GRing.inv (GRing.Field.unitRingType E) y))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *) by rewrite !(eq_map_poly (map_polyC _)) !map_poly_comp div_annihilantP ?pFto0. Qed. Lemma root_annihilant x p (pEx := (p ^ pFtoE).[x%:P]) : Lemma algebraic_root_polyXY x y : (let pEx p := (p ^ map_poly FtoE).[x%:P] in Proof. (* Goal: forall (_ : let pEx := fun p : @poly_of (poly_ringType (GRing.Field.ringType F)) (Phant (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F)))) => @horner (poly_ringType (GRing.Field.ringType E)) (@map_poly (poly_ringType (GRing.Field.ringType F)) (poly_ringType (GRing.Field.ringType E)) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE)) p) (@polyC (GRing.Field.ringType E) x) in @ex2 (@poly_of (poly_ringType (GRing.Field.ringType F)) (Phant (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))))) (fun p : @poly_of (poly_ringType (GRing.Field.ringType F)) (Phant (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F)))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType E)))) (pEx p) (GRing.zero (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType E))))))) (fun p : @poly_of (poly_ringType (GRing.Field.ringType F)) (Phant (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F)))) => is_true (@root (GRing.Field.ringType E) (pEx p) y))) (_ : @algebraicOver F E (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) x), @algebraicOver F E (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) y *) by case=> p nz_px pxy0 /(root_annihilant nz_px)[r]; exists r; auto. Qed. End PolyXY_Field.
Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelsymmetric. Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelflip. Section Euclid. Context `{Ax1:euclidean_neutral}. Lemma lemma_PGsymmetric : forall A B C D, PG A B C D -> PG C D A B. Proof. (* Goal: forall (A B C D : @Point Ax1) (_ : @PG Ax1 A B C D), @PG Ax1 C D A B *) intros. (* Goal: @PG Ax1 C D A B *) assert ((Par A B C D /\ Par A D B C)) by (conclude_def PG ). (* Goal: @PG Ax1 C D A B *) assert (Par C D A B) by (conclude lemma_parallelsymmetric). (* Goal: @PG Ax1 C D A B *) assert (Par B C A D) by (conclude lemma_parallelsymmetric). (* Goal: @PG Ax1 C D A B *) assert (Par C B D A) by (forward_using lemma_parallelflip). (* Goal: @PG Ax1 C D A B *) assert (PG C D A B) by (conclude_def PG ). (* Goal: @PG Ax1 C D A B *) close. Qed. End Euclid.
Require Export Factorization_Prog. Require Export Comparator_Relation. Parameter BASE : BT. Definition b := base BASE. Definition Num := num BASE. Definition Val_bound := val_bound BASE. Definition Digit := digit BASE. Definition Tl := tl Digit. Theorem Specif_Comp : forall (n : nat) (o : order) (X Y : Num n), {o' : order | R (exp b n) o (Val_bound n X) (Val_bound n Y) o'}. Proof. (* Goal: forall (n : nat) (o : order) (X Y : Num n), @sig order (fun o' : order => R (exp b n) o (Val_bound n X) (Val_bound n Y) o') *) intros n o X Y. (* Goal: @sig order (fun o' : order => R (exp b n) o (Val_bound n X) (Val_bound n Y) o') *) unfold R in |- *; unfold b in |- *; unfold Val_bound in |- *. (* Goal: @sig order (fun o' : order => @eq order o' (FR (exp (base BASE) n) o (val_bound BASE n X) (val_bound BASE n Y))) *) apply factorization_for_realizer. (* Goal: proper order BASE (fun (n : nat) (a : order) (x y : inf n) (a' : order) => @eq order a' (FR n a x y)) *) (* Goal: factorizable order (fun (n : nat) (a : order) (x y : inf n) (a' : order) => @eq order a' (FR n a x y)) *) exact is_factorizable. (* Goal: proper order BASE (fun (n : nat) (a : order) (x y : inf n) (a' : order) => @eq order a' (FR n a x y)) *) exact (is_proper BASE). Qed.
Require Import List. Import ListNotations. Require Import StructTact.StructTactics. Require Import StructTact.ListTactics. Set Implicit Arguments. Fixpoint filterMap {A B} (f : A -> option B) (l : list A) : list B := match l with | [] => [] | x :: xs => match f x with | None => filterMap f xs | Some y => y :: filterMap f xs end end. Section filter_map. Variables A B C : Type. Lemma map_of_filterMap : forall (f : A -> option B) (g : B -> C) l, map g (filterMap f l) = filterMap (fun x => match f x with | Some y => Some (g y) | None => None end) l. Proof. (* Goal: forall (f : forall _ : A, option B) (g : forall _ : B, C) (l : list A), @eq (list C) (@map B C g (@filterMap A B f l)) (@filterMap A C (fun x : A => match f x with | Some y => @Some C (g y) | None => @None C end) l) *) induction l; intros; simpl in *. (* Goal: @eq (list C) (@map B C g match f a with | Some y => @cons B y (@filterMap A B f l) | None => @filterMap A B f l end) match match f a with | Some y => @Some C (g y) | None => @None C end with | Some y => @cons C y (@filterMap A C (fun x : A => match f x with | Some y0 => @Some C (g y0) | None => @None C end) l) | None => @filterMap A C (fun x : A => match f x with | Some y => @Some C (g y) | None => @None C end) l end *) (* Goal: @eq (list C) (@nil C) (@nil C) *) - (* Goal: @eq (list C) (@nil C) (@nil C) *) auto. (* BG Goal: @eq (list C) (@map B C g match f a with | Some y => @cons B y (@filterMap A B f l) | None => @filterMap A B f l end) match match f a with | Some y => @Some C (g y) | None => @None C end with | Some y => @cons C y (@filterMap A C (fun x : A => match f x with | Some y0 => @Some C (g y0) | None => @None C end) l) | None => @filterMap A C (fun x : A => match f x with | Some y => @Some C (g y) | None => @None C end) l end *) - (* Goal: @eq (list C) (@map B C g match f a with | Some y => @cons B y (@filterMap A B f l) | None => @filterMap A B f l end) match match f a with | Some y => @Some C (g y) | None => @None C end with | Some y => @cons C y (@filterMap A C (fun x : A => match f x with | Some y0 => @Some C (g y0) | None => @None C end) l) | None => @filterMap A C (fun x : A => match f x with | Some y => @Some C (g y) | None => @None C end) l end *) repeat break_match; simpl; auto using f_equal. Qed. Lemma filterMap_ext : forall (f g : A -> option B) l, (forall x, f x = g x) -> filterMap f l = filterMap g l. Proof. (* Goal: forall (f g : forall _ : A, option B) (l : list A) (_ : forall x : A, @eq (option B) (f x) (g x)), @eq (list B) (@filterMap A B f l) (@filterMap A B g l) *) induction l; intros; simpl in *. (* Goal: @eq (list B) match f a with | Some y => @cons B y (@filterMap A B f l) | None => @filterMap A B f l end match g a with | Some y => @cons B y (@filterMap A B g l) | None => @filterMap A B g l end *) (* Goal: @eq (list B) (@nil B) (@nil B) *) - (* Goal: @eq (list B) (@nil B) (@nil B) *) auto. (* BG Goal: @eq (list B) match f a with | Some y => @cons B y (@filterMap A B f l) | None => @filterMap A B f l end match g a with | Some y => @cons B y (@filterMap A B g l) | None => @filterMap A B g l end *) - (* Goal: @eq (list B) match f a with | Some y => @cons B y (@filterMap A B f l) | None => @filterMap A B f l end match g a with | Some y => @cons B y (@filterMap A B g l) | None => @filterMap A B g l end *) repeat find_higher_order_rewrite; auto. Qed. Lemma filterMap_defn : forall (f : A -> option B) x xs, filterMap f (x :: xs) = match f x with | Some y => y :: filterMap f xs | None => filterMap f xs end. Proof. (* Goal: forall (f : forall _ : A, option B) (x : A) (xs : list A), @eq (list B) (@filterMap A B f (@cons A x xs)) match f x with | Some y => @cons B y (@filterMap A B f xs) | None => @filterMap A B f xs end *) simpl. (* Goal: forall (f : forall _ : A, option B) (x : A) (xs : list A), @eq (list B) match f x with | Some y => @cons B y (@filterMap A B f xs) | None => @filterMap A B f xs end match f x with | Some y => @cons B y (@filterMap A B f xs) | None => @filterMap A B f xs end *) auto. Qed. Lemma In_filterMap : forall (f : A -> option B) b xs, In b (filterMap f xs) -> exists a, In a xs /\ f a = Some b. Proof. (* Goal: forall (f : forall _ : A, option B) (b : B) (xs : list A) (_ : @In B b (@filterMap A B f xs)), @ex A (fun a : A => and (@In A a xs) (@eq (option B) (f a) (@Some B b))) *) intros. (* Goal: @ex A (fun a : A => and (@In A a xs) (@eq (option B) (f a) (@Some B b))) *) induction xs; simpl in *; intuition. (* Goal: @ex A (fun a0 : A => and (or (@eq A a a0) (@In A a0 xs)) (@eq (option B) (f a0) (@Some B b))) *) break_match. (* Goal: @ex A (fun a0 : A => and (or (@eq A a a0) (@In A a0 xs)) (@eq (option B) (f a0) (@Some B b))) *) (* Goal: @ex A (fun a0 : A => and (or (@eq A a a0) (@In A a0 xs)) (@eq (option B) (f a0) (@Some B b))) *) - (* Goal: @ex A (fun a0 : A => and (or (@eq A a a0) (@In A a0 xs)) (@eq (option B) (f a0) (@Some B b))) *) simpl in *. (* Goal: @ex A (fun a0 : A => and (or (@eq A a a0) (@In A a0 xs)) (@eq (option B) (f a0) (@Some B b))) *) intuition; subst; eauto. (* Goal: @ex A (fun a0 : A => and (or (@eq A a a0) (@In A a0 xs)) (@eq (option B) (f a0) (@Some B b))) *) break_exists_exists; intuition. (* BG Goal: @ex A (fun a0 : A => and (or (@eq A a a0) (@In A a0 xs)) (@eq (option B) (f a0) (@Some B b))) *) - (* Goal: @ex A (fun a0 : A => and (or (@eq A a a0) (@In A a0 xs)) (@eq (option B) (f a0) (@Some B b))) *) concludes. (* Goal: @ex A (fun a0 : A => and (or (@eq A a a0) (@In A a0 xs)) (@eq (option B) (f a0) (@Some B b))) *) break_exists_exists; intuition. Qed. Lemma filterMap_app : forall (f : A -> option B) xs ys, filterMap f (xs ++ ys) = filterMap f xs ++ filterMap f ys. Proof. (* Goal: forall (f : forall _ : A, option B) (xs ys : list A), @eq (list B) (@filterMap A B f (@app A xs ys)) (@app B (@filterMap A B f xs) (@filterMap A B f ys)) *) induction xs; intros; simpl in *; repeat break_match; simpl in *; intuition auto using f_equal. Qed. Lemma filterMap_In : forall A B (f : A -> option B) a b xs, f a = Some b -> In a xs -> In b (filterMap f xs). Proof. (* Goal: forall (A B : Type) (f : forall _ : A, option B) (a : A) (b : B) (xs : list A) (_ : @eq (option B) (f a) (@Some B b)) (_ : @In A a xs), @In B b (@filterMap A B f xs) *) induction xs; simpl; repeat break_match; simpl; intuition (auto; try congruence). Qed. Lemma filterMap_of_filterMap : forall (f : B -> option C) (g : A -> option B) xs, filterMap f (filterMap g xs) = filterMap (fun a => match g a with | Some b => f b | None => None end) xs. Proof. (* Goal: forall (f : forall _ : B, option C) (g : forall _ : A, option B) (xs : list A), @eq (list C) (@filterMap B C f (@filterMap A B g xs)) (@filterMap A C (fun a : A => match g a with | Some b => f b | None => @None C end) xs) *) induction xs; simpl; intuition. (* Goal: @eq (list C) (@filterMap B C f match g a with | Some y => @cons B y (@filterMap A B g xs) | None => @filterMap A B g xs end) match match g a with | Some b => f b | None => @None C end with | Some y => @cons C y (@filterMap A C (fun a : A => match g a with | Some b => f b | None => @None C end) xs) | None => @filterMap A C (fun a : A => match g a with | Some b => f b | None => @None C end) xs end *) repeat break_match; simpl; repeat find_rewrite; auto. Qed. Lemma filterMap_all_None : forall (f : A -> option B) xs, (forall x, In x xs -> f x = None) -> filterMap f xs = []. Proof. (* Goal: forall (f : forall _ : A, option B) (xs : list A) (_ : forall (x : A) (_ : @In A x xs), @eq (option B) (f x) (@None B)), @eq (list B) (@filterMap A B f xs) (@nil B) *) induction xs; intros; simpl in *; intuition. (* Goal: @eq (list B) match f a with | Some y => @cons B y (@filterMap A B f xs) | None => @filterMap A B f xs end (@nil B) *) rewrite H; auto. Qed. Lemma filterMap_NoDup_inj : forall (f : A -> option B) l, (forall x1 x2 y, f x1 = Some y -> f x2 = Some y -> x1 = x2) -> NoDup l -> NoDup (filterMap f l). Proof. (* Goal: forall (f : forall _ : A, option B) (l : list A) (_ : forall (x1 x2 : A) (y : B) (_ : @eq (option B) (f x1) (@Some B y)) (_ : @eq (option B) (f x2) (@Some B y)), @eq A x1 x2) (_ : @NoDup A l), @NoDup B (@filterMap A B f l) *) induction l; intros. (* Goal: @NoDup B (@filterMap A B f (@cons A a l)) *) (* Goal: @NoDup B (@filterMap A B f (@nil A)) *) - (* Goal: @NoDup B (@filterMap A B f (@nil A)) *) constructor. (* BG Goal: @NoDup B (@filterMap A B f (@cons A a l)) *) - (* Goal: @NoDup B (@filterMap A B f (@cons A a l)) *) simpl. (* Goal: @NoDup B match f a with | Some y => @cons B y (@filterMap A B f l) | None => @filterMap A B f l end *) invc_NoDup. (* Goal: @NoDup B match f a with | Some y => @cons B y (@filterMap A B f l) | None => @filterMap A B f l end *) break_match; auto. (* Goal: @NoDup B (@cons B b (@filterMap A B f l)) *) constructor; auto. (* Goal: not (@In B b (@filterMap A B f l)) *) intro. (* Goal: False *) find_apply_lem_hyp In_filterMap. (* Goal: False *) break_exists. (* Goal: False *) break_and. (* Goal: False *) assert (a = x) by eauto. (* Goal: False *) subst. (* Goal: False *) contradiction. Qed. End filter_map.
Require Export GeoCoq.Elements.OriginalProofs.proposition_31short. Require Export GeoCoq.Elements.OriginalProofs.proposition_38. Require Export GeoCoq.Elements.OriginalProofs.proposition_39. Section Euclid. Context `{Ax:area}. Lemma proposition_40 : forall A B C D E H, Cong B C H E -> ET A B C D H E -> Triangle A B C -> Triangle D H E -> Col B C H -> Col B C E -> OS A D B C -> neq A D -> Par A D B C. Proof. (* Goal: forall (A B C D E H : @Point Ax0) (_ : @Cong Ax0 B C H E) (_ : @ET Ax0 Ax1 Ax2 Ax A B C D H E) (_ : @Triangle Ax0 A B C) (_ : @Triangle Ax0 D H E) (_ : @Col Ax0 B C H) (_ : @Col Ax0 B C E) (_ : @OS Ax0 A D B C) (_ : @neq Ax0 A D), @Par Ax0 A D B C *) intros. (* Goal: @Par Ax0 A D B C *) assert (nCol D H E) by (conclude_def Triangle ). (* Goal: @Par Ax0 A D B C *) assert (neq H E) by (forward_using lemma_NCdistinct). (* Goal: @Par Ax0 A D B C *) assert (neq E H) by (conclude lemma_inequalitysymmetric). (* Goal: @Par Ax0 A D B C *) let Tf:=fresh in assert (Tf:exists R, (BetS E H R /\ Cong H R E H)) by (conclude lemma_extension);destruct Tf as [R];spliter. (* Goal: @Par Ax0 A D B C *) assert (BetS R H E) by (conclude axiom_betweennesssymmetry). (* Goal: @Par Ax0 A D B C *) assert (nCol H E D) by (forward_using lemma_NCorder). (* Goal: @Par Ax0 A D B C *) assert (Col R H E) by (conclude_def Col ). (* Goal: @Par Ax0 A D B C *) assert (Col H E R) by (forward_using lemma_collinearorder). (* Goal: @Par Ax0 A D B C *) assert (eq E E) by (conclude cn_equalityreflexive). (* Goal: @Par Ax0 A D B C *) assert (Col H E E) by (conclude_def Col ). (* Goal: @Par Ax0 A D B C *) assert (neq R E) by (forward_using lemma_betweennotequal). (* Goal: @Par Ax0 A D B C *) assert (nCol R E D) by (conclude lemma_NChelper). (* Goal: @Par Ax0 A D B C *) let Tf:=fresh in assert (Tf:exists P Q M, (BetS P D Q /\ CongA P D H D H E /\ Par P Q R E /\ BetS P M E /\ BetS D M H)) by (conclude proposition_31short);destruct Tf as [P[Q[M]]];spliter. (* Goal: @Par Ax0 A D B C *) assert (Col R E H) by (forward_using lemma_collinearorder). (* Goal: @Par Ax0 A D B C *) assert (Par P Q H E) by (conclude lemma_collinearparallel). (* Goal: @Par Ax0 A D B C *) assert (Col P D Q) by (conclude_def Col ). (* Goal: @Par Ax0 A D B C *) assert (Col P Q D) by (forward_using lemma_collinearorder). (* Goal: @Par Ax0 A D B C *) assert (Cong H E B C) by (conclude lemma_congruencesymmetric). (* Goal: @Par Ax0 A D B C *) assert (Col C B H) by (forward_using lemma_collinearorder). (* Goal: @Par Ax0 A D B C *) assert (Col C B E) by (forward_using lemma_collinearorder). (* Goal: @Par Ax0 A D B C *) assert (nCol A B C) by (conclude_def Triangle ). (* Goal: @Par Ax0 A D B C *) assert (neq B C) by (forward_using lemma_NCdistinct). (* Goal: @Par Ax0 A D B C *) assert (neq C B) by (conclude lemma_inequalitysymmetric). (* Goal: @Par Ax0 A D B C *) assert (Col B H E) by (conclude lemma_collinear4). (* Goal: @Par Ax0 A D B C *) assert (Col H E B) by (forward_using lemma_collinearorder). (* Goal: @Par Ax0 A D B C *) assert (Col B C H) by (forward_using lemma_collinearorder). (* Goal: @Par Ax0 A D B C *) assert (Col B C E) by (forward_using lemma_collinearorder). (* Goal: @Par Ax0 A D B C *) assert (Col C H E) by (conclude lemma_collinear4). (* Goal: @Par Ax0 A D B C *) assert (Col H E C) by (forward_using lemma_collinearorder). (* Goal: @Par Ax0 A D B C *) assert (ET D H E D B C) by (conclude proposition_38). (* Goal: @Par Ax0 A D B C *) assert (ET A B C D B C) by (conclude axiom_ETtransitive). (* Goal: @Par Ax0 A D B C *) assert (nCol H E D) by (forward_using lemma_NCorder). (* Goal: @Par Ax0 A D B C *) assert (nCol B C D) by (conclude lemma_NChelper). (* Goal: @Par Ax0 A D B C *) assert (nCol D B C) by (forward_using lemma_NCorder). (* Goal: @Par Ax0 A D B C *) assert (Triangle D B C) by (conclude_def Triangle ). (* Goal: @Par Ax0 A D B C *) assert (Par A D B C) by (conclude proposition_39). (* Goal: @Par Ax0 A D B C *) close. Qed. End Euclid.
From mathcomp Require Import ssreflect ssrfun. From LemmaOverloading Require Import rels heaps. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Ltac add_morphism_tactic := SetoidTactics.add_morphism_tactic. Notation " R ===> R' " := (@Morphisms.respectful _ _ R R') (right associativity, at level 55) : signature_scope. Definition star (p1 p2 : Pred heap) : Pred heap := [Pred h | exists h1, exists h2, h = h1 :+ h2 /\ h1 \In p1 /\ h2 \In p2]. Definition emp : Pred heap := [Pred i | i = empty]. Definition this i : Pred heap := [Pred h : heap | i = h]. Definition ppts A x (v : A) : Pred heap := [Pred h | locked x :-> v = h]. Definition top : Pred heap := PredT. Section BasicProperties. Lemma starC p1 p2 : p1 # p2 <~> p2 # p1. Proof. (* Goal: @EqPred heap (star p1 p2) (star p2 p1) *) move=>h /=; split; case=>h1 [h2][->][H1] H2; by exists h2; exists h1; rewrite unC. Qed. Lemma starp0 p : p # emp <~> p. Proof. (* Goal: @EqPred heap (star p emp) p *) move=>h /=; split; first by case=>h1 [h2][->][H1]->; rewrite unh0. (* Goal: forall _ : p h, star p emp h *) by move=>H1; exists h; exists empty; rewrite unh0. Qed. Lemma star0p p : emp # p <~> p. Proof. (* Goal: @EqPred heap (star emp p) p *) by rewrite starC starp0. Qed. Lemma starCA p1 p2 p3 : p1 # p2 # p3 <~> p2 # p1 # p3. Proof. (* Goal: @EqPred heap (star p1 (star p2 p3)) (star p2 (star p1 p3)) *) move=>h; split; case=>h1 [_][->][H1][h2][h3][->][H2] H3 /=; by rewrite unCA; do !esplit. Qed. Lemma starA p1 p2 p3 : (p1 # p2) # p3 <~> p1 # p2 # p3. Proof. (* Goal: @EqPred heap (star (star p1 p2) p3) (star p1 (star p2 p3)) *) by rewrite (starC p2) starCA starC. Qed. Lemma starAC p1 p2 p3 : (p1 # p2) # p3 <~> (p1 # p3) # p2. Proof. (* Goal: @EqPred heap (star (star p1 p2) p3) (star (star p1 p3) p2) *) by rewrite -2!(starC p3) starA. Qed. End BasicProperties.
Require Export GeoCoq.Tarski_dev.Ch06_out_lines. Require Export GeoCoq.Tarski_dev.Tactics.ColR. Ltac not_exist_hyp_comm A B := not_exist_hyp (A<>B);not_exist_hyp (B<>A). Ltac not_exist_hyp2 A B C D := first [not_exist_hyp_comm A B | not_exist_hyp_comm C D]. Ltac not_exist_hyp3 A B C D E F := first [not_exist_hyp_comm A B | not_exist_hyp_comm C D | not_exist_hyp_comm E F]. 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: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: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 end. Ltac ColR := let tpoint := constr:(Tpoint) in let col := constr:(Col) in treat_equalities; assert_cols; assert_diffs; try (solve [Col]); Col_refl tpoint col. Section T7_1. Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}. Lemma midpoint_dec : forall I A B, Midpoint I A B \/ ~ Midpoint I A B. Proof. (* Goal: forall I A B : @Tpoint Tn, or (@Midpoint Tn I A B) (not (@Midpoint Tn I A B)) *) intros. (* Goal: or (@Midpoint Tn I A B) (not (@Midpoint Tn I A B)) *) unfold Midpoint. (* Goal: or (and (@Bet Tn A I B) (@Cong Tn A I I B)) (not (and (@Bet Tn A I B) (@Cong Tn A I I B))) *) elim (bet_dec A I B);intro; elim (cong_dec A I I B);intro; tauto. Qed. Lemma is_midpoint_id : forall A B, Midpoint A A B -> A = B. Proof. (* Goal: forall (A B : @Tpoint Tn) (_ : @Midpoint Tn A A B), @eq (@Tpoint Tn) A B *) intros. (* Goal: @eq (@Tpoint Tn) A B *) unfold Midpoint in H. (* Goal: @eq (@Tpoint Tn) A B *) spliter. (* Goal: @eq (@Tpoint Tn) A B *) treat_equalities;reflexivity. Qed. Lemma is_midpoint_id_2 : forall A B, Midpoint A B A -> A=B. Proof. (* Goal: forall (A B : @Tpoint Tn) (_ : @Midpoint Tn A B A), @eq (@Tpoint Tn) A B *) intros. (* Goal: @eq (@Tpoint Tn) A B *) unfold Midpoint in *. (* Goal: @eq (@Tpoint Tn) A B *) spliter. (* Goal: @eq (@Tpoint Tn) A B *) apply cong_identity in H0. (* Goal: @eq (@Tpoint Tn) A B *) auto. Qed. Lemma l7_2 : forall M A B, Midpoint M A B -> Midpoint M B A. Proof. (* Goal: forall (M A B : @Tpoint Tn) (_ : @Midpoint Tn M A B), @Midpoint Tn M B A *) unfold Midpoint. (* Goal: forall (M A B : @Tpoint Tn) (_ : and (@Bet Tn A M B) (@Cong Tn A M M B)), and (@Bet Tn B M A) (@Cong Tn B M M A) *) intuition. Qed. Lemma l7_3 : forall M A, Midpoint M A A -> M=A. Proof. (* Goal: forall (M A : @Tpoint Tn) (_ : @Midpoint Tn M A A), @eq (@Tpoint Tn) M A *) unfold Midpoint. (* Goal: forall (M A : @Tpoint Tn) (_ : and (@Bet Tn A M A) (@Cong Tn A M M A)), @eq (@Tpoint Tn) M A *) intros;spliter;repeat split;Between;Cong. Qed. Lemma l7_3_2 : forall A, Midpoint A A A. Proof. (* Goal: forall A : @Tpoint Tn, @Midpoint Tn A A A *) unfold Midpoint. (* Goal: forall A : @Tpoint Tn, and (@Bet Tn A A A) (@Cong Tn A A A A) *) intros;repeat split;Between;Cong. Qed. Lemma symmetric_point_construction : forall P A, exists P', Midpoint A P P'. Proof. (* Goal: forall P A : @Tpoint Tn, @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Midpoint Tn A P P') *) unfold Midpoint. (* Goal: forall P A : @Tpoint Tn, @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => and (@Bet Tn P A P') (@Cong Tn P A A P')) *) intros. (* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => and (@Bet Tn P A P') (@Cong Tn P A A P')) *) prolong P A E P A. (* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => and (@Bet Tn P A P') (@Cong Tn P A A P')) *) exists E. (* Goal: and (@Bet Tn P A E) (@Cong Tn P A A E) *) split;Cong;Between. Qed. Lemma symmetric_point_uniqueness : forall A P P1 P2, Midpoint P A P1 -> Midpoint P A P2 -> P1=P2. Proof. (* Goal: forall (A P P1 P2 : @Tpoint Tn) (_ : @Midpoint Tn P A P1) (_ : @Midpoint Tn P A P2), @eq (@Tpoint Tn) P1 P2 *) unfold Midpoint. (* Goal: forall (A P P1 P2 : @Tpoint Tn) (_ : and (@Bet Tn A P P1) (@Cong Tn A P P P1)) (_ : and (@Bet Tn A P P2) (@Cong Tn A P P P2)), @eq (@Tpoint Tn) P1 P2 *) intros. (* Goal: @eq (@Tpoint Tn) P1 P2 *) spliter. (* Goal: @eq (@Tpoint Tn) P1 P2 *) elim (eq_dec_points A P); intros. (* Goal: @eq (@Tpoint Tn) P1 P2 *) (* Goal: @eq (@Tpoint Tn) P1 P2 *) treat_equalities;auto. (* Goal: @eq (@Tpoint Tn) P1 P2 *) apply (construction_uniqueness A P A P);Cong. Qed. Lemma l7_9 : forall P Q A X, Midpoint A P X -> Midpoint A Q X -> P=Q. Proof. (* Goal: forall (P Q A X : @Tpoint Tn) (_ : @Midpoint Tn A P X) (_ : @Midpoint Tn A Q X), @eq (@Tpoint Tn) P Q *) unfold Midpoint. (* Goal: forall (P Q A X : @Tpoint Tn) (_ : and (@Bet Tn P A X) (@Cong Tn P A A X)) (_ : and (@Bet Tn Q A X) (@Cong Tn Q A A X)), @eq (@Tpoint Tn) P Q *) intros. (* Goal: @eq (@Tpoint Tn) P Q *) spliter. (* Goal: @eq (@Tpoint Tn) P Q *) induction (eq_dec_points A X). (* Goal: @eq (@Tpoint Tn) P Q *) (* Goal: @eq (@Tpoint Tn) P Q *) treat_equalities;reflexivity. (* Goal: @eq (@Tpoint Tn) P Q *) apply (construction_uniqueness X A X A);Cong;Between. Qed. Lemma l7_9_bis : forall P Q A X, Midpoint A P X -> Midpoint A X Q -> P=Q. Proof. (* Goal: forall (P Q A X : @Tpoint Tn) (_ : @Midpoint Tn A P X) (_ : @Midpoint Tn A X Q), @eq (@Tpoint Tn) P Q *) intros; apply l7_9 with A X; unfold Midpoint in *; split; spliter; Cong; Between. Qed. Lemma l7_13 : forall A P Q P' Q', Midpoint A P' P -> Midpoint A Q' Q -> Cong P Q P' Q'. Lemma l7_15 : forall P Q R P' Q' R' A, Midpoint A P P' -> Midpoint A Q Q' -> Midpoint A R R' -> Bet P Q R -> Bet P' Q' R'. Lemma l7_16 : forall P Q R S P' Q' R' S' A, Midpoint A P P' -> Midpoint A Q Q' -> Midpoint A R R' -> Midpoint A S S' -> Cong P Q R S -> Cong P' Q' R' S'. Lemma symmetry_preserves_midpoint : forall A B C D E F Z, Midpoint Z A D -> Midpoint Z B E -> Midpoint Z C F -> Midpoint B A C -> Midpoint E D F. Proof. (* Goal: forall (A B C D E F Z : @Tpoint Tn) (_ : @Midpoint Tn Z A D) (_ : @Midpoint Tn Z B E) (_ : @Midpoint Tn Z C F) (_ : @Midpoint Tn B A C), @Midpoint Tn E D F *) intros. (* Goal: @Midpoint Tn E D F *) unfold Midpoint. (* Goal: and (@Bet Tn D E F) (@Cong Tn D E E F) *) unfold Midpoint in H2. (* Goal: and (@Bet Tn D E F) (@Cong Tn D E E F) *) spliter. (* Goal: and (@Bet Tn D E F) (@Cong Tn D E E F) *) split. (* Goal: @Cong Tn D E E F *) (* Goal: @Bet Tn D E F *) eapply l7_15;eauto. (* Goal: @Cong Tn D E E F *) eapply l7_16;eauto. Qed. End T7_1. Hint Resolve l7_13 : cong. Hint Resolve l7_2 l7_3_2 : midpoint. Ltac Midpoint := auto with midpoint. Section T7_2. Context {Tn:Tarski_neutral_dimensionless}. Context {TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality Tn}. Lemma Mid_cases : forall A B C, Midpoint A B C \/ Midpoint A C B -> Midpoint A B C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : or (@Midpoint Tn A B C) (@Midpoint Tn A C B)), @Midpoint Tn A B C *) intros. (* Goal: @Midpoint Tn A B C *) decompose [or] H; Midpoint. Qed. Lemma Mid_perm : forall A B C, Midpoint A B C -> Midpoint A B C /\ Midpoint A C B. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Midpoint Tn A B C), and (@Midpoint Tn A B C) (@Midpoint Tn A C B) *) unfold Midpoint. (* Goal: forall (A B C : @Tpoint Tn) (_ : and (@Bet Tn B A C) (@Cong Tn B A A C)), and (and (@Bet Tn B A C) (@Cong Tn B A A C)) (and (@Bet Tn C A B) (@Cong Tn C A A B)) *) intros. (* Goal: and (and (@Bet Tn B A C) (@Cong Tn B A A C)) (and (@Bet Tn C A B) (@Cong Tn C A A B)) *) spliter. (* Goal: and (and (@Bet Tn B A C) (@Cong Tn B A A C)) (and (@Bet Tn C A B) (@Cong Tn C A A B)) *) repeat split; Between; Cong. Qed. Lemma l7_17 : forall P P' A B, Midpoint A P P' -> Midpoint B P P' -> A=B. Proof. (* Goal: forall (P P' A B : @Tpoint Tn) (_ : @Midpoint Tn A P P') (_ : @Midpoint Tn B P P'), @eq (@Tpoint Tn) A B *) intros. (* Goal: @eq (@Tpoint Tn) A B *) assert (Cong P B P' B). (* Goal: @eq (@Tpoint Tn) A B *) (* Goal: @Cong Tn P B P' B *) unfold Midpoint in *. (* Goal: @eq (@Tpoint Tn) A B *) (* Goal: @Cong Tn P B P' B *) spliter. (* Goal: @eq (@Tpoint Tn) A B *) (* Goal: @Cong Tn P B P' B *) Cong. (* Goal: @eq (@Tpoint Tn) A B *) assert (exists B', Midpoint A B B') by (apply symmetric_point_construction). (* Goal: @eq (@Tpoint Tn) A B *) induction H2. (* Goal: @eq (@Tpoint Tn) A B *) assert (Cong P' B P x) by eauto with midpoint cong. (* Goal: @eq (@Tpoint Tn) A B *) assert (Cong P B P x) by (apply cong_transitivity with P' B; Cong). (* Goal: @eq (@Tpoint Tn) A B *) assert (Cong P B P' x) by eauto with midpoint cong. (* Goal: @eq (@Tpoint Tn) A B *) assert (Cong P' B P' x) by (apply cong_transitivity with P x; Cong; apply cong_transitivity with P B; Cong). (* Goal: @eq (@Tpoint Tn) A B *) assert (Bet P B P') by (unfold Midpoint in *;spliter;assumption). (* Goal: @eq (@Tpoint Tn) A B *) assert (B=x) by (apply (l4_19 P P' B x);Between). (* Goal: @eq (@Tpoint Tn) A B *) subst x. (* Goal: @eq (@Tpoint Tn) A B *) apply l7_3. (* Goal: @Midpoint Tn A B B *) assumption. Qed. Lemma l7_17_bis : forall P P' A B, Midpoint A P P' -> Midpoint B P' P -> A=B. Proof. (* Goal: forall (P P' A B : @Tpoint Tn) (_ : @Midpoint Tn A P P') (_ : @Midpoint Tn B P' P), @eq (@Tpoint Tn) A B *) intros. (* Goal: @eq (@Tpoint Tn) A B *) apply l7_17 with P P'; Midpoint. Qed. Lemma l7_20 : forall M A B, Col A M B -> Cong M A M B -> A=B \/ Midpoint M A B. Proof. (* Goal: forall (M A B : @Tpoint Tn) (_ : @Col Tn A M B) (_ : @Cong Tn M A M B), or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) unfold Col. (* Goal: forall (M A B : @Tpoint Tn) (_ : or (@Bet Tn A M B) (or (@Bet Tn M B A) (@Bet Tn B A M))) (_ : @Cong Tn M A M B), or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) intros. (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) induction H. (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) right. (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) (* Goal: @Midpoint Tn M A B *) unfold Midpoint. (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) (* Goal: and (@Bet Tn A M B) (@Cong Tn A M M B) *) split. (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) (* Goal: @Cong Tn A M M B *) (* Goal: @Bet Tn A M B *) assumption. (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) (* Goal: @Cong Tn A M M B *) Cong. (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) induction H. (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) assert (Cong A B B B) by (apply (l4_3 A B M B B M);Between;Cong). (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) treat_equalities;auto. (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) assert (Cong B A A A) by (apply (l4_3 B A M A A M);Cong;Between). (* Goal: or (@eq (@Tpoint Tn) A B) (@Midpoint Tn M A B) *) treat_equalities;auto. Qed. Lemma l7_20_bis : forall M A B, A<>B -> Col A M B -> Cong M A M B -> Midpoint M A B. Proof. (* Goal: forall (M A B : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Col Tn A M B) (_ : @Cong Tn M A M B), @Midpoint Tn M A B *) intros. (* Goal: @Midpoint Tn M A B *) induction (l7_20 M A B H0 H1);intuition. Qed. Lemma cong_col_mid : forall A B C, A <> C -> Col A B C -> Cong A B B C -> Midpoint B A C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A C)) (_ : @Col Tn A B C) (_ : @Cong Tn A B B C), @Midpoint Tn B A C *) intros. (* Goal: @Midpoint Tn B A C *) apply l7_20 in H0. (* Goal: @Cong Tn B A B C *) (* Goal: @Midpoint Tn B A C *) intuition subst. (* Goal: @Cong Tn B A B C *) Cong. Qed. Lemma l7_21 : forall A B C D P, ~ Col A B C -> B<>D -> Cong A B C D -> Cong B C D A -> Col A P C -> Col B P D -> Midpoint P A C /\ Midpoint P B D. Proof. (* Goal: forall (A B C D P : @Tpoint Tn) (_ : not (@Col Tn A B C)) (_ : not (@eq (@Tpoint Tn) B D)) (_ : @Cong Tn A B C D) (_ : @Cong Tn B C D A) (_ : @Col Tn A P C) (_ : @Col Tn B P D), and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) intros. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) assert_diffs. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) assert (exists P', Cong_3 B D P D B P'). (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Cong_3 Tn B D P D B P') *) eapply l4_14. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: @Cong Tn B D D B *) (* Goal: @Col Tn B D P *) Col. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: @Cong Tn B D D B *) Cong. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) induction H9. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) assert (Col D B x) by (apply l4_13 with B D P;Col). (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) assert (FSC B D P A D B x C). (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: @FSC Tn B D P A D B x C *) unfold FSC. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: and (@Col Tn B D P) (and (@Cong_3 Tn B D P D B x) (and (@Cong Tn B A D C) (@Cong Tn D A B C))) *) unfold Cong_3 in *. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: and (@Col Tn B D P) (and (and (@Cong Tn B D D B) (and (@Cong Tn B P D x) (@Cong Tn D P B x))) (and (@Cong Tn B A D C) (@Cong Tn D A B C))) *) spliter. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: and (@Col Tn B D P) (and (and (@Cong Tn B D D B) (and (@Cong Tn B P D x) (@Cong Tn D P B x))) (and (@Cong Tn B A D C) (@Cong Tn D A B C))) *) repeat split; Cong; Col. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) assert (FSC B D P C D B x A). (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: @FSC Tn B D P C D B x A *) unfold FSC. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: and (@Col Tn B D P) (and (@Cong_3 Tn B D P D B x) (and (@Cong Tn B C D A) (@Cong Tn D C B A))) *) unfold Cong_3 in *. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: and (@Col Tn B D P) (and (and (@Cong Tn B D D B) (and (@Cong Tn B P D x) (@Cong Tn D P B x))) (and (@Cong Tn B C D A) (@Cong Tn D C B A))) *) spliter. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: and (@Col Tn B D P) (and (and (@Cong Tn B D D B) (and (@Cong Tn B P D x) (@Cong Tn D P B x))) (and (@Cong Tn B C D A) (@Cong Tn D C B A))) *) repeat split; Col; Cong. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) assert (Cong P A x C) by (eauto using l4_16). (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) assert (Cong P C x A) by (eauto using l4_16). (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) assert (Cong_3 A P C C x A) by (unfold Cong_3;repeat split; Cong). (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) assert (Col C x A) by (eauto using l4_13). (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) assert (P=x). (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: @eq (@Tpoint Tn) P x *) unfold FSC in *. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: @eq (@Tpoint Tn) P x *) spliter. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) (* Goal: @eq (@Tpoint Tn) P x *) apply (l6_21 A C B D); Col. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) subst x. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) unfold Cong_3 in *;spliter. (* Goal: and (@Midpoint Tn P A C) (@Midpoint Tn P B D) *) split;apply l7_20_bis;Col;Cong. Qed. Lemma l7_22_aux : forall A1 A2 B1 B2 C M1 M2, Bet A1 C A2 -> Bet B1 C B2 -> Cong C A1 C B1 -> Cong C A2 C B2 -> Midpoint M1 A1 B1 -> Midpoint M2 A2 B2 -> Le C A1 C A2 -> Bet M1 C M2. Lemma l7_22 : forall A1 A2 B1 B2 C M1 M2, Bet A1 C A2 -> Bet B1 C B2 -> Cong C A1 C B1 -> Cong C A2 C B2 -> Midpoint M1 A1 B1 -> Midpoint M2 A2 B2 -> Bet M1 C M2. Lemma bet_col1 : forall A B C D, Bet A B D -> Bet A C D -> Col A B C. Lemma l7_25 : forall A B C, Cong C A C B -> exists X, Midpoint X A B. Lemma midpoint_distinct_1 : forall I A B, A<>B -> Midpoint I A B -> I<>A /\ I<>B. Proof. (* Goal: forall (I A B : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Midpoint Tn I A B), and (not (@eq (@Tpoint Tn) I A)) (not (@eq (@Tpoint Tn) I B)) *) intros. (* Goal: and (not (@eq (@Tpoint Tn) I A)) (not (@eq (@Tpoint Tn) I B)) *) split. (* Goal: not (@eq (@Tpoint Tn) I B) *) (* Goal: not (@eq (@Tpoint Tn) I A) *) intro. (* Goal: not (@eq (@Tpoint Tn) I B) *) (* Goal: False *) subst. (* Goal: not (@eq (@Tpoint Tn) I B) *) (* Goal: False *) unfold Midpoint in *. (* Goal: not (@eq (@Tpoint Tn) I B) *) (* Goal: False *) decompose [and] H0. (* Goal: not (@eq (@Tpoint Tn) I B) *) (* Goal: False *) treat_equalities. (* Goal: not (@eq (@Tpoint Tn) I B) *) (* Goal: False *) intuition. (* Goal: not (@eq (@Tpoint Tn) I B) *) intro;subst. (* Goal: False *) unfold Midpoint in *. (* Goal: False *) decompose [and] H0. (* Goal: False *) treat_equalities. (* Goal: False *) intuition. Qed. Lemma midpoint_distinct_2 : forall I A B, I<>A -> Midpoint I A B -> A<>B /\ I<>B. Proof. (* Goal: forall (I A B : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) I A)) (_ : @Midpoint Tn I A B), and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I B)) *) intros. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I B)) *) assert (A<>B). (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I B)) *) (* Goal: not (@eq (@Tpoint Tn) A B) *) intro. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I B)) *) (* Goal: False *) unfold Midpoint in *;spliter. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I B)) *) (* Goal: False *) treat_equalities. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I B)) *) (* Goal: False *) intuition. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I B)) *) split. (* Goal: not (@eq (@Tpoint Tn) I B) *) (* Goal: not (@eq (@Tpoint Tn) A B) *) assumption. (* Goal: not (@eq (@Tpoint Tn) I B) *) apply midpoint_distinct_1 in H0. (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: not (@eq (@Tpoint Tn) I B) *) intuition. (* Goal: not (@eq (@Tpoint Tn) A B) *) intuition. Qed. Lemma midpoint_distinct_3 : forall I A B, I<>B -> Midpoint I A B -> A<>B /\ I<>A. Proof. (* Goal: forall (I A B : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) I B)) (_ : @Midpoint Tn I A B), and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I A)) *) intros. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I A)) *) assert (A<>B). (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I A)) *) (* Goal: not (@eq (@Tpoint Tn) A B) *) intro. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I A)) *) (* Goal: False *) unfold Midpoint in *;spliter. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I A)) *) (* Goal: False *) treat_equalities. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I A)) *) (* Goal: False *) intuition. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) I A)) *) split. (* Goal: not (@eq (@Tpoint Tn) I A) *) (* Goal: not (@eq (@Tpoint Tn) A B) *) assumption. (* Goal: not (@eq (@Tpoint Tn) I A) *) apply midpoint_distinct_1 in H0. (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: not (@eq (@Tpoint Tn) I A) *) intuition. (* Goal: not (@eq (@Tpoint Tn) A B) *) intuition. Qed. Lemma midpoint_def : forall A B C, Bet A B C -> Cong A B B C -> Midpoint B A C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Cong Tn A B B C), @Midpoint Tn B A C *) intros. (* Goal: @Midpoint Tn B A C *) unfold Midpoint. (* Goal: and (@Bet Tn A B C) (@Cong Tn A B B C) *) split;assumption. Qed. Lemma midpoint_bet : forall A B C, Midpoint B A C -> Bet A B C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Midpoint Tn B A C), @Bet Tn A B C *) unfold Midpoint. (* Goal: forall (A B C : @Tpoint Tn) (_ : and (@Bet Tn A B C) (@Cong Tn A B B C)), @Bet Tn A B C *) intros. (* Goal: @Bet Tn A B C *) elim H. (* Goal: forall (_ : @Bet Tn A B C) (_ : @Cong Tn A B B C), @Bet Tn A B C *) intros. (* Goal: @Bet Tn A B C *) assumption. Qed. Lemma midpoint_col : forall A M B, Midpoint M A B -> Col M A B. Proof. (* Goal: forall (A M B : @Tpoint Tn) (_ : @Midpoint Tn M A B), @Col Tn M A B *) intros. (* Goal: @Col Tn M A B *) unfold Col. (* Goal: or (@Bet Tn M A B) (or (@Bet Tn A B M) (@Bet Tn B M A)) *) right;right. (* Goal: @Bet Tn B M A *) apply midpoint_bet. (* Goal: @Midpoint Tn M B A *) apply l7_2. (* Goal: @Midpoint Tn M A B *) assumption. Qed. Lemma midpoint_cong : forall A B C, Midpoint B A C -> Cong A B B C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Midpoint Tn B A C), @Cong Tn A B B C *) unfold Midpoint. (* Goal: forall (A B C : @Tpoint Tn) (_ : and (@Bet Tn A B C) (@Cong Tn A B B C)), @Cong Tn A B B C *) intros. (* Goal: @Cong Tn A B B C *) elim H. (* Goal: forall (_ : @Bet Tn A B C) (_ : @Cong Tn A B B C), @Cong Tn A B B C *) intros. (* Goal: @Cong Tn A B B C *) assumption. Qed. Lemma midpoint_not_midpoint : forall I A B, A<>B -> Midpoint I A B -> ~ Midpoint B A I. Lemma swap_diff : forall (A B : Tpoint), A<>B -> B<>A. Proof. (* Goal: forall (A B : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)), not (@eq (@Tpoint Tn) B A) *) intuition. Qed. Lemma cong_cong_half_1 : forall A M B A' M' B', Midpoint M A B -> Midpoint M' A' B' -> Cong A B A' B' -> Cong A M A' M'. Lemma cong_cong_half_2 : forall A M B A' M' B', Midpoint M A B -> Midpoint M' A' B' -> Cong A B A' B' -> Cong B M B' M'. Proof. (* Goal: forall (A M B A' M' B' : @Tpoint Tn) (_ : @Midpoint Tn M A B) (_ : @Midpoint Tn M' A' B') (_ : @Cong Tn A B A' B'), @Cong Tn B M B' M' *) intros. (* Goal: @Cong Tn B M B' M' *) apply cong_cong_half_1 with A A'. (* Goal: @Cong Tn B A B' A' *) (* Goal: @Midpoint Tn M' B' A' *) (* Goal: @Midpoint Tn M B A *) Midpoint. (* Goal: @Cong Tn B A B' A' *) (* Goal: @Midpoint Tn M' B' A' *) Midpoint. (* Goal: @Cong Tn B A B' A' *) Cong. Qed. Lemma cong_mid2__cong : forall A M B A' M' B', Midpoint M A B -> Midpoint M' A' B' -> Cong A M A' M' -> Cong A B A' B'. Proof. (* Goal: forall (A M B A' M' B' : @Tpoint Tn) (_ : @Midpoint Tn M A B) (_ : @Midpoint Tn M' A' B') (_ : @Cong Tn A M A' M'), @Cong Tn A B A' B' *) intros A M B A' M' B' HM HM' HCong. (* Goal: @Cong Tn A B A' B' *) destruct HM. (* Goal: @Cong Tn A B A' B' *) destruct HM'. (* Goal: @Cong Tn A B A' B' *) apply (l2_11 _ M _ _ M'); auto. (* Goal: @Cong Tn M B M' B' *) apply (cong_transitivity _ _ A' M'); auto. (* Goal: @Cong Tn M B A' M' *) apply (cong_transitivity _ _ A M); Cong. Qed. Lemma mid__lt : forall A M B, A <> B -> Midpoint M A B -> Lt A M A B. Proof. (* Goal: forall (A M B : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Midpoint Tn M A B), @Lt Tn A M A B *) intros A M B HAB HM. (* Goal: @Lt Tn A M A B *) destruct (midpoint_distinct_1 M A B HAB HM) as [HMA HMB]. (* Goal: @Lt Tn A M A B *) destruct HM. (* Goal: @Lt Tn A M A B *) split. (* Goal: not (@Cong Tn A M A B) *) (* Goal: @Le Tn A M A B *) exists M; Cong. (* Goal: not (@Cong Tn A M A B) *) intro. (* Goal: False *) apply HMB, between_cong with A; auto. Qed. Lemma le_mid2__le13 : forall A M B A' M' B', Midpoint M A B -> Midpoint M' A' B' -> Le A M A' M' -> Le A B A' B'. Proof. (* Goal: forall (A M B A' M' B' : @Tpoint Tn) (_ : @Midpoint Tn M A B) (_ : @Midpoint Tn M' A' B') (_ : @Le Tn A M A' M'), @Le Tn A B A' B' *) intros A M B A' M' B' HM HM' Hle. (* Goal: @Le Tn A B A' B' *) destruct HM. (* Goal: @Le Tn A B A' B' *) destruct HM'. (* Goal: @Le Tn A B A' B' *) apply (bet2_le2__le1346 _ M _ _ M'); auto. (* Goal: @Le Tn M B M' B' *) apply (l5_6 A M A' M'); auto. Qed. Lemma le_mid2__le12 : forall A M B A' M' B', Midpoint M A B -> Midpoint M' A' B' -> Le A B A' B' -> Le A M A' M'. Proof. (* Goal: forall (A M B A' M' B' : @Tpoint Tn) (_ : @Midpoint Tn M A B) (_ : @Midpoint Tn M' A' B') (_ : @Le Tn A B A' B'), @Le Tn A M A' M' *) intros A M B A' M' B' HM HM' Hle. (* Goal: @Le Tn A M A' M' *) elim(le_cases A M A' M'); auto. (* Goal: forall _ : @Le Tn A' M' A M, @Le Tn A M A' M' *) intro. (* Goal: @Le Tn A M A' M' *) assert(Le A' B' A B) by (apply (le_mid2__le13 _ M' _ _ M); auto). (* Goal: @Le Tn A M A' M' *) apply cong__le. (* Goal: @Cong Tn A M A' M' *) apply (cong_cong_half_1 _ _ B _ _ B'); auto. (* Goal: @Cong Tn A B A' B' *) apply le_anti_symmetry; auto. Qed. Lemma lt_mid2__lt13 : forall A M B A' M' B', Midpoint M A B -> Midpoint M' A' B' -> Lt A M A' M' -> Lt A B A' B'. Proof. (* Goal: forall (A M B A' M' B' : @Tpoint Tn) (_ : @Midpoint Tn M A B) (_ : @Midpoint Tn M' A' B') (_ : @Lt Tn A M A' M'), @Lt Tn A B A' B' *) intros A M B A' M' B' HM HM' [HLe HNcong]. (* Goal: @Lt Tn A B A' B' *) split. (* Goal: not (@Cong Tn A B A' B') *) (* Goal: @Le Tn A B A' B' *) apply le_mid2__le13 with M M'; trivial. (* Goal: not (@Cong Tn A B A' B') *) intro. (* Goal: False *) apply HNcong, cong_cong_half_1 with B B'; trivial. Qed. Lemma lt_mid2__lt12 : forall A M B A' M' B', Midpoint M A B -> Midpoint M' A' B' -> Lt A B A' B' -> Lt A M A' M'. Proof. (* Goal: forall (A M B A' M' B' : @Tpoint Tn) (_ : @Midpoint Tn M A B) (_ : @Midpoint Tn M' A' B') (_ : @Lt Tn A B A' B'), @Lt Tn A M A' M' *) intros A M B A' M' B' HM HM' [HLe HNcong]. (* Goal: @Lt Tn A M A' M' *) split. (* Goal: not (@Cong Tn A M A' M') *) (* Goal: @Le Tn A M A' M' *) apply le_mid2__le12 with B B'; trivial. (* Goal: not (@Cong Tn A M A' M') *) intro. (* Goal: False *) apply HNcong, cong_mid2__cong with M M'; trivial. Qed. Lemma midpoint_preserves_out : forall A B C A' B' C' M, Out A B C -> Midpoint M A A' -> Midpoint M B B' -> Midpoint M C C' -> Out A' B' C'. Lemma col_cong_bet : forall A B C D, Col A B D -> Cong A B C D -> Bet A C B -> Bet C A D \/ Bet C B D. Lemma col_cong2_bet1 : forall A B C D, Col A B D -> Bet A C B -> Cong A B C D -> Cong A C B D -> Bet C B D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Col Tn A B D) (_ : @Bet Tn A C B) (_ : @Cong Tn A B C D) (_ : @Cong Tn A C B D), @Bet Tn C B D *) intros. (* Goal: @Bet Tn C B D *) induction(eq_dec_points A C). (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn C B D *) subst C. (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn A B D *) apply cong_symmetry in H2. (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn A B D *) apply cong_identity in H2. (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn A B D *) subst D. (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn A B B *) Between. (* Goal: @Bet Tn C B D *) assert(HH:=col_cong_bet A B C D H H1 H0). (* Goal: @Bet Tn C B D *) induction HH. (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn C B D *) assert(A = D /\ B = C). (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn C B D *) (* Goal: and (@eq (@Tpoint Tn) A D) (@eq (@Tpoint Tn) B C) *) eapply bet_cong_eq. (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn C B D *) (* Goal: @Cong Tn C A B D *) (* Goal: @Bet Tn B A D *) (* Goal: @Bet Tn B C A *) Between. (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn C B D *) (* Goal: @Cong Tn C A B D *) (* Goal: @Bet Tn B A D *) eBetween. (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn C B D *) (* Goal: @Cong Tn C A B D *) Cong. (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn C B D *) spliter. (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn C B D *) subst D. (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn C B A *) subst C. (* Goal: @Bet Tn C B D *) (* Goal: @Bet Tn B B A *) Between. (* Goal: @Bet Tn C B D *) assumption. Qed. Lemma col_cong2_bet2 : forall A B C D, Col A B D -> Bet A C B -> Cong A B C D -> Cong A D B C -> Bet C A D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Col Tn A B D) (_ : @Bet Tn A C B) (_ : @Cong Tn A B C D) (_ : @Cong Tn A D B C), @Bet Tn C A D *) intros. (* Goal: @Bet Tn C A D *) induction(eq_dec_points B C). (* Goal: @Bet Tn C A D *) (* Goal: @Bet Tn C A D *) subst C. (* Goal: @Bet Tn C A D *) (* Goal: @Bet Tn B A D *) apply cong_identity in H2. (* Goal: @Bet Tn C A D *) (* Goal: @Bet Tn B A D *) subst D. (* Goal: @Bet Tn C A D *) (* Goal: @Bet Tn B A A *) Between. (* Goal: @Bet Tn C A D *) assert(HH:=col_cong_bet A B C D H H1 H0). (* Goal: @Bet Tn C A D *) induction HH. (* Goal: @Bet Tn C A D *) (* Goal: @Bet Tn C A D *) assumption. (* Goal: @Bet Tn C A D *) assert(C = A /\ D = B). (* Goal: @Bet Tn C A D *) (* Goal: and (@eq (@Tpoint Tn) C A) (@eq (@Tpoint Tn) D B) *) eapply bet_cong_eq. (* Goal: @Bet Tn C A D *) (* Goal: @Cong Tn B C D A *) (* Goal: @Bet Tn D C A *) (* Goal: @Bet Tn D B C *) Between. (* Goal: @Bet Tn C A D *) (* Goal: @Cong Tn B C D A *) (* Goal: @Bet Tn D C A *) eBetween. (* Goal: @Bet Tn C A D *) (* Goal: @Cong Tn B C D A *) Cong. (* Goal: @Bet Tn C A D *) spliter. (* Goal: @Bet Tn C A D *) subst D. (* Goal: @Bet Tn C A B *) subst C. (* Goal: @Bet Tn A A B *) Between. Qed. Lemma col_cong2_bet3 : forall A B C D, Col A B D -> Bet A B C -> Cong A B C D -> Cong A C B D -> Bet B C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Col Tn A B D) (_ : @Bet Tn A B C) (_ : @Cong Tn A B C D) (_ : @Cong Tn A C B D), @Bet Tn B C D *) intros. (* Goal: @Bet Tn B C D *) induction(eq_dec_points A B). (* Goal: @Bet Tn B C D *) (* Goal: @Bet Tn B C D *) subst B. (* Goal: @Bet Tn B C D *) (* Goal: @Bet Tn A C D *) apply cong_symmetry in H1. (* Goal: @Bet Tn B C D *) (* Goal: @Bet Tn A C D *) apply cong_identity in H1. (* Goal: @Bet Tn B C D *) (* Goal: @Bet Tn A C D *) subst D. (* Goal: @Bet Tn B C D *) (* Goal: @Bet Tn A C C *) Between. (* Goal: @Bet Tn B C D *) eapply (col_cong2_bet2 _ A). (* Goal: @Cong Tn C D A B *) (* Goal: @Cong Tn C A B D *) (* Goal: @Bet Tn C B A *) (* Goal: @Col Tn C A D *) apply bet_col in H0. (* Goal: @Cong Tn C D A B *) (* Goal: @Cong Tn C A B D *) (* Goal: @Bet Tn C B A *) (* Goal: @Col Tn C A D *) ColR. (* Goal: @Cong Tn C D A B *) (* Goal: @Cong Tn C A B D *) (* Goal: @Bet Tn C B A *) Between. (* Goal: @Cong Tn C D A B *) (* Goal: @Cong Tn C A B D *) Cong. (* Goal: @Cong Tn C D A B *) Cong. Qed. Lemma col_cong2_bet4 : forall A B C D, Col A B C -> Bet A B D -> Cong A B C D -> Cong A D B C -> Bet B D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Col Tn A B C) (_ : @Bet Tn A B D) (_ : @Cong Tn A B C D) (_ : @Cong Tn A D B C), @Bet Tn B D C *) intros. (* Goal: @Bet Tn B D C *) induction(eq_dec_points A B). (* Goal: @Bet Tn B D C *) (* Goal: @Bet Tn B D C *) subst B. (* Goal: @Bet Tn B D C *) (* Goal: @Bet Tn A D C *) apply cong_symmetry in H1. (* Goal: @Bet Tn B D C *) (* Goal: @Bet Tn A D C *) apply cong_identity in H1. (* Goal: @Bet Tn B D C *) (* Goal: @Bet Tn A D C *) subst D. (* Goal: @Bet Tn B D C *) (* Goal: @Bet Tn A C C *) Between. (* Goal: @Bet Tn B D C *) apply (col_cong2_bet1 A D B C). (* Goal: @Cong Tn A B D C *) (* Goal: @Cong Tn A D B C *) (* Goal: @Bet Tn A B D *) (* Goal: @Col Tn A D C *) apply bet_col in H0. (* Goal: @Cong Tn A B D C *) (* Goal: @Cong Tn A D B C *) (* Goal: @Bet Tn A B D *) (* Goal: @Col Tn A D C *) ColR. (* Goal: @Cong Tn A B D C *) (* Goal: @Cong Tn A D B C *) (* Goal: @Bet Tn A B D *) assumption. (* Goal: @Cong Tn A B D C *) (* Goal: @Cong Tn A D B C *) Cong. (* Goal: @Cong Tn A B D C *) Cong. Qed. Lemma col_bet2_cong1 : forall A B C D, Col A B D -> Bet A C B -> Cong A B C D -> Bet C B D -> Cong A C D B. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Col Tn A B D) (_ : @Bet Tn A C B) (_ : @Cong Tn A B C D) (_ : @Bet Tn C B D), @Cong Tn A C D B *) intros. (* Goal: @Cong Tn A C D B *) apply (l4_3 A C B D B C); Between; Cong. Qed. Lemma col_bet2_cong2 : forall A B C D, Col A B D -> Bet A C B -> Cong A B C D -> Bet C A D -> Cong D A B C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Col Tn A B D) (_ : @Bet Tn A C B) (_ : @Cong Tn A B C D) (_ : @Bet Tn C A D), @Cong Tn D A B C *) intros. (* Goal: @Cong Tn D A B C *) apply (l4_3 D A C B C A); Between; Cong. Qed. Lemma bet2_lt2__lt : forall O o A B a b : Tpoint, Bet a o b -> Bet A O B -> Lt o a O A -> Lt o b O B -> Lt a b A B. Lemma bet2_lt_le__lt : forall O o A B a b : Tpoint, Bet a o b -> Bet A O B -> Cong o a O A -> Lt o b O B -> Lt a b A B. End T7_2. Hint Resolve midpoint_bet : between. Hint Resolve midpoint_col : col. Hint Resolve midpoint_cong : cong.
Require Import Bool Arith List. Require Import BellantoniCook.Lib BellantoniCook.Bitstring BellantoniCook.MultiPoly. Inductive BC : Set := | zero : BC | proj : nat -> nat -> nat -> BC | succ : bool -> BC | pred : BC | cond : BC | rec : BC -> BC -> BC -> BC | comp : nat -> nat -> BC -> list BC -> list BC -> BC. Lemma BC_ind2' : forall P : BC -> Prop, forall Q : list BC -> Prop, Q nil -> (forall e l, P e -> Q l -> Q (e :: l)) -> P zero -> (forall n s i, P (proj n s i)) -> (forall b, P (succ b)) -> P pred -> P cond -> (forall g h0 h1, P g -> P h0 -> P h1 -> P (rec g h0 h1)) -> (forall n s h rl tl, P h -> Q rl -> Q tl -> P (comp n s h rl tl)) -> forall e, P e. Proof. (* Goal: forall (P : forall _ : BC, Prop) (Q : forall _ : list BC, Prop) (_ : Q (@nil BC)) (_ : forall (e : BC) (l : list BC) (_ : P e) (_ : Q l), Q (@cons BC e l)) (_ : P zero) (_ : forall n s i : nat, P (proj n s i)) (_ : forall b : bool, P (succ b)) (_ : P pred) (_ : P cond) (_ : forall (g h0 h1 : BC) (_ : P g) (_ : P h0) (_ : P h1), P (rec g h0 h1)) (_ : forall (n s : nat) (h : BC) (rl tl : list BC) (_ : P h) (_ : Q rl) (_ : Q tl), P (comp n s h rl tl)) (e : BC), P e *) fix BC_ind2' 12; intros. (* Goal: P e *) destruct e; auto. (* Goal: P (comp n n0 e l l0) *) (* Goal: P (rec e1 e2 e3) *) apply H6; eapply BC_ind2'; eauto. (* Goal: P (comp n n0 e l l0) *) apply H7. (* Goal: Q l0 *) (* Goal: Q l *) (* Goal: P e *) eapply BC_ind2'; eauto. (* Goal: Q l0 *) (* Goal: Q l *) revert l. (* Goal: Q l0 *) (* Goal: forall l : list BC, Q l *) fix BC_ind2'0 1. (* Goal: Q l0 *) (* Goal: forall l : list BC, Q l *) intro. (* Goal: Q l0 *) (* Goal: Q l *) destruct l. (* Goal: Q l0 *) (* Goal: Q (@cons BC b l) *) (* Goal: Q (@nil BC) *) auto. (* Goal: Q l0 *) (* Goal: Q (@cons BC b l) *) apply H0. (* Goal: Q l0 *) (* Goal: Q l *) (* Goal: P b *) eapply BC_ind2'; eauto. (* Goal: Q l0 *) (* Goal: Q l *) apply BC_ind2'0. (* Goal: Q l0 *) revert l0. (* Goal: forall l0 : list BC, Q l0 *) fix BC_ind2'0 1. (* Goal: forall l0 : list BC, Q l0 *) intro. (* Goal: Q l0 *) destruct l0. (* Goal: Q (@cons BC b l0) *) (* Goal: Q (@nil BC) *) auto. (* Goal: Q (@cons BC b l0) *) apply H0. (* Goal: Q l0 *) (* Goal: P b *) eapply BC_ind2'; eauto. (* Goal: Q l0 *) apply BC_ind2'0. Qed. Lemma BC_ind2 : forall P : BC -> Prop, P zero -> (forall n s i, P (proj n s i)) -> (forall b, P (succ b)) -> P pred -> P cond -> (forall g h0 h1, P g -> P h0 -> P h1 -> P (rec g h0 h1)) -> (forall n s h rl tl, P h -> (forall r, In r rl -> P r) -> (forall s, In s tl -> P s) -> P (comp n s h rl tl)) -> forall e, P e. Proof. (* Goal: forall (P : forall _ : BC, Prop) (_ : P zero) (_ : forall n s i : nat, P (proj n s i)) (_ : forall b : bool, P (succ b)) (_ : P pred) (_ : P cond) (_ : forall (g h0 h1 : BC) (_ : P g) (_ : P h0) (_ : P h1), P (rec g h0 h1)) (_ : forall (n s : nat) (h : BC) (rl tl : list BC) (_ : P h) (_ : forall (r : BC) (_ : @In BC r rl), P r) (_ : forall (s0 : BC) (_ : @In BC s0 tl), P s0), P (comp n s h rl tl)) (e : BC), P e *) intros; apply BC_ind2' with (Q := fun l => forall e, In e l -> P e); intros; auto; simpl in *. (* Goal: P e1 *) (* Goal: P e0 *) tauto. (* Goal: P e1 *) destruct H8. (* Goal: P e1 *) (* Goal: P e1 *) subst; auto. (* Goal: P e1 *) auto. Qed. Inductive Arities : Set := | error_rec : Arities -> Arities -> Arities -> Arities | error_comp : Arities -> list Arities -> list Arities -> Arities | error_proj : nat -> nat -> nat -> Arities | ok_arities : nat -> nat -> Arities. Definition aeq (x y:Arities) : bool := match x, y with | ok_arities xn xs, ok_arities yn ys => beq_nat xn yn && beq_nat xs ys | _, _ => false end. Lemma aeq_eq (x y : Arities) : aeq x y = true -> x = y. Proof. (* Goal: forall _ : @eq bool (aeq x y) true, @eq Arities x y *) destruct x; destruct y; simpl; intros; try discriminate. (* Goal: @eq Arities (ok_arities n n0) (ok_arities n1 n2) *) apply andb_true_iff in H; destruct H. (* Goal: @eq Arities (ok_arities n n0) (ok_arities n1 n2) *) apply beq_nat_true in H. (* Goal: @eq Arities (ok_arities n n0) (ok_arities n1 n2) *) apply beq_nat_true in H0. (* Goal: @eq Arities (ok_arities n n0) (ok_arities n1 n2) *) subst; trivial. Qed. Lemma aeq_eq_conv xn yn xs ys : aeq (ok_arities xn xs) (ok_arities yn ys) = false -> xn <> yn \/ xs <> ys. Proof. (* Goal: forall _ : @eq bool (aeq (ok_arities xn xs) (ok_arities yn ys)) false, or (not (@eq nat xn yn)) (not (@eq nat xs ys)) *) simpl; intros. (* Goal: or (not (@eq nat xn yn)) (not (@eq nat xs ys)) *) apply andb_false_elim in H. (* Goal: or (not (@eq nat xn yn)) (not (@eq nat xs ys)) *) destruct H as [H | H]; apply beq_nat_false in H; tauto. Qed. Fixpoint arities (e:BC) : Arities := match e with | zero => ok_arities 0 0 | proj n s i => if leb (S i) (n + s) then ok_arities n s else error_proj n s i | succ _ => ok_arities 0 1 | pred => ok_arities 0 1 | cond => ok_arities 0 4 | rec g h0 h1 => match arities g, arities h0, arities h1 with | ok_arities gn gs, ok_arities h0n h0s, ok_arities h1n h1s => if beq_nat (S gn) h0n && beq_nat h0n h1n && beq_nat (S gs) h0s && beq_nat h0s h1s then ok_arities h0n gs else error_rec (ok_arities gn gs) (ok_arities h0n h0s) (ok_arities h1n h1s) | e1, e2, e3 => error_rec e1 e2 e3 end | comp n s h nl sl => match arities h, map arities nl, map arities sl with | ok_arities hn hs, anl, asl => if beq_nat hn (length nl) && beq_nat hs (length sl) && forallb (fun ne => aeq (arities ne) (ok_arities n 0)) nl && forallb (fun se => aeq (arities se) (ok_arities n s)) sl then ok_arities n s else error_comp (ok_arities hn hs) anl asl | e , anl, asl => error_comp e anl asl end end. Definition arities2 e := match arities e with | ok_arities n s => (n, s) | _ => (0, 0) end. Lemma proj_arities : forall n s i, i < n+s -> arities (proj n s i) = ok_arities n s. Proof. (* Goal: forall (n s i : nat) (_ : lt i (Init.Nat.add n s)), @eq Arities (arities (proj n s i)) (ok_arities n s) *) intros n s i Hi; simpl. (* Goal: @eq Arities (if match Init.Nat.add n s with | O => false | S m' => Nat.leb i m' end then ok_arities n s else error_proj n s i) (ok_arities n s) *) case_eq (n+s). (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.add n s) (S n0)), @eq Arities (if Nat.leb i n0 then ok_arities n s else error_proj n s i) (ok_arities n s) *) (* Goal: forall _ : @eq nat (Init.Nat.add n s) O, @eq Arities (error_proj n s i) (ok_arities n s) *) intro H; contradict Hi; omega. (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.add n s) (S n0)), @eq Arities (if Nat.leb i n0 then ok_arities n s else error_proj n s i) (ok_arities n s) *) intros ns Hns. (* Goal: @eq Arities (if Nat.leb i ns then ok_arities n s else error_proj n s i) (ok_arities n s) *) case_eq (leb i ns); intros H0. (* Goal: @eq Arities (error_proj n s i) (ok_arities n s) *) (* Goal: @eq Arities (ok_arities n s) (ok_arities n s) *) apply leb_complete in H0; trivial. (* Goal: @eq Arities (error_proj n s i) (ok_arities n s) *) apply leb_complete_conv in H0; contradict Hi; omega. Qed. Lemma comp_arities : forall n s e nel sel, arities e = ok_arities (length nel) (length sel) -> andl (fun ne => arities ne = ok_arities n 0) nel -> andl (fun se => arities se = ok_arities n s) sel -> arities (comp n s e nel sel) = ok_arities n s. Proof. (* Goal: forall (n s : nat) (e : BC) (nel sel : list BC) (_ : @eq Arities (arities e) (ok_arities (@length BC nel) (@length BC sel))) (_ : @andl BC (fun ne : BC => @eq Arities (arities ne) (ok_arities n O)) nel) (_ : @andl BC (fun se : BC => @eq Arities (arities se) (ok_arities n s)) sel), @eq Arities (arities (comp n s e nel sel)) (ok_arities n s) *) intros b s e nel sel He Hnel Hsel; simpl. (* Goal: @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@map BC Arities arities nel) (@map BC Arities arities sel) | error_comp a l l0 => error_comp (error_comp a l l0) (@map BC Arities arities nel) (@map BC Arities arities sel) | error_proj n n0 n1 => error_comp (error_proj n n0 n1) (@map BC Arities arities nel) (@map BC Arities arities sel) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (@length BC nel)) (Nat.eqb hs (@length BC sel))) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel)) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities hn hs) (@map BC Arities arities nel) (@map BC Arities arities sel) end (ok_arities b s) *) rewrite He. (* Goal: @eq Arities (if andb (andb (andb (Nat.eqb (@length BC nel) (@length BC nel)) (Nat.eqb (@length BC sel) (@length BC sel))) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel)) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) rewrite <- !beq_nat_refl. (* Goal: @eq Arities (if andb (andb (andb true true) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel)) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) case_eq (forallb (fun ne : BC => aeq (arities ne) (ok_arities b 0)) nel). (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) false, @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) true, @eq Arities (if andb (andb (andb true true) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) intros _. (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) false, @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) (* Goal: @eq Arities (if andb (andb (andb true true) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) case_eq (forallb (fun se : BC => aeq (arities se) (ok_arities b s)) sel). (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) false, @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) (* Goal: forall _ : @eq bool (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) false, @eq Arities (if andb (andb (andb true true) true) false then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) (* Goal: forall _ : @eq bool (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) true, @eq Arities (if andb (andb (andb true true) true) true then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) intros _; trivial. (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) false, @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) (* Goal: forall _ : @eq bool (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) false, @eq Arities (if andb (andb (andb true true) true) false then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) intro Hsel'. (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) false, @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) (* Goal: @eq Arities (if andb (andb (andb true true) true) false then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) rewrite forallb_forall_conv in Hsel'. (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) false, @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) (* Goal: @eq Arities (if andb (andb (andb true true) true) false then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) destruct Hsel' as [e' [H1 H2] ]. (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) false, @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) (* Goal: @eq Arities (if andb (andb (andb true true) true) false then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) contradict H2. (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) false, @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) (* Goal: not (@eq bool (aeq (arities e') (ok_arities b s)) false) *) rewrite <- forall_andl in Hsel. (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) false, @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) (* Goal: not (@eq bool (aeq (arities e') (ok_arities b s)) false) *) rewrite Hsel; simpl. (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) false, @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) (* Goal: @In BC e' sel *) (* Goal: not (@eq bool (andb (Nat.eqb b b) (Nat.eqb s s)) false) *) do 2 rewrite <- beq_nat_refl. (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) false, @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) (* Goal: @In BC e' sel *) (* Goal: not (@eq bool (andb true true) false) *) simpl; congruence. (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) false, @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) (* Goal: @In BC e' sel *) trivial. (* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities b O)) nel) false, @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) intro Hnel'. (* Goal: @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) rewrite forallb_forall_conv in Hnel'. (* Goal: @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) destruct Hnel' as [e' [H1 H2] ]. (* Goal: @eq Arities (if andb (andb (andb true true) false) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities b s)) sel) then ok_arities b s else error_comp (ok_arities (@length BC nel) (@length BC sel)) (@map BC Arities arities nel) (@map BC Arities arities sel)) (ok_arities b s) *) contradict H2. (* Goal: not (@eq bool (aeq (arities e') (ok_arities b O)) false) *) rewrite <- forall_andl in Hnel. (* Goal: not (@eq bool (aeq (arities e') (ok_arities b O)) false) *) rewrite Hnel. (* Goal: @In BC e' nel *) (* Goal: not (@eq bool (aeq (ok_arities b O) (ok_arities b O)) false) *) simpl. (* Goal: @In BC e' nel *) (* Goal: not (@eq bool (andb (Nat.eqb b b) true) false) *) rewrite <- beq_nat_refl. (* Goal: @In BC e' nel *) (* Goal: not (@eq bool (andb true true) false) *) simpl; congruence. (* Goal: @In BC e' nel *) trivial. Qed. Lemma arities_nth : forall l i e n s, (forall e, In e l -> arities e = ok_arities n s) -> arities e = ok_arities n s -> arities (nth i l e) = ok_arities n s. Proof. (* Goal: forall (l : list BC) (i : nat) (e : BC) (n s : nat) (_ : forall (e0 : BC) (_ : @In BC e0 l), @eq Arities (arities e0) (ok_arities n s)) (_ : @eq Arities (arities e) (ok_arities n s)), @eq Arities (arities (@nth BC i l e)) (ok_arities n s) *) induction l as [ | e1 l IH]; simpl; intros [ | i]; trivial; auto. Qed. Lemma BC_ind_inf' : forall (P : nat -> nat -> BC -> Prop), forall Q : nat -> nat -> list BC -> Prop, (forall n s, Q n s nil) -> (forall e n s l, P n s e -> Q n s l -> Q n s (e :: l)) -> P 0 0 zero -> (forall n s i, i < n + s -> P n s (proj n s i)) -> (forall b, P 0 1 (succ b)) -> P 0 1 pred -> P 0 4 cond -> (forall n s g h0 h1, arities g = ok_arities n s -> arities h0 = ok_arities (S n) (S s) -> arities h1 = ok_arities (S n) (S s) -> P n s g -> P (S n) (S s) h0 -> P (S n) (S s) h1 -> P (S n) s (rec g h0 h1)) -> (forall n s h rl tl, arities h = ok_arities (length rl) (length tl) -> (forall e, In e rl -> arities e = ok_arities n 0) -> (forall e, In e tl -> arities e = ok_arities n s) -> P (length rl) (length tl) h -> Q n 0 rl -> Q n s tl -> P n s (comp n s h rl tl)) -> forall e n s , arities e = ok_arities n s -> P n s e. Proof. (* Goal: forall (P : forall (_ : nat) (_ : nat) (_ : BC), Prop) (Q : forall (_ : nat) (_ : nat) (_ : list BC), Prop) (_ : forall n s : nat, Q n s (@nil BC)) (_ : forall (e : BC) (n s : nat) (l : list BC) (_ : P n s e) (_ : Q n s l), Q n s (@cons BC e l)) (_ : P O O zero) (_ : forall (n s i : nat) (_ : lt i (Init.Nat.add n s)), P n s (proj n s i)) (_ : forall b : bool, P O (S O) (succ b)) (_ : P O (S O) pred) (_ : P O (S (S (S (S O)))) cond) (_ : forall (n s : nat) (g h0 h1 : BC) (_ : @eq Arities (arities g) (ok_arities n s)) (_ : @eq Arities (arities h0) (ok_arities (S n) (S s))) (_ : @eq Arities (arities h1) (ok_arities (S n) (S s))) (_ : P n s g) (_ : P (S n) (S s) h0) (_ : P (S n) (S s) h1), P (S n) s (rec g h0 h1)) (_ : forall (n s : nat) (h : BC) (rl tl : list BC) (_ : @eq Arities (arities h) (ok_arities (@length BC rl) (@length BC tl))) (_ : forall (e : BC) (_ : @In BC e rl), @eq Arities (arities e) (ok_arities n O)) (_ : forall (e : BC) (_ : @In BC e tl), @eq Arities (arities e) (ok_arities n s)) (_ : P (@length BC rl) (@length BC tl) h) (_ : Q n O rl) (_ : Q n s tl), P n s (comp n s h rl tl)) (e : BC) (n s : nat) (_ : @eq Arities (arities e) (ok_arities n s)), P n s e *) fix BC_ind_inf' 12; intros. (* Goal: P n s e *) destruct e; simpl in *. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) (* Goal: P n s cond *) (* Goal: P n s pred *) (* Goal: P n s (succ b) *) (* Goal: P n s (proj n0 n1 n2) *) (* Goal: P n s zero *) injection H8; intros; subst; auto. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) (* Goal: P n s cond *) (* Goal: P n s pred *) (* Goal: P n s (succ b) *) (* Goal: P n s (proj n0 n1 n2) *) case_eq (n0 + n1); intros; rewrite H9 in H8; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) (* Goal: P n s cond *) (* Goal: P n s pred *) (* Goal: P n s (succ b) *) (* Goal: P n s (proj n0 n1 n2) *) case_eq (leb n2 n3); intros; rewrite H10 in H8; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) (* Goal: P n s cond *) (* Goal: P n s pred *) (* Goal: P n s (succ b) *) (* Goal: P n s (proj n0 n1 n2) *) injection H8; intros; subst; auto. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) (* Goal: P n s cond *) (* Goal: P n s pred *) (* Goal: P n s (succ b) *) (* Goal: P n s (proj n s n2) *) apply H2. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) (* Goal: P n s cond *) (* Goal: P n s pred *) (* Goal: P n s (succ b) *) (* Goal: lt n2 (Init.Nat.add n s) *) apply leb_complete in H10; omega. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) (* Goal: P n s cond *) (* Goal: P n s pred *) (* Goal: P n s (succ b) *) injection H8; intros; subst; auto. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) (* Goal: P n s cond *) (* Goal: P n s pred *) injection H8; intros; subst; auto. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) (* Goal: P n s cond *) injection H8; intros; subst; auto. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) case_eq (arities e1); intros; rewrite H9 in H8; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) case_eq (arities e2); intros; rewrite H10 in H8; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) case_eq (arities e3); intros; rewrite H11 in H8; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) destruct n2; simpl in *; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) case_eq (beq_nat n0 n2); intros; rewrite H12 in H8; simpl in *; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) apply beq_nat_true in H12; subst. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) destruct n4; simpl in *; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) case_eq (beq_nat n2 n4); intros; rewrite H12 in H8; simpl in *; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) apply beq_nat_true in H12; subst. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) destruct n3; simpl in *; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) case_eq (beq_nat n1 n3); intros; rewrite H12 in H8; simpl in *; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) apply beq_nat_true in H12; subst. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) destruct n5; simpl in *; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) case_eq (beq_nat n3 n5); intros; rewrite H12 in H8; simpl in *; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) apply beq_nat_true in H12; subst. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P n s (rec e1 e2 e3) *) injection H8; intros; subst. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P (S n4) s (rec e1 e2 e3) *) apply (@H6 n4 s); auto. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P (S n4) (S s) e3 *) (* Goal: P (S n4) (S s) e2 *) (* Goal: P n4 s e1 *) eapply BC_ind_inf'; eauto. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P (S n4) (S s) e3 *) (* Goal: P (S n4) (S s) e2 *) eapply BC_ind_inf'; eauto. (* Goal: P n s (comp n0 n1 e l l0) *) (* Goal: P (S n4) (S s) e3 *) eapply BC_ind_inf'; eauto. (* Goal: P n s (comp n0 n1 e l l0) *) case_eq (arities e); intros; rewrite H9 in H8; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) case_eq (beq_nat n2 (length l)); intros; rewrite H10 in H8; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) apply beq_nat_true in H10. (* Goal: P n s (comp n0 n1 e l l0) *) case_eq (beq_nat n3 (length l0)); intros; rewrite H11 in H8; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) apply beq_nat_true in H11. (* Goal: P n s (comp n0 n1 e l l0) *) case_eq (forallb (fun ne : BC => aeq (arities ne) (ok_arities n0 0)) l); intros; rewrite H12 in H8; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) case_eq (forallb (fun se : BC => aeq (arities se) (ok_arities n0 n1)) l0); intros; rewrite H13 in H8; try discriminate. (* Goal: P n s (comp n0 n1 e l l0) *) simpl in H8. (* Goal: P n s (comp n0 n1 e l l0) *) injection H8; intros; subst. (* Goal: P n s (comp n s e l l0) *) rewrite forallb_forall in H12. (* Goal: P n s (comp n s e l l0) *) rewrite forallb_forall in H13. (* Goal: P n s (comp n s e l l0) *) apply H7; trivial. (* Goal: Q n s l0 *) (* Goal: Q n O l *) (* Goal: P (@length BC l) (@length BC l0) e *) (* Goal: forall (e : BC) (_ : @In BC e l0), @eq Arities (arities e) (ok_arities n s) *) (* Goal: forall (e : BC) (_ : @In BC e l), @eq Arities (arities e) (ok_arities n O) *) intros; apply aeq_eq. (* Goal: Q n s l0 *) (* Goal: Q n O l *) (* Goal: P (@length BC l) (@length BC l0) e *) (* Goal: forall (e : BC) (_ : @In BC e l0), @eq Arities (arities e) (ok_arities n s) *) (* Goal: @eq bool (aeq (arities e0) (ok_arities n O)) true *) apply H12; trivial. (* Goal: Q n s l0 *) (* Goal: Q n O l *) (* Goal: P (@length BC l) (@length BC l0) e *) (* Goal: forall (e : BC) (_ : @In BC e l0), @eq Arities (arities e) (ok_arities n s) *) intros; apply aeq_eq. (* Goal: Q n s l0 *) (* Goal: Q n O l *) (* Goal: P (@length BC l) (@length BC l0) e *) (* Goal: @eq bool (aeq (arities e0) (ok_arities n s)) true *) apply H13; trivial. (* Goal: Q n s l0 *) (* Goal: Q n O l *) (* Goal: P (@length BC l) (@length BC l0) e *) eapply BC_ind_inf'; eauto. (* Goal: Q n s l0 *) (* Goal: Q n O l *) clear H9. (* Goal: Q n s l0 *) (* Goal: Q n O l *) revert l H12. (* Goal: Q n s l0 *) (* Goal: forall (l : list BC) (_ : forall (x : BC) (_ : @In BC x l), @eq bool (aeq (arities x) (ok_arities n O)) true), Q n O l *) fix BC_ind_inf'0 1. (* Goal: Q n s l0 *) (* Goal: forall (l : list BC) (_ : forall (x : BC) (_ : @In BC x l), @eq bool (aeq (arities x) (ok_arities n O)) true), Q n O l *) intros. (* Goal: Q n s l0 *) (* Goal: Q n O l *) destruct l. (* Goal: Q n s l0 *) (* Goal: Q n O (@cons BC b l) *) (* Goal: Q n O (@nil BC) *) auto. (* Goal: Q n s l0 *) (* Goal: Q n O (@cons BC b l) *) eapply H0. (* Goal: Q n s l0 *) (* Goal: Q n O l *) (* Goal: P n O b *) eapply BC_ind_inf'; eauto. (* Goal: Q n s l0 *) (* Goal: Q n O l *) (* Goal: @eq Arities (arities b) (ok_arities n O) *) apply aeq_eq. (* Goal: Q n s l0 *) (* Goal: Q n O l *) (* Goal: @eq bool (aeq (arities b) (ok_arities n O)) true *) apply H12. (* Goal: Q n s l0 *) (* Goal: Q n O l *) (* Goal: @In BC b (@cons BC b l) *) simpl; auto. (* Goal: Q n s l0 *) (* Goal: Q n O l *) apply BC_ind_inf'0. (* Goal: Q n s l0 *) (* Goal: forall (x : BC) (_ : @In BC x l), @eq bool (aeq (arities x) (ok_arities n O)) true *) intros. (* Goal: Q n s l0 *) (* Goal: @eq bool (aeq (arities x) (ok_arities n O)) true *) apply H12. (* Goal: Q n s l0 *) (* Goal: @In BC x (@cons BC b l) *) simpl; auto. (* Goal: Q n s l0 *) clear H9. (* Goal: Q n s l0 *) revert l0 H13. (* Goal: forall (l0 : list BC) (_ : forall (x : BC) (_ : @In BC x l0), @eq bool (aeq (arities x) (ok_arities n s)) true), Q n s l0 *) fix BC_ind_inf'0 1. (* Goal: forall (l0 : list BC) (_ : forall (x : BC) (_ : @In BC x l0), @eq bool (aeq (arities x) (ok_arities n s)) true), Q n s l0 *) intros. (* Goal: Q n s l0 *) destruct l0. (* Goal: Q n s (@cons BC b l0) *) (* Goal: Q n s (@nil BC) *) auto. (* Goal: Q n s (@cons BC b l0) *) eapply H0. (* Goal: Q n s l0 *) (* Goal: P n s b *) eapply BC_ind_inf'; eauto. (* Goal: Q n s l0 *) (* Goal: @eq Arities (arities b) (ok_arities n s) *) apply aeq_eq. (* Goal: Q n s l0 *) (* Goal: @eq bool (aeq (arities b) (ok_arities n s)) true *) apply H13. (* Goal: Q n s l0 *) (* Goal: @In BC b (@cons BC b l0) *) simpl; auto. (* Goal: Q n s l0 *) apply BC_ind_inf'0. (* Goal: forall (x : BC) (_ : @In BC x l0), @eq bool (aeq (arities x) (ok_arities n s)) true *) intros. (* Goal: @eq bool (aeq (arities x) (ok_arities n s)) true *) apply H13. (* Goal: @In BC x (@cons BC b l0) *) simpl; auto. Qed. Lemma BC_ind_inf : forall (P : nat -> nat -> BC -> Prop), P 0 0 zero -> (forall n s i, i < n + s -> P n s (proj n s i)) -> (forall b, P 0 1 (succ b)) -> P 0 1 pred -> P 0 4 cond -> (forall n s g h0 h1, arities g = ok_arities n s -> arities h0 = ok_arities (S n) (S s) -> arities h1 = ok_arities (S n) (S s) -> P n s g -> P (S n) (S s) h0 -> P (S n) (S s) h1 -> P (S n) s (rec g h0 h1)) -> (forall n s h rl tl, arities h = ok_arities (length rl) (length tl) -> (forall e, In e rl -> arities e = ok_arities n 0) -> (forall e, In e tl -> arities e = ok_arities n s) -> P (length rl) (length tl) h -> (forall r, In r rl -> P n 0 r) -> (forall r, In r tl -> P n s r) -> P n s (comp n s h rl tl)) -> forall e n s , arities e = ok_arities n s -> P n s e. Proof. (* Goal: forall (P : forall (_ : nat) (_ : nat) (_ : BC), Prop) (_ : P O O zero) (_ : forall (n s i : nat) (_ : lt i (Init.Nat.add n s)), P n s (proj n s i)) (_ : forall b : bool, P O (S O) (succ b)) (_ : P O (S O) pred) (_ : P O (S (S (S (S O)))) cond) (_ : forall (n s : nat) (g h0 h1 : BC) (_ : @eq Arities (arities g) (ok_arities n s)) (_ : @eq Arities (arities h0) (ok_arities (S n) (S s))) (_ : @eq Arities (arities h1) (ok_arities (S n) (S s))) (_ : P n s g) (_ : P (S n) (S s) h0) (_ : P (S n) (S s) h1), P (S n) s (rec g h0 h1)) (_ : forall (n s : nat) (h : BC) (rl tl : list BC) (_ : @eq Arities (arities h) (ok_arities (@length BC rl) (@length BC tl))) (_ : forall (e : BC) (_ : @In BC e rl), @eq Arities (arities e) (ok_arities n O)) (_ : forall (e : BC) (_ : @In BC e tl), @eq Arities (arities e) (ok_arities n s)) (_ : P (@length BC rl) (@length BC tl) h) (_ : forall (r : BC) (_ : @In BC r rl), P n O r) (_ : forall (r : BC) (_ : @In BC r tl), P n s r), P n s (comp n s h rl tl)) (e : BC) (n s : nat) (_ : @eq Arities (arities e) (ok_arities n s)), P n s e *) intros. (* Goal: P n s e *) apply BC_ind_inf' with (Q := fun n s l => forall e , In e l -> P n s e); auto; simpl in *; intros. (* Goal: P n0 s0 e1 *) (* Goal: P n0 s0 e0 *) tauto. (* Goal: P n0 s0 e1 *) destruct H9; subst; auto. Qed. Fixpoint sem_rec (sem_g sem_h0 sem_h1:list bs->list bs->bs)(v:bs)(vnl vsl:list bs) := match v with | nil => sem_g vnl vsl | b::v' => if b then sem_h1 (v'::vnl) (sem_rec sem_g sem_h0 sem_h1 v' vnl vsl :: vsl) else sem_h0 (v'::vnl) (sem_rec sem_g sem_h0 sem_h1 v' vnl vsl :: vsl) end. Fixpoint sem (e:BC)(vnl vsl:list bs) : bs := match e with | zero => nil | proj n s j => if leb (S j) n then nth j vnl nil else nth (j-n) vsl nil | succ b => b :: hd nil vsl | pred => tail (hd nil vsl) | cond => match vsl with | a :: b :: c :: d :: _ => match a with | nil => b | true :: _ => c | false :: _ => d end | a :: b :: c :: _ => match a with | nil => b | true :: _ => c | false :: _ => nil end | a :: b :: _ => match a with | nil => b | _ => nil end | _ => nil end | rec g h0 h1 => sem_rec (sem g) (sem h0) (sem h1) (hd nil vnl) (tail vnl) vsl | comp _ _ h nl sl => sem h (List.map (fun ne => sem ne vnl nil) nl) (List.map (fun se => sem se vnl vsl) sl) end. Lemma sem_comp : forall n s f nel sel nl sl, sem (comp n s f nel sel) nl sl = sem f (map (fun ne => sem ne nl nil) nel) (map (fun se => sem se nl sl) sel). Proof. (* Goal: forall (n s : nat) (f : BC) (nel sel : list BC) (nl sl : list (list bool)), @eq (list bool) (sem (comp n s f nel sel) nl sl) (sem f (@map BC (list bool) (fun ne : BC => sem ne nl (@nil (list bool))) nel) (@map BC (list bool) (fun se : BC => sem se nl sl) sel)) *) trivial. Qed. Lemma cond_simpl_nil n s fn fc ff ft l1 l2 : sem fc l1 l2 = nil -> sem (comp n s cond nil [fc; fn; ft; ff]) l1 l2 = sem fn l1 l2. Proof. (* Goal: forall _ : @eq (list bool) (sem fc l1 l2) (@nil bool), @eq (list bool) (sem (comp n s cond (@nil BC) (@cons BC fc (@cons BC fn (@cons BC ft (@cons BC ff (@nil BC)))))) l1 l2) (sem fn l1 l2) *) simpl; intros; rewrite H; simpl; trivial. Qed. Lemma cond_simpl_notnil n s fn fc ft ff l1 l2 : sem fc l1 l2 <> nil -> sem (comp n s cond nil [fc; fn; ft; ff]) l1 l2 = match sem fc l1 l2 with | nil => nil | true :: _ => sem ft l1 l2 | false :: _ => sem ff l1 l2 end. Proof. (* Goal: forall _ : not (@eq (list bool) (sem fc l1 l2) (@nil bool)), @eq (list bool) (sem (comp n s cond (@nil BC) (@cons BC fc (@cons BC fn (@cons BC ft (@cons BC ff (@nil BC)))))) l1 l2) match sem fc l1 l2 with | nil => @nil bool | cons (true as b) l => sem ft l1 l2 | cons (false as b) l => sem ff l1 l2 end *) simpl; intros. (* Goal: @eq (list bool) match sem fc l1 l2 with | nil => sem fn l1 l2 | cons (true as b) l => sem ft l1 l2 | cons (false as b) l => sem ff l1 l2 end match sem fc l1 l2 with | nil => @nil bool | cons (true as b) l => sem ft l1 l2 | cons (false as b) l => sem ff l1 l2 end *) destruct (sem fc l1 l2); intros; auto. (* Goal: @eq (list bool) (sem fn l1 l2) (@nil bool) *) elim H; trivial. Qed. Lemma cond_simpl_true n s fn fc ff ft l1 l2 : hd false (sem fc l1 l2) = true -> sem (comp n s cond nil [fc; fn; ft; ff]) l1 l2 = sem ft l1 l2. Proof. (* Goal: forall _ : @eq bool (@hd bool false (sem fc l1 l2)) true, @eq (list bool) (sem (comp n s cond (@nil BC) (@cons BC fc (@cons BC fn (@cons BC ft (@cons BC ff (@nil BC)))))) l1 l2) (sem ft l1 l2) *) simpl; intros. (* Goal: @eq (list bool) match sem fc l1 l2 with | nil => sem fn l1 l2 | cons (true as b) l => sem ft l1 l2 | cons (false as b) l => sem ff l1 l2 end (sem ft l1 l2) *) destruct (sem fc l1 l2). (* Goal: @eq (list bool) (if b then sem ft l1 l2 else sem ff l1 l2) (sem ft l1 l2) *) (* Goal: @eq (list bool) (sem fn l1 l2) (sem ft l1 l2) *) simpl in H. (* Goal: @eq (list bool) (if b then sem ft l1 l2 else sem ff l1 l2) (sem ft l1 l2) *) (* Goal: @eq (list bool) (sem fn l1 l2) (sem ft l1 l2) *) discriminate. (* Goal: @eq (list bool) (if b then sem ft l1 l2 else sem ff l1 l2) (sem ft l1 l2) *) destruct b; simpl in *; trivial. (* Goal: @eq (list bool) (sem ff l1 l2) (sem ft l1 l2) *) discriminate. Qed. Lemma cond_simpl_false n s fn fc ff ft l1 l2 l : sem fc l1 l2 = false :: l -> sem (comp n s cond nil [fc; fn; ft; ff]) l1 l2 = sem ff l1 l2. Proof. (* Goal: forall _ : @eq (list bool) (sem fc l1 l2) (@cons bool false l), @eq (list bool) (sem (comp n s cond (@nil BC) (@cons BC fc (@cons BC fn (@cons BC ft (@cons BC ff (@nil BC)))))) l1 l2) (sem ff l1 l2) *) simpl; intros. (* Goal: @eq (list bool) match sem fc l1 l2 with | nil => sem fn l1 l2 | cons (true as b) l => sem ft l1 l2 | cons (false as b) l => sem ff l1 l2 end (sem ff l1 l2) *) rewrite H; simpl; trivial. Qed. Lemma sem_nth : forall i start len f d vnl vsl, 0 <= i < len -> sem (nth i (map f (seq start len)) d) vnl vsl = sem (f (i+start)) vnl vsl. Proof. (* Goal: forall (i start len : nat) (f : forall _ : nat, BC) (d : BC) (vnl vsl : list (list bool)) (_ : and (le O i) (lt i len)), @eq (list bool) (sem (@nth BC i (@map nat BC f (seq start len)) d) vnl vsl) (sem (f (Init.Nat.add i start)) vnl vsl) *) intros i start len. (* Goal: forall (f : forall _ : nat, BC) (d : BC) (vnl vsl : list (list bool)) (_ : and (le O i) (lt i len)), @eq (list bool) (sem (@nth BC i (@map nat BC f (seq start len)) d) vnl vsl) (sem (f (Init.Nat.add i start)) vnl vsl) *) revert i start. (* Goal: forall (i start : nat) (f : forall _ : nat, BC) (d : BC) (vnl vsl : list (list bool)) (_ : and (le O i) (lt i len)), @eq (list bool) (sem (@nth BC i (@map nat BC f (seq start len)) d) vnl vsl) (sem (f (Init.Nat.add i start)) vnl vsl) *) induction len as [ | len IH]; simpl; intros. (* Goal: @eq (list bool) (sem match i with | O => f start | S m => @nth BC m (@map nat BC f (seq (S start) len)) d end vnl vsl) (sem (f (Init.Nat.add i start)) vnl vsl) *) (* Goal: @eq (list bool) (sem match i with | O => d | S m => d end vnl vsl) (sem (f (Init.Nat.add i start)) vnl vsl) *) contradict H. (* Goal: @eq (list bool) (sem match i with | O => f start | S m => @nth BC m (@map nat BC f (seq (S start) len)) d end vnl vsl) (sem (f (Init.Nat.add i start)) vnl vsl) *) (* Goal: not (and (le O i) (lt i O)) *) omega. (* Goal: @eq (list bool) (sem match i with | O => f start | S m => @nth BC m (@map nat BC f (seq (S start) len)) d end vnl vsl) (sem (f (Init.Nat.add i start)) vnl vsl) *) destruct i as [ | i]. (* Goal: @eq (list bool) (sem (@nth BC i (@map nat BC f (seq (S start) len)) d) vnl vsl) (sem (f (Init.Nat.add (S i) start)) vnl vsl) *) (* Goal: @eq (list bool) (sem (f start) vnl vsl) (sem (f (Init.Nat.add O start)) vnl vsl) *) trivial. (* Goal: @eq (list bool) (sem (@nth BC i (@map nat BC f (seq (S start) len)) d) vnl vsl) (sem (f (Init.Nat.add (S i) start)) vnl vsl) *) rewrite IH. (* Goal: and (le O i) (lt i len) *) (* Goal: @eq (list bool) (sem (f (Init.Nat.add i (S start))) vnl vsl) (sem (f (Init.Nat.add (S i) start)) vnl vsl) *) do 2 f_equal. (* Goal: and (le O i) (lt i len) *) (* Goal: @eq nat (Init.Nat.add i (S start)) (Init.Nat.add (S i) start) *) ring. (* Goal: and (le O i) (lt i len) *) omega. Qed. Lemma map_sem_nth : forall i f1 f2 vnl vsl d, map (fun f => sem f vnl vsl) f1 = map (fun f => sem f vnl vsl) f2 -> sem (nth i f1 d) vnl vsl = sem (nth i f2 d) vnl vsl. Proof. (* Goal: forall (i : nat) (f1 f2 : list BC) (vnl vsl : list (list bool)) (d : BC) (_ : @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) f1) (@map BC (list bool) (fun f : BC => sem f vnl vsl) f2)), @eq (list bool) (sem (@nth BC i f1 d) vnl vsl) (sem (@nth BC i f2 d) vnl vsl) *) induction i as [ | i IH]; simpl; intros [ | e1 f1] [ | e2 f2] vnl vsl d H; simpl in *; trivial; try congruence. (* Goal: @eq (list bool) (sem (@nth BC i f1 d) vnl vsl) (sem (@nth BC i f2 d) vnl vsl) *) apply IH. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) f1) (@map BC (list bool) (fun f : BC => sem f vnl vsl) f2) *) congruence. Qed. Lemma sem_proj_S_normal : forall n s i f vsl vnl, i < n -> sem (proj (S n) s (S i)) (f::vnl) vsl = sem (proj n s i) vnl vsl. Proof. (* Goal: forall (n s i : nat) (f : list bool) (vsl vnl : list (list bool)) (_ : lt i n), @eq (list bool) (sem (proj (S n) s (S i)) (@cons (list bool) f vnl) vsl) (sem (proj n s i) vnl vsl) *) trivial. Qed. Lemma sem_proj_S_safe : forall n s i f vsl vnl, n <= i -> sem (proj n (S s) (S i)) vnl (f::vsl) = sem (proj n s i) vnl vsl. Proof. (* Goal: forall (n s i : nat) (f : list bool) (vsl vnl : list (list bool)) (_ : le n i), @eq (list bool) (sem (proj n (S s) (S i)) vnl (@cons (list bool) f vsl)) (sem (proj n s i) vnl vsl) *) intros. (* Goal: @eq (list bool) (sem (proj n (S s) (S i)) vnl (@cons (list bool) f vsl)) (sem (proj n s i) vnl vsl) *) simpl. (* Goal: @eq (list bool) (if match n with | O => false | S (O as m') => false | S (S m'0 as m') => Nat.leb i m'0 end then @nth (list bool) (S i) vnl (@nil bool) else match match n with | O => S i | S l => Init.Nat.sub i l end with | O => f | S m => @nth (list bool) m vsl (@nil bool) end) (if match n with | 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)) *) destruct n as [ | n]. (* Goal: @eq (list bool) (if match n with | O => false | S m' => Nat.leb i m' end then @nth (list bool) (S i) vnl (@nil bool) else match Init.Nat.sub i n with | O => f | S m => @nth (list bool) m vsl (@nil bool) end) (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)) *) (* Goal: @eq (list bool) (@nth (list bool) i vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i O) vsl (@nil bool)) *) f_equal. (* Goal: @eq (list bool) (if match n with | O => false | S m' => Nat.leb i m' end then @nth (list bool) (S i) vnl (@nil bool) else match Init.Nat.sub i n with | O => f | S m => @nth (list bool) m vsl (@nil bool) end) (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)) *) (* Goal: @eq nat i (Init.Nat.sub i O) *) omega. (* Goal: @eq (list bool) (if match n with | O => false | S m' => Nat.leb i m' end then @nth (list bool) (S i) vnl (@nil bool) else match Init.Nat.sub i n with | O => f | S m => @nth (list bool) m vsl (@nil bool) end) (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)) *) destruct n as [ | n]. (* Goal: @eq (list bool) (if Nat.leb i n then @nth (list bool) (S i) vnl (@nil bool) else match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end) (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: @eq (list bool) match Init.Nat.sub i O with | O => f | S m => @nth (list bool) m vsl (@nil bool) end (if Nat.leb i O then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S O)) vsl (@nil bool)) *) cutrewrite (i-0 = S (i-1)). (* Goal: @eq (list bool) (if Nat.leb i n then @nth (list bool) (S i) vnl (@nil bool) else match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end) (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: @eq nat (Init.Nat.sub i O) (S (Init.Nat.sub i (S O))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S O)) vsl (@nil bool)) (if Nat.leb i O then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S O)) vsl (@nil bool)) *) case_eq (leb i 0); intro Hi. (* Goal: @eq (list bool) (if Nat.leb i n then @nth (list bool) (S i) vnl (@nil bool) else match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end) (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: @eq nat (Init.Nat.sub i O) (S (Init.Nat.sub i (S O))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S O)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S O)) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S O)) vsl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *) apply leb_complete in Hi. (* Goal: @eq (list bool) (if Nat.leb i n then @nth (list bool) (S i) vnl (@nil bool) else match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end) (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: @eq nat (Init.Nat.sub i O) (S (Init.Nat.sub i (S O))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S O)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S O)) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S O)) vsl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *) contradict Hi. (* Goal: @eq (list bool) (if Nat.leb i n then @nth (list bool) (S i) vnl (@nil bool) else match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end) (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: @eq nat (Init.Nat.sub i O) (S (Init.Nat.sub i (S O))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S O)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S O)) vsl (@nil bool)) *) (* Goal: not (le i O) *) omega. (* Goal: @eq (list bool) (if Nat.leb i n then @nth (list bool) (S i) vnl (@nil bool) else match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end) (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: @eq nat (Init.Nat.sub i O) (S (Init.Nat.sub i (S O))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S O)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S O)) vsl (@nil bool)) *) trivial. (* Goal: @eq (list bool) (if Nat.leb i n then @nth (list bool) (S i) vnl (@nil bool) else match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end) (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: @eq nat (Init.Nat.sub i O) (S (Init.Nat.sub i (S O))) *) omega. (* Goal: @eq (list bool) (if Nat.leb i n then @nth (list bool) (S i) vnl (@nil bool) else match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end) (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) case_eq (leb i n); intro Hi. (* Goal: @eq (list bool) match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) (S i) vnl (@nil bool)) (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) apply leb_complete in Hi. (* Goal: @eq (list bool) match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) (S i) vnl (@nil bool)) (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) contradict Hi. (* Goal: @eq (list bool) match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: not (le i n) *) omega. (* Goal: @eq (list bool) match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) clear Hi. (* Goal: @eq (list bool) match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end (if Nat.leb i (S n) then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) case_eq (leb i (S n)); intro Hi. (* Goal: @eq (list bool) match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end (@nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: @eq (list bool) match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end (@nth (list bool) i vnl (@nil bool)) *) apply leb_complete in Hi. (* Goal: @eq (list bool) match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end (@nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: @eq (list bool) match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end (@nth (list bool) i vnl (@nil bool)) *) contradict Hi. (* Goal: @eq (list bool) match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end (@nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: not (le i (S n)) *) omega. (* Goal: @eq (list bool) match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end (@nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) clear Hi. (* Goal: @eq (list bool) match Init.Nat.sub i (S n) with | O => f | S m => @nth (list bool) m vsl (@nil bool) end (@nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) case_eq (i - S n). (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.sub i (S n)) (S n0)), @eq (list bool) (@nth (list bool) n0 vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: forall _ : @eq nat (Init.Nat.sub i (S n)) O, @eq (list bool) f (@nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) intro Hi. (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.sub i (S n)) (S n0)), @eq (list bool) (@nth (list bool) n0 vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: @eq (list bool) f (@nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) contradict Hi. (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.sub i (S n)) (S n0)), @eq (list bool) (@nth (list bool) n0 vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) (* Goal: not (@eq nat (Init.Nat.sub i (S n)) O) *) omega. (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.sub i (S n)) (S n0)), @eq (list bool) (@nth (list bool) n0 vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) intros j Hi. (* Goal: @eq (list bool) (@nth (list bool) j vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S (S n))) vsl (@nil bool)) *) f_equal. (* Goal: @eq nat j (Init.Nat.sub i (S (S n))) *) omega. Qed. Lemma sem_firstn_safe : forall f n s vnl vsl, arities f = ok_arities n s -> sem f vnl vsl = sem f vnl (firstn s vsl). Proof. (* Goal: forall (f : BC) (n s : nat) (vnl vsl : list (list bool)) (_ : @eq Arities (arities f) (ok_arities n s)), @eq (list bool) (sem f vnl vsl) (sem f vnl (@firstn (list bool) s vsl)) *) intros. (* Goal: @eq (list bool) (sem f vnl vsl) (sem f vnl (@firstn (list bool) s vsl)) *) revert f n s H vnl vsl. (* Goal: forall (f : BC) (n s : nat) (_ : @eq Arities (arities f) (ok_arities n s)) (vnl vsl : list (list bool)), @eq (list bool) (sem f vnl vsl) (sem f vnl (@firstn (list bool) s vsl)) *) refine (BC_ind_inf _ _ _ _ _ _ _ _); simpl; intros. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (if match n with | 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)) (if match n with | 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) (@firstn (list bool) s vsl) (@nil bool)) *) (* Goal: @eq (list bool) (@nil bool) (@nil bool) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (if match n with | 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)) (if match n with | 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) (@firstn (list bool) s vsl) (@nil bool)) *) destruct n as [ | n]; simpl in *; intros. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* 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)) (if Nat.leb i n then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@firstn (list bool) s vsl) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i O) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i O) (@firstn (list bool) s vsl) (@nil bool)) *) rewrite <- minus_n_O. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* 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)) (if Nat.leb i n then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@firstn (list bool) s vsl) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vsl (@nil bool)) (@nth (list bool) i (@firstn (list bool) s vsl) (@nil bool)) *) rewrite nth_firstn. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* 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)) (if Nat.leb i n then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@firstn (list bool) s vsl) (@nil bool)) *) (* Goal: lt i s *) (* Goal: @eq (list bool) (@nth (list bool) i vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* 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)) (if Nat.leb i n then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@firstn (list bool) s vsl) (@nil bool)) *) (* Goal: lt i s *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* 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)) (if Nat.leb i n then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@firstn (list bool) s vsl) (@nil bool)) *) case_eq (leb i n); intro H0. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@firstn (list bool) s vsl) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *) destruct vnl as [ | v vnl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@firstn (list bool) s vsl) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i (@cons (list bool) v vnl) (@nil bool)) (@nth (list bool) i (@cons (list bool) v vnl) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i (@nil (list bool)) (@nil bool)) (@nth (list bool) i (@nil (list bool)) (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@firstn (list bool) s vsl) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i (@cons (list bool) v vnl) (@nil bool)) (@nth (list bool) i (@cons (list bool) v vnl) (@nil bool)) *) destruct i as [ | i]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@firstn (list bool) s vsl) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) (S i) (@cons (list bool) v vnl) (@nil bool)) (@nth (list bool) (S i) (@cons (list bool) v vnl) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) O (@cons (list bool) v vnl) (@nil bool)) (@nth (list bool) O (@cons (list bool) v vnl) (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@firstn (list bool) s vsl) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) (S i) (@cons (list bool) v vnl) (@nil bool)) (@nth (list bool) (S i) (@cons (list bool) v vnl) (@nil bool)) *) simpl. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@firstn (list bool) s vsl) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *) apply leb_complete in H0. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@firstn (list bool) s vsl) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@firstn (list bool) s vsl) (@nil bool)) *) rewrite nth_firstn. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: lt (Init.Nat.sub i (S n)) s *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: lt (Init.Nat.sub i (S n)) s *) apply leb_complete_conv in H0. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: lt (Init.Nat.sub i (S n)) s *) omega. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) f_equal. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@hd (list bool) (@nil bool) vsl) (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end) *) destruct vsl as [ | v vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@hd (list bool) (@nil bool) (@cons (list bool) v vsl)) (@hd (list bool) (@nil bool) (@cons (list bool) v (@nil (list bool)))) *) (* Goal: @eq (list bool) (@hd (list bool) (@nil bool) (@nil (list bool))) (@hd (list bool) (@nil bool) (@nil (list bool))) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) (* Goal: @eq (list bool) (@hd (list bool) (@nil bool) (@cons (list bool) v vsl)) (@hd (list bool) (@nil bool) (@cons (list bool) v (@nil (list bool)))) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end)) *) destruct vsl as [ | v vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) (@cons (list bool) v vsl))) (@tl bool (@hd (list bool) (@nil bool) (@cons (list bool) v (@nil (list bool))))) *) (* Goal: @eq (list bool) (@tl bool (@hd (list bool) (@nil bool) (@nil (list bool)))) (@tl bool (@hd (list bool) (@nil bool) (@nil (list bool)))) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 (@hd (list bool) (@nil bool) (@cons (list bool) v vsl))) (@tl bool (@hd (list bool) (@nil bool) (@cons (list bool) v (@nil (list bool))))) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) 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 match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 match l1 with | nil => @nil (list bool) | cons a2 l2 => @cons (list bool) a2 (@nil (list bool)) end end end end 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 as [ | v vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) match vsl with | nil => @nil bool | cons b (nil as l) => match v with | nil => b | cons b0 l0 => @nil bool end | cons b (cons c (nil as l0) as l) => match v with | nil => b | cons (true as b0) l1 => c | cons (false as b0) l1 => @nil bool end | cons b (cons c (cons d l1 as l0) as l) => match v with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => d end end match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 (@nil (list bool)) end end end with | nil => @nil bool | cons b (nil as l) => match v with | nil => b | cons b0 l0 => @nil bool end | cons b (cons c (nil as l0) as l) => match v with | nil => b | cons (true as b0) l1 => c | cons (false as b0) l1 => @nil bool end | cons b (cons c (cons d l1 as l0) as l) => match v with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => d end end *) (* Goal: @eq (list bool) (@nil bool) (@nil bool) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) match vsl with | nil => @nil bool | cons b (nil as l) => match v with | nil => b | cons b0 l0 => @nil bool end | cons b (cons c (nil as l0) as l) => match v with | nil => b | cons (true as b0) l1 => c | cons (false as b0) l1 => @nil bool end | cons b (cons c (cons d l1 as l0) as l) => match v with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => d end end match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 match l0 with | nil => @nil (list bool) | cons a1 l1 => @cons (list bool) a1 (@nil (list bool)) end end end with | nil => @nil bool | cons b (nil as l) => match v with | nil => b | cons b0 l0 => @nil bool end | cons b (cons c (nil as l0) as l) => match v with | nil => b | cons (true as b0) l1 => c | cons (false as b0) l1 => @nil bool end | cons b (cons c (cons d l1 as l0) as l) => match v with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => d end end *) destruct vsl as [ | v' vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons b l => @nil bool end | cons c (nil as l) => match v with | nil => v' | cons (true as b) l0 => c | cons (false as b) l0 => @nil bool end | cons c (cons d l0 as l) => match v with | nil => v' | cons (true as b) l1 => c | cons (false as b) l1 => d end end match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 (@nil (list bool)) end end with | nil => match v with | nil => v' | cons b l => @nil bool end | cons c (nil as l) => match v with | nil => v' | cons (true as b) l0 => c | cons (false as b) l0 => @nil bool end | cons c (cons d l0 as l) => match v with | nil => v' | cons (true as b) l1 => c | cons (false as b) l1 => d end end *) (* Goal: @eq (list bool) (@nil bool) (@nil bool) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons b l => @nil bool end | cons c (nil as l) => match v with | nil => v' | cons (true as b) l0 => c | cons (false as b) l0 => @nil bool end | cons c (cons d l0 as l) => match v with | nil => v' | cons (true as b) l1 => c | cons (false as b) l1 => d end end match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a match l with | nil => @nil (list bool) | cons a0 l0 => @cons (list bool) a0 (@nil (list bool)) end end with | nil => match v with | nil => v' | cons b l => @nil bool end | cons c (nil as l) => match v with | nil => v' | cons (true as b) l0 => c | cons (false as b) l0 => @nil bool end | cons c (cons d l0 as l) => match v with | nil => v' | cons (true as b) l1 => c | cons (false as b) l1 => d end end *) destruct vsl as [ | v'' vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end | cons d l => match v with | nil => v' | cons (true as b) l0 => v'' | cons (false as b) l0 => d end end match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end with | nil => match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end | cons d l => match v with | nil => v' | cons (true as b) l0 => v'' | cons (false as b) l0 => d end end *) (* Goal: @eq (list bool) match v with | nil => v' | cons b l => @nil bool end match v with | nil => v' | cons b l => @nil bool end *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end | cons d l => match v with | nil => v' | cons (true as b) l0 => v'' | cons (false as b) l0 => d end end match match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@nil (list bool)) end with | nil => match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end | cons d l => match v with | nil => v' | cons (true as b) l0 => v'' | cons (false as b) l0 => d end end *) destruct vsl as [ | v''' vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => v''' end match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => v''' end *) (* Goal: @eq (list bool) match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => v''' end match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => v''' end *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) (@firstn (list bool) s vsl)) *) destruct vnl as [ | v vnl]; simpl. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (sem_rec (sem g) (sem h0) (sem h1) v vnl (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) (sem g (@nil (list bool)) vsl) (sem g (@nil (list bool)) (@firstn (list bool) s vsl)) *) rewrite H2. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (sem_rec (sem g) (sem h0) (sem h1) v vnl (@firstn (list bool) s vsl)) *) (* Goal: @eq (list bool) (sem g (@nil (list bool)) (@firstn (list bool) s vsl)) (sem g (@nil (list bool)) (@firstn (list bool) s vsl)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (sem_rec (sem g) (sem h0) (sem h1) v vnl (@firstn (list bool) s vsl)) *) induction v as [ | [ | ] v IH]; simpl. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl (@firstn (list bool) s vsl)) (@firstn (list bool) s vsl))) *) (* Goal: @eq (list bool) (sem h1 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h1 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl (@firstn (list bool) s vsl)) (@firstn (list bool) s vsl))) *) (* Goal: @eq (list bool) (sem g vnl vsl) (sem g vnl (@firstn (list bool) s vsl)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl (@firstn (list bool) s vsl)) (@firstn (list bool) s vsl))) *) (* Goal: @eq (list bool) (sem h1 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h1 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl (@firstn (list bool) s vsl)) (@firstn (list bool) s vsl))) *) rewrite H4. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl (@firstn (list bool) s vsl)) (@firstn (list bool) s vsl))) *) (* Goal: @eq (list bool) (sem h1 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (@firstn (list bool) s vsl))) (sem h1 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl (@firstn (list bool) s vsl)) (@firstn (list bool) s vsl))) *) congruence. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl (@firstn (list bool) s vsl)) (@firstn (list bool) s vsl))) *) rewrite H3. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (@firstn (list bool) s vsl))) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl (@firstn (list bool) s vsl)) (@firstn (list bool) s vsl))) *) congruence. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) clear H H2. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl)) *) f_equal. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se vnl (@firstn (list bool) s vsl)) tl) *) apply map_ext2. (* Goal: forall (a : BC) (_ : @In BC a tl), @eq (list bool) (sem a vnl vsl) (sem a vnl (@firstn (list bool) s vsl)) *) intros. (* Goal: @eq (list bool) (sem a vnl vsl) (sem a vnl (@firstn (list bool) s vsl)) *) apply H4. (* Goal: @In BC a tl *) trivial. Qed. Lemma sem_firstn_normal : forall f n s vnl vsl, arities f = ok_arities n s -> sem f vnl vsl = sem f (firstn n vnl) vsl. Proof. (* Goal: forall (f : BC) (n s : nat) (vnl vsl : list (list bool)) (_ : @eq Arities (arities f) (ok_arities n s)), @eq (list bool) (sem f vnl vsl) (sem f (@firstn (list bool) n vnl) vsl) *) intros. (* Goal: @eq (list bool) (sem f vnl vsl) (sem f (@firstn (list bool) n vnl) vsl) *) revert f n s H vnl vsl. (* Goal: forall (f : BC) (n s : nat) (_ : @eq Arities (arities f) (ok_arities n s)) (vnl vsl : list (list bool)), @eq (list bool) (sem f vnl vsl) (sem f (@firstn (list bool) n vnl) vsl) *) refine (BC_ind_inf _ _ _ _ _ _ _ _); simpl; intros. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (if match n with | 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)) (if match n with | O => false | S m' => Nat.leb i m' end then @nth (list bool) i (@firstn (list bool) n vnl) (@nil bool) else @nth (list bool) (Init.Nat.sub i n) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nil bool) (@nil bool) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (if match n with | 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)) (if match n with | O => false | S m' => Nat.leb i m' end then @nth (list bool) i (@firstn (list bool) n vnl) (@nil bool) else @nth (list bool) (Init.Nat.sub i n) vsl (@nil bool)) *) destruct n as [ | n]; simpl in *; intros. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* 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)) (if Nat.leb i n then @nth (list bool) i match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i O) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i O) vsl (@nil bool)) *) rewrite <- minus_n_O. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* 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)) (if Nat.leb i n then @nth (list bool) i match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* 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)) (if Nat.leb i n then @nth (list bool) i match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) case_eq (leb i n); intro H0. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end (@nil bool)) *) destruct vnl as [ | v vnl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i (@cons (list bool) v vnl) (@nil bool)) (@nth (list bool) i (@cons (list bool) v (@firstn (list bool) n vnl)) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i (@nil (list bool)) (@nil bool)) (@nth (list bool) i (@nil (list bool)) (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i (@cons (list bool) v vnl) (@nil bool)) (@nth (list bool) i (@cons (list bool) v (@firstn (list bool) n vnl)) (@nil bool)) *) destruct i as [ | i]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) (S i) (@cons (list bool) v vnl) (@nil bool)) (@nth (list bool) (S i) (@cons (list bool) v (@firstn (list bool) n vnl)) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) O (@cons (list bool) v vnl) (@nil bool)) (@nth (list bool) O (@cons (list bool) v (@firstn (list bool) n vnl)) (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) (S i) (@cons (list bool) v vnl) (@nil bool)) (@nth (list bool) (S i) (@cons (list bool) v (@firstn (list bool) n vnl)) (@nil bool)) *) simpl. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i (@firstn (list bool) n vnl) (@nil bool)) *) apply leb_complete in H0. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i (@firstn (list bool) n vnl) (@nil bool)) *) rewrite nth_firstn. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) (* Goal: lt i n *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) (* Goal: lt i n *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) vsl)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) 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 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 as [ | v vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) match vsl with | nil => @nil bool | cons b (nil as l) => match v with | nil => b | cons b0 l0 => @nil bool end | cons b (cons c (nil as l0) as l) => match v with | nil => b | cons (true as b0) l1 => c | cons (false as b0) l1 => @nil bool end | cons b (cons c (cons d l1 as l0) as l) => match v with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => d end end match vsl with | nil => @nil bool | cons b (nil as l) => match v with | nil => b | cons b0 l0 => @nil bool end | cons b (cons c (nil as l0) as l) => match v with | nil => b | cons (true as b0) l1 => c | cons (false as b0) l1 => @nil bool end | cons b (cons c (cons d l1 as l0) as l) => match v with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => d end end *) (* Goal: @eq (list bool) (@nil bool) (@nil bool) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) match vsl with | nil => @nil bool | cons b (nil as l) => match v with | nil => b | cons b0 l0 => @nil bool end | cons b (cons c (nil as l0) as l) => match v with | nil => b | cons (true as b0) l1 => c | cons (false as b0) l1 => @nil bool end | cons b (cons c (cons d l1 as l0) as l) => match v with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => d end end match vsl with | nil => @nil bool | cons b (nil as l) => match v with | nil => b | cons b0 l0 => @nil bool end | cons b (cons c (nil as l0) as l) => match v with | nil => b | cons (true as b0) l1 => c | cons (false as b0) l1 => @nil bool end | cons b (cons c (cons d l1 as l0) as l) => match v with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => d end end *) destruct vsl as [ | v' vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons b l => @nil bool end | cons c (nil as l) => match v with | nil => v' | cons (true as b) l0 => c | cons (false as b) l0 => @nil bool end | cons c (cons d l0 as l) => match v with | nil => v' | cons (true as b) l1 => c | cons (false as b) l1 => d end end match vsl with | nil => match v with | nil => v' | cons b l => @nil bool end | cons c (nil as l) => match v with | nil => v' | cons (true as b) l0 => c | cons (false as b) l0 => @nil bool end | cons c (cons d l0 as l) => match v with | nil => v' | cons (true as b) l1 => c | cons (false as b) l1 => d end end *) (* Goal: @eq (list bool) (@nil bool) (@nil bool) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons b l => @nil bool end | cons c (nil as l) => match v with | nil => v' | cons (true as b) l0 => c | cons (false as b) l0 => @nil bool end | cons c (cons d l0 as l) => match v with | nil => v' | cons (true as b) l1 => c | cons (false as b) l1 => d end end match vsl with | nil => match v with | nil => v' | cons b l => @nil bool end | cons c (nil as l) => match v with | nil => v' | cons (true as b) l0 => c | cons (false as b) l0 => @nil bool end | cons c (cons d l0 as l) => match v with | nil => v' | cons (true as b) l1 => c | cons (false as b) l1 => d end end *) destruct vsl as [ | v'' vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end | cons d l => match v with | nil => v' | cons (true as b) l0 => v'' | cons (false as b) l0 => d end end match vsl with | nil => match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end | cons d l => match v with | nil => v' | cons (true as b) l0 => v'' | cons (false as b) l0 => d end end *) (* Goal: @eq (list bool) match v with | nil => v' | cons b l => @nil bool end match v with | nil => v' | cons b l => @nil bool end *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end | cons d l => match v with | nil => v' | cons (true as b) l0 => v'' | cons (false as b) l0 => d end end match vsl with | nil => match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end | cons d l => match v with | nil => v' | cons (true as b) l0 => v'' | cons (false as b) l0 => d end end *) destruct vsl as [ | v''' vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => v''' end match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => v''' end *) (* Goal: @eq (list bool) match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) (* Goal: @eq (list bool) match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => v''' end match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => v''' end *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) (@tl (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end) vsl) *) destruct vnl as [ | v vnl]; simpl. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (sem_rec (sem g) (sem h0) (sem h1) v (@firstn (list bool) n vnl) vsl) *) (* Goal: @eq (list bool) (sem g (@nil (list bool)) vsl) (sem g (@nil (list bool)) vsl) *) rewrite H2, firstn_nil. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (sem_rec (sem g) (sem h0) (sem h1) v (@firstn (list bool) n vnl) vsl) *) (* Goal: @eq (list bool) (sem g (@nil (list bool)) vsl) (sem g (@nil (list bool)) vsl) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (sem_rec (sem g) (sem h0) (sem h1) v (@firstn (list bool) n vnl) vsl) *) induction v as [ | [ | ] v IH]; simpl. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h0 (@cons (list bool) v (@firstn (list bool) n vnl)) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@firstn (list bool) n vnl) vsl) vsl)) *) (* Goal: @eq (list bool) (sem h1 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h1 (@cons (list bool) v (@firstn (list bool) n vnl)) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@firstn (list bool) n vnl) vsl) vsl)) *) (* Goal: @eq (list bool) (sem g vnl vsl) (sem g (@firstn (list bool) n vnl) vsl) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h0 (@cons (list bool) v (@firstn (list bool) n vnl)) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@firstn (list bool) n vnl) vsl) vsl)) *) (* Goal: @eq (list bool) (sem h1 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h1 (@cons (list bool) v (@firstn (list bool) n vnl)) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@firstn (list bool) n vnl) vsl) vsl)) *) rewrite H4. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h0 (@cons (list bool) v (@firstn (list bool) n vnl)) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@firstn (list bool) n vnl) vsl) vsl)) *) (* Goal: @eq (list bool) (sem h1 (@cons (list bool) v (@firstn (list bool) n vnl)) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h1 (@cons (list bool) v (@firstn (list bool) n vnl)) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@firstn (list bool) n vnl) vsl) vsl)) *) congruence. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h0 (@cons (list bool) v (@firstn (list bool) n vnl)) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@firstn (list bool) n vnl) vsl) vsl)) *) rewrite H3. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v (@firstn (list bool) n vnl)) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h0 (@cons (list bool) v (@firstn (list bool) n vnl)) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@firstn (list bool) n vnl) vsl) vsl)) *) congruence. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) clear H H2. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl)) *) f_equal. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun ne : BC => sem ne (@firstn (list bool) n vnl) (@nil (list bool))) rl) *) apply map_ext2. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl) *) (* Goal: forall (a : BC) (_ : @In BC a rl), @eq (list bool) (sem a vnl (@nil (list bool))) (sem a (@firstn (list bool) n vnl) (@nil (list bool))) *) auto. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@firstn (list bool) n vnl) vsl) tl) *) apply map_ext2. (* Goal: forall (a : BC) (_ : @In BC a tl), @eq (list bool) (sem a vnl vsl) (sem a (@firstn (list bool) n vnl) vsl) *) auto. Qed. Lemma sem_firstn : forall f n s vnl vsl, arities f = ok_arities n s -> sem f vnl vsl = sem f (firstn n vnl) (firstn s vsl). Proof. (* Goal: forall (f : BC) (n s : nat) (vnl vsl : list (list bool)) (_ : @eq Arities (arities f) (ok_arities n s)), @eq (list bool) (sem f vnl vsl) (sem f (@firstn (list bool) n vnl) (@firstn (list bool) s vsl)) *) intros. (* Goal: @eq (list bool) (sem f vnl vsl) (sem f (@firstn (list bool) n vnl) (@firstn (list bool) s vsl)) *) erewrite sem_firstn_safe; eauto. (* Goal: @eq (list bool) (sem f vnl (@firstn (list bool) s vsl)) (sem f (@firstn (list bool) n vnl) (@firstn (list bool) s vsl)) *) erewrite sem_firstn_normal; eauto. Qed. Lemma sem_repeat : forall f vnl vsl n s, arities f = ok_arities n s -> sem f vnl vsl = sem f (vnl ++ repeat (n - length vnl) nil) (vsl ++ repeat (s - length vsl) nil). Proof. (* Goal: forall (f : BC) (vnl vsl : list (list bool)) (n s : nat) (_ : @eq Arities (arities f) (ok_arities n s)), @eq (list bool) (sem f vnl vsl) (sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) intros. (* Goal: @eq (list bool) (sem f vnl vsl) (sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) revert f n s H vnl vsl. (* Goal: forall (f : BC) (n s : nat) (_ : @eq Arities (arities f) (ok_arities n s)) (vnl vsl : list (list bool)), @eq (list bool) (sem f vnl vsl) (sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) refine (BC_ind_inf _ _ _ _ _ _ _ _); simpl; intros. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (if match n with | 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)) (if match n with | O => false | S m' => Nat.leb i m' end then @nth (list bool) i (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil bool) else @nth (list bool) (Init.Nat.sub i n) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nil bool) (@nil bool) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (if match n with | 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)) (if match n with | O => false | S m' => Nat.leb i m' end then @nth (list bool) i (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil bool) else @nth (list bool) (Init.Nat.sub i n) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) destruct n as [ | n]; simpl in *; intros. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@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)) (if Nat.leb i n then @nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i O) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i O) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) rewrite <- minus_n_O. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@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)) (if Nat.leb i n then @nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vsl (@nil bool)) (@nth (list bool) i (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) destruct (le_dec (length vsl) i). (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@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)) (if Nat.leb i n then @nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vsl (@nil bool)) (@nth (list bool) i (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vsl (@nil bool)) (@nth (list bool) i (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) rewrite app_nth2,nth_repeat, nth_overflow. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@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)) (if Nat.leb i n then @nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vsl (@nil bool)) (@nth (list bool) i (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: ge i (@length (list bool) vsl) *) (* Goal: lt (Init.Nat.sub i (@length (list bool) vsl)) (Init.Nat.sub s (@length (list bool) vsl)) *) (* Goal: le (@length (list bool) vsl) i *) (* Goal: @eq (list bool) (@nil bool) (@nil bool) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@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)) (if Nat.leb i n then @nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vsl (@nil bool)) (@nth (list bool) i (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: ge i (@length (list bool) vsl) *) (* Goal: lt (Init.Nat.sub i (@length (list bool) vsl)) (Init.Nat.sub s (@length (list bool) vsl)) *) (* Goal: le (@length (list bool) vsl) i *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@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)) (if Nat.leb i n then @nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vsl (@nil bool)) (@nth (list bool) i (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: ge i (@length (list bool) vsl) *) (* Goal: lt (Init.Nat.sub i (@length (list bool) vsl)) (Init.Nat.sub s (@length (list bool) vsl)) *) omega. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@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)) (if Nat.leb i n then @nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vsl (@nil bool)) (@nth (list bool) i (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: ge i (@length (list bool) vsl) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@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)) (if Nat.leb i n then @nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vsl (@nil bool)) (@nth (list bool) i (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) rewrite app_nth1. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@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)) (if Nat.leb i n then @nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq (list bool) (@nth (list bool) i vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@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)) (if Nat.leb i n then @nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: lt i (@length (list bool) vsl) *) omega. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@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)) (if Nat.leb i n then @nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) case_eq (leb i n); intro Hleb. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool)) *) destruct (le_dec (length vnl) i). (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool)) *) rewrite app_nth2,nth_repeat, nth_overflow. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool)) *) (* Goal: ge i (@length (list bool) vnl) *) (* Goal: lt (Init.Nat.sub i (@length (list bool) vnl)) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end *) (* Goal: le (@length (list bool) vnl) i *) (* Goal: @eq (list bool) (@nil bool) (@nil bool) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool)) *) (* Goal: ge i (@length (list bool) vnl) *) (* Goal: lt (Init.Nat.sub i (@length (list bool) vnl)) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end *) (* Goal: le (@length (list bool) vnl) i *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool)) *) (* Goal: ge i (@length (list bool) vnl) *) (* Goal: lt (Init.Nat.sub i (@length (list bool) vnl)) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end *) apply leb_complete in Hleb. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool)) *) (* Goal: ge i (@length (list bool) vnl) *) (* Goal: lt (Init.Nat.sub i (@length (list bool) vnl)) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end *) destruct (length vnl); omega. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool)) *) (* Goal: ge i (@length (list bool) vnl) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@nil bool)) *) rewrite app_nth1. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: lt i (@length (list bool) vnl) *) (* Goal: @eq (list bool) (@nth (list bool) i vnl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: lt i (@length (list bool) vnl) *) omega. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) destruct (le_dec (length vsl) (i - S n)). (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) rewrite app_nth2,nth_repeat, nth_overflow. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: ge (Init.Nat.sub i (S n)) (@length (list bool) vsl) *) (* Goal: lt (Init.Nat.sub (Init.Nat.sub i (S n)) (@length (list bool) vsl)) (Init.Nat.sub s (@length (list bool) vsl)) *) (* Goal: le (@length (list bool) vsl) (Init.Nat.sub i (S n)) *) (* Goal: @eq (list bool) (@nil bool) (@nil bool) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: ge (Init.Nat.sub i (S n)) (@length (list bool) vsl) *) (* Goal: lt (Init.Nat.sub (Init.Nat.sub i (S n)) (@length (list bool) vsl)) (Init.Nat.sub s (@length (list bool) vsl)) *) (* Goal: le (@length (list bool) vsl) (Init.Nat.sub i (S n)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: ge (Init.Nat.sub i (S n)) (@length (list bool) vsl) *) (* Goal: lt (Init.Nat.sub (Init.Nat.sub i (S n)) (@length (list bool) vsl)) (Init.Nat.sub s (@length (list bool) vsl)) *) apply leb_complete_conv in Hleb. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: ge (Init.Nat.sub i (S n)) (@length (list bool) vsl) *) (* Goal: lt (Init.Nat.sub (Init.Nat.sub i (S n)) (@length (list bool) vsl)) (Init.Nat.sub s (@length (list bool) vsl)) *) omega. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) (* Goal: ge (Init.Nat.sub i (S n)) (@length (list bool) vsl) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@nil bool)) *) rewrite app_nth1. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: lt (Init.Nat.sub i (S n)) (@length (list bool) vsl) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: lt (Init.Nat.sub i (S n)) (@length (list bool) vsl) *) omega. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@cons bool b (@hd (list bool) (@nil bool) vsl)) (@cons bool b (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) f_equal. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@hd (list bool) (@nil bool) vsl) (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool)))) *) destruct vsl as [ | v vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@hd (list bool) (@nil bool) (@cons (list bool) v vsl)) (@hd (list bool) (@nil bool) (@app (list bool) (@cons (list bool) v vsl) (@repeat (list bool) match @length (list bool) (@cons (list bool) v vsl) with | O => S O | S l => O end (@nil bool)))) *) (* Goal: @eq (list bool) (@hd (list bool) (@nil bool) (@nil (list bool))) (@hd (list bool) (@nil bool) (@app (list bool) (@nil (list bool)) (@repeat (list bool) match @length (list bool) (@nil (list bool)) with | O => S O | S l => O end (@nil bool)))) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@hd (list bool) (@nil bool) (@cons (list bool) v vsl)) (@hd (list bool) (@nil bool) (@app (list bool) (@cons (list bool) v vsl) (@repeat (list bool) match @length (list bool) (@cons (list bool) v vsl) with | O => S O | S l => O end (@nil bool)))) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) vsl)) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S O | S l => O end (@nil bool))))) *) destruct vsl as [ | v vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) (@cons (list bool) v vsl))) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) (@cons (list bool) v vsl) (@repeat (list bool) match @length (list bool) (@cons (list bool) v vsl) with | O => S O | S l => O end (@nil bool))))) *) (* Goal: @eq (list bool) (@tl bool (@hd (list bool) (@nil bool) (@nil (list bool)))) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) (@nil (list bool)) (@repeat (list bool) match @length (list bool) (@nil (list bool)) with | O => S O | S l => O end (@nil bool))))) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 (@hd (list bool) (@nil bool) (@cons (list bool) v vsl))) (@tl bool (@hd (list bool) (@nil bool) (@app (list bool) (@cons (list bool) v vsl) (@repeat (list bool) match @length (list bool) (@cons (list bool) v vsl) with | O => S O | S l => O end (@nil bool))))) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) 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 match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 as [ | v vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) match vsl with | nil => @nil bool | cons b (nil as l) => match v with | nil => b | cons b0 l0 => @nil bool end | cons b (cons c (nil as l0) as l) => match v with | nil => b | cons (true as b0) l1 => c | cons (false as b0) l1 => @nil bool end | cons b (cons c (cons d l1 as l0) as l) => match v with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => d end end match @app (list bool) (@cons (list bool) v vsl) (@repeat (list bool) match @length (list bool) (@cons (list bool) v vsl) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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) (@nil bool) match @app (list bool) (@nil (list bool)) (@repeat (list bool) match @length (list bool) (@nil (list bool)) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) match vsl with | nil => @nil bool | cons b (nil as l) => match v with | nil => b | cons b0 l0 => @nil bool end | cons b (cons c (nil as l0) as l) => match v with | nil => b | cons (true as b0) l1 => c | cons (false as b0) l1 => @nil bool end | cons b (cons c (cons d l1 as l0) as l) => match v with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => d end end match @app (list bool) (@cons (list bool) v vsl) (@repeat (list bool) match @length (list bool) (@cons (list bool) v vsl) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 as [ | v' vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons b l => @nil bool end | cons c (nil as l) => match v with | nil => v' | cons (true as b) l0 => c | cons (false as b) l0 => @nil bool end | cons c (cons d l0 as l) => match v with | nil => v' | cons (true as b) l1 => c | cons (false as b) l1 => d end end match @app (list bool) (@cons (list bool) v (@cons (list bool) v' vsl)) (@repeat (list bool) match @length (list bool) (@cons (list bool) v (@cons (list bool) v' vsl)) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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) (@nil bool) match @app (list bool) (@cons (list bool) v (@nil (list bool))) (@repeat (list bool) match @length (list bool) (@cons (list bool) v (@nil (list bool))) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons b l => @nil bool end | cons c (nil as l) => match v with | nil => v' | cons (true as b) l0 => c | cons (false as b) l0 => @nil bool end | cons c (cons d l0 as l) => match v with | nil => v' | cons (true as b) l1 => c | cons (false as b) l1 => d end end match @app (list bool) (@cons (list bool) v (@cons (list bool) v' vsl)) (@repeat (list bool) match @length (list bool) (@cons (list bool) v (@cons (list bool) v' vsl)) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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) (@nil bool) match v with | nil => @nil bool | cons (true as b) l => @nil bool | cons (false as b) l => @nil bool end *) destruct v as [ | [ | ] v]; trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons b l => @nil bool end | cons c (nil as l) => match v with | nil => v' | cons (true as b) l0 => c | cons (false as b) l0 => @nil bool end | cons c (cons d l0 as l) => match v with | nil => v' | cons (true as b) l1 => c | cons (false as b) l1 => d end end match @app (list bool) (@cons (list bool) v (@cons (list bool) v' vsl)) (@repeat (list bool) match @length (list bool) (@cons (list bool) v (@cons (list bool) v' vsl)) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 as [ | v'' vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end | cons d l => match v with | nil => v' | cons (true as b) l0 => v'' | cons (false as b) l0 => d end end match @app (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' vsl))) (@repeat (list bool) match @length (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' vsl))) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 v with | nil => v' | cons b l => @nil bool end match @app (list bool) (@cons (list bool) v (@cons (list bool) v' (@nil (list bool)))) (@repeat (list bool) match @length (list bool) (@cons (list bool) v (@cons (list bool) v' (@nil (list bool)))) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end | cons d l => match v with | nil => v' | cons (true as b) l0 => v'' | cons (false as b) l0 => d end end match @app (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' vsl))) (@repeat (list bool) match @length (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' vsl))) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 v with | nil => v' | cons b l => @nil bool end match v with | nil => v' | cons (true as b) l => @nil bool | cons (false as b) l => @nil bool end *) destruct v as [ | [ | ] v]; trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) match vsl with | nil => match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end | cons d l => match v with | nil => v' | cons (true as b) l0 => v'' | cons (false as b) l0 => d end end match @app (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' vsl))) (@repeat (list bool) match @length (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' vsl))) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 as [ | v''' vsl]. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => v''' end match @app (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' (@cons (list bool) v''' vsl)))) (@repeat (list bool) match @length (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' (@cons (list bool) v''' vsl)))) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end match @app (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' (@nil (list bool))))) (@repeat (list bool) match @length (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' (@nil (list bool))))) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => v''' end match @app (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' (@cons (list bool) v''' vsl)))) (@repeat (list bool) match @length (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' (@cons (list bool) v''' vsl)))) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => @nil bool end *) destruct v as [ | [ | ] v]; trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) match v with | nil => v' | cons (true as b) l => v'' | cons (false as b) l => v''' end match @app (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' (@cons (list bool) v''' vsl)))) (@repeat (list bool) match @length (list bool) (@cons (list bool) v (@cons (list bool) v' (@cons (list bool) v'' (@cons (list bool) v''' vsl)))) with | O => S (S (S (S O))) | S (O as l) => S (S (S O)) | S (S (O as l0) as l) => S (S O) | S (S (S (O as l1) as l0) as l) => S O | S (S (S (S l2 as l1) as l0) as l) => O end (@nil bool)) 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 v as [ | [ | ] v]; trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@tl (list bool) (@app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) destruct vnl as [ | v vnl]; simpl. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) (sem g (@nil (list bool)) vsl) (sem g (@repeat (list bool) n (@nil bool)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) rewrite H2. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list bool) (sem g (@app (list bool) (@nil (list bool)) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) (@nil (list bool)))) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (sem g (@repeat (list bool) n (@nil bool)) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) f_equal. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list (list bool)) (@app (list bool) (@nil (list bool)) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) (@nil (list bool)))) (@nil bool))) (@repeat (list bool) n (@nil bool)) *) simpl. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list (list bool)) (@repeat (list bool) (Init.Nat.sub n O) (@nil bool)) (@repeat (list bool) n (@nil bool)) *) cutrewrite (n-0 = n). (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq nat (Init.Nat.sub n O) n *) (* Goal: @eq (list (list bool)) (@repeat (list bool) n (@nil bool)) (@repeat (list bool) n (@nil bool)) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq nat (Init.Nat.sub n O) n *) omega. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) induction v as [ | [ | ] v IH]; simpl. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h0 (@cons (list bool) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) *) (* Goal: @eq (list bool) (sem h1 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h1 (@cons (list bool) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) *) (* Goal: @eq (list bool) (sem g vnl vsl) (sem g (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) trivial. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h0 (@cons (list bool) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) *) (* Goal: @eq (list bool) (sem h1 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h1 (@cons (list bool) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) *) rewrite H4. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h0 (@cons (list bool) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) *) (* Goal: @eq (list bool) (sem h1 (@app (list bool) (@cons (list bool) v vnl) (@repeat (list bool) match @length (list bool) (@cons (list bool) v vnl) with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@app (list bool) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl) (@repeat (list bool) match @length (list bool) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl) with | O => S s | S l => Init.Nat.sub s l end (@nil bool)))) (sem h1 (@cons (list bool) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) *) simpl; congruence. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem h0 (@cons (list bool) v vnl) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl)) (sem h0 (@cons (list bool) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) *) rewrite H3. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list bool) (sem h0 (@app (list bool) (@cons (list bool) v vnl) (@repeat (list bool) match @length (list bool) (@cons (list bool) v vnl) with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) (@app (list bool) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl) (@repeat (list bool) match @length (list bool) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v vnl vsl) vsl) with | O => S s | S l => Init.Nat.sub s l end (@nil bool)))) (sem h0 (@cons (list bool) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@cons (list bool) (sem_rec (sem g) (sem h0) (sem h1) v (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) *) simpl; congruence. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) clear H H2. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) f_equal. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) *) induction rl as [ | r rl IH]; simpl. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (sem r vnl (@nil (list bool))) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl)) (@cons (list bool) (sem r (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl)) *) (* Goal: @eq (list (list bool)) (@nil (list bool)) (@nil (list bool)) *) trivial. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (sem r vnl (@nil (list bool))) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl)) (@cons (list bool) (sem r (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl)) *) f_equal. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) *) (* Goal: @eq (list bool) (sem r vnl (@nil (list bool))) (sem r (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) *) apply H3. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) *) (* Goal: @In BC r (@cons BC r rl) *) simpl; tauto. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun ne : BC => sem ne (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) rl) *) apply IH. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl) *) (* Goal: forall (r : BC) (_ : @In BC r rl) (vnl vsl : list (list bool)), @eq (list bool) (sem r vnl vsl) (sem r (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@nil (list bool)))) *) (* Goal: forall (e : BC) (_ : @In BC e rl), @eq Arities (arities e) (ok_arities n O) *) auto with *. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl) *) (* Goal: forall (r : BC) (_ : @In BC r rl) (vnl vsl : list (list bool)), @eq (list bool) (sem r vnl vsl) (sem r (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@nil (list bool)))) *) auto with *. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl) *) induction tl as [ | t tl IH]; simpl. (* Goal: @eq (list (list bool)) (@cons (list bool) (sem t vnl vsl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (@cons (list bool) (sem t (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) (* Goal: @eq (list (list bool)) (@nil (list bool)) (@nil (list bool)) *) trivial. (* Goal: @eq (list (list bool)) (@cons (list bool) (sem t vnl vsl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) (@cons (list bool) (sem t (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl)) *) f_equal. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl) *) (* Goal: @eq (list bool) (sem t vnl vsl) (sem t (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) auto with *. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) (@map BC (list bool) (fun se : BC => sem se (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) tl) *) apply IH. (* Goal: forall (r : BC) (_ : @In BC r tl) (vnl vsl : list (list bool)), @eq (list bool) (sem r vnl vsl) (sem r (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: forall (e : BC) (_ : @In BC e tl), @eq Arities (arities e) (ok_arities n s) *) auto with *. (* Goal: forall (r : BC) (_ : @In BC r tl) (vnl vsl : list (list bool)), @eq (list bool) (sem r vnl vsl) (sem r (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) auto with *. Qed. Lemma map_sem_repeat : forall fl vnl vsl n s, (forall f, In f fl -> arities f = ok_arities n s) -> map (fun f => sem f vnl vsl) fl = map ( fun f => sem f (vnl ++ repeat (n - length vnl) nil) (vsl ++ repeat (s - length vsl) nil) ) fl. Proof. (* Goal: forall (fl : list BC) (vnl vsl : list (list bool)) (n s : nat) (_ : forall (f : BC) (_ : @In BC f fl), @eq Arities (arities f) (ok_arities n s)), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) fl) (@map BC (list bool) (fun f : BC => sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) fl) *) induction fl as [ | f fl IH]; intros vnl vsl n s H; simpl. (* Goal: @eq (list (list bool)) (@cons (list bool) (sem f vnl vsl) (@map BC (list bool) (fun f : BC => sem f vnl vsl) fl)) (@cons (list bool) (sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@map BC (list bool) (fun f : BC => sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) fl)) *) (* Goal: @eq (list (list bool)) (@nil (list bool)) (@nil (list bool)) *) trivial. (* Goal: @eq (list (list bool)) (@cons (list bool) (sem f vnl vsl) (@map BC (list bool) (fun f : BC => sem f vnl vsl) fl)) (@cons (list bool) (sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@map BC (list bool) (fun f : BC => sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) fl)) *) f_equal. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) fl) (@map BC (list bool) (fun f : BC => sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) fl) *) (* Goal: @eq (list bool) (sem f vnl vsl) (sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) apply sem_repeat. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) fl) (@map BC (list bool) (fun f : BC => sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) fl) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) apply H; simpl; tauto. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) fl) (@map BC (list bool) (fun f : BC => sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) fl) *) apply IH. (* Goal: forall (f : BC) (_ : @In BC f fl), @eq Arities (arities f) (ok_arities n s) *) intros. (* Goal: @eq Arities (arities f0) (ok_arities n s) *) apply H. (* Goal: @In BC f0 (@cons BC f fl) *) simpl; tauto. Qed. Lemma map_proj_seq_normal_gen : forall n i vnl, n+i <= length vnl -> map (fun f : BC => sem f vnl nil) (map (proj (n+i) 0) (seq i n)) = firstn n (skipn i vnl). Proof. (* Goal: forall (n i : nat) (vnl : list (list bool)) (_ : le (Init.Nat.add n i) (@length (list bool) vnl)), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj (Init.Nat.add n i) O) (seq i n))) (@firstn (list bool) n (@skipn (list bool) i vnl)) *) induction n as [ | n IH]; simpl; intros i vnl Hn. (* Goal: @eq (list (list bool)) (@cons (list bool) (if Nat.leb i (Init.Nat.add n i) then @nth (list bool) i vnl (@nil bool) else match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@nil (list bool)) (@nil (list bool)) *) trivial. (* Goal: @eq (list (list bool)) (@cons (list bool) (if Nat.leb i (Init.Nat.add n i) then @nth (list bool) i vnl (@nil bool) else match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) destruct vnl as [ | v vnl]; simpl in *. (* Goal: @eq (list (list bool)) (@cons (list bool) (if Nat.leb i (Init.Nat.add n i) then match i with | O => v | S m => @nth (list bool) m vnl (@nil bool) end else match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end) (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) (if Nat.leb i (Init.Nat.add n i) then match i with | O => @nil bool | S m => @nil bool end else match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end) (@map BC (list bool) (fun f : BC => sem f (@nil (list bool)) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@nil (list bool)) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) contradict Hn. (* Goal: @eq (list (list bool)) (@cons (list bool) (if Nat.leb i (Init.Nat.add n i) then match i with | O => v | S m => @nth (list bool) m vnl (@nil bool) end else match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end) (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: not (le (S (Init.Nat.add n i)) O) *) omega. (* Goal: @eq (list (list bool)) (@cons (list bool) (if Nat.leb i (Init.Nat.add n i) then match i with | O => v | S m => @nth (list bool) m vnl (@nil bool) end else match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end) (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) case_eq (leb i (n+i)); intro Hi. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) match i with | O => v | S m => @nth (list bool) m vnl (@nil bool) end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) destruct i as [ | i]; simpl. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n (S i))) O) (seq (S (S i)) n)))) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) v (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n O)) O) (seq (S O) n)))) (@cons (list bool) v (@firstn (list bool) n vnl)) *) f_equal. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n (S i))) O) (seq (S (S i)) n)))) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n O)) O) (seq (S O) n))) (@firstn (list bool) n vnl) *) cutrewrite (S (n+0) = n+1). (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n (S i))) O) (seq (S (S i)) n)))) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n O)) (Init.Nat.add n (S O)) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (Init.Nat.add n (S O)) O) (seq (S O) n))) (@firstn (list bool) n vnl) *) apply IH. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n (S i))) O) (seq (S (S i)) n)))) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n O)) (Init.Nat.add n (S O)) *) (* Goal: le (Init.Nat.add n (S O)) (@length (list bool) (@cons (list bool) v vnl)) *) simpl; omega. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n (S i))) O) (seq (S (S i)) n)))) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n O)) (Init.Nat.add n (S O)) *) trivial. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n (S i))) O) (seq (S (S i)) n)))) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) trivial. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n (S i))) O) (seq (S (S i)) n)))) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) cutrewrite (S (n + S i) = n + S (S i)). (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n (S i))) (Init.Nat.add n (S (S i))) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (Init.Nat.add n (S (S i))) O) (seq (S (S i)) n)))) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) rewrite IH. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n (S i))) (Init.Nat.add n (S (S i))) *) (* Goal: le (Init.Nat.add n (S (S i))) (@length (list bool) (@cons (list bool) v vnl)) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@firstn (list bool) n (@skipn (list bool) (S (S i)) (@cons (list bool) v vnl)))) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) simpl. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n (S i))) (Init.Nat.add n (S (S i))) *) (* Goal: le (Init.Nat.add n (S (S i))) (@length (list bool) (@cons (list bool) v vnl)) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@firstn (list bool) n match vnl with | nil => @nil (list bool) | cons a l => @skipn (list bool) i l end)) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) destruct vnl as [ | v1 vnl]; simpl in *. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n (S i))) (Init.Nat.add n (S (S i))) *) (* Goal: le (Init.Nat.add n (S (S i))) (@length (list bool) (@cons (list bool) v vnl)) *) (* Goal: @eq (list (list bool)) (@cons (list bool) match i with | O => v1 | S m => @nth (list bool) m vnl (@nil bool) end (@firstn (list bool) n (@skipn (list bool) i vnl))) match @skipn (list bool) i (@cons (list bool) v1 vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) match i with | O => @nil bool | S m => @nil bool end (@firstn (list bool) n (@nil (list bool)))) match @skipn (list bool) i (@nil (list bool)) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) contradict Hn. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n (S i))) (Init.Nat.add n (S (S i))) *) (* Goal: le (Init.Nat.add n (S (S i))) (@length (list bool) (@cons (list bool) v vnl)) *) (* Goal: @eq (list (list bool)) (@cons (list bool) match i with | O => v1 | S m => @nth (list bool) m vnl (@nil bool) end (@firstn (list bool) n (@skipn (list bool) i vnl))) match @skipn (list bool) i (@cons (list bool) v1 vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: not (le (S (Init.Nat.add n (S i))) (S O)) *) omega. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n (S i))) (Init.Nat.add n (S (S i))) *) (* Goal: le (Init.Nat.add n (S (S i))) (@length (list bool) (@cons (list bool) v vnl)) *) (* Goal: @eq (list (list bool)) (@cons (list bool) match i with | O => v1 | S m => @nth (list bool) m vnl (@nil bool) end (@firstn (list bool) n (@skipn (list bool) i vnl))) match @skipn (list bool) i (@cons (list bool) v1 vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) destruct i as [ | i]; simpl. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n (S i))) (Init.Nat.add n (S (S i))) *) (* Goal: le (Init.Nat.add n (S (S i))) (@length (list bool) (@cons (list bool) v vnl)) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@firstn (list bool) n match vnl with | nil => @nil (list bool) | cons a l => @skipn (list bool) i l end)) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) v1 (@firstn (list bool) n vnl)) (@cons (list bool) v1 (@firstn (list bool) n vnl)) *) trivial. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n (S i))) (Init.Nat.add n (S (S i))) *) (* Goal: le (Init.Nat.add n (S (S i))) (@length (list bool) (@cons (list bool) v vnl)) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@firstn (list bool) n match vnl with | nil => @nil (list bool) | cons a l => @skipn (list bool) i l end)) match @skipn (list bool) i vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) rewrite <- cons_skipn with (d:=nil). (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n (S i))) (Init.Nat.add n (S (S i))) *) (* Goal: le (Init.Nat.add n (S (S i))) (@length (list bool) (@cons (list bool) v vnl)) *) (* Goal: lt i (@length (list bool) vnl) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@firstn (list bool) n match vnl with | nil => @nil (list bool) | cons a l => @skipn (list bool) i l end)) (@cons (list bool) (@nth (list bool) i vnl (@nil bool)) (@firstn (list bool) n (@skipn (list bool) (S i) vnl))) *) trivial. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n (S i))) (Init.Nat.add n (S (S i))) *) (* Goal: le (Init.Nat.add n (S (S i))) (@length (list bool) (@cons (list bool) v vnl)) *) (* Goal: lt i (@length (list bool) vnl) *) omega. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n (S i))) (Init.Nat.add n (S (S i))) *) (* Goal: le (Init.Nat.add n (S (S i))) (@length (list bool) (@cons (list bool) v vnl)) *) simpl; omega. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) (* Goal: @eq nat (S (Init.Nat.add n (S i))) (Init.Nat.add n (S (S i))) *) trivial. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) apply leb_complete_conv in Hi. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub i (S (Init.Nat.add n i)) with | O => @nil bool | S m => @nil bool end (@map BC (list bool) (fun f : BC => sem f (@cons (list bool) v vnl) (@nil (list bool))) (@map nat BC (proj (S (Init.Nat.add n i)) O) (seq (S i) n)))) match @skipn (list bool) i (@cons (list bool) v vnl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end *) contradict Hi. (* Goal: not (lt (Init.Nat.add n i) i) *) omega. Qed. Lemma map_proj_seq_normal : forall n vnl, map (fun f : BC => sem f vnl nil) (map (proj n 0) (seq 0 n)) = firstn n vnl ++ repeat (n - length vnl) nil. Proof. (* Goal: forall (n : nat) (vnl : list (list bool)), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) intros n vnl. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) destruct (le_gt_dec (n+0) (length vnl)) as [H | H]. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) cutrewrite (n - length vnl = 0). (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq nat (Init.Nat.sub n (@length (list bool) vnl)) O *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) O (@nil bool))) *) generalize (map_proj_seq_normal_gen n 0 vnl H). (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq nat (Init.Nat.sub n (@length (list bool) vnl)) O *) (* Goal: forall _ : @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj (Init.Nat.add n O) O) (seq O n))) (@firstn (list bool) n (@skipn (list bool) O vnl)), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) O (@nil bool))) *) simpl_list. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq nat (Init.Nat.sub n (@length (list bool) vnl)) O *) (* Goal: forall _ : @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj (Init.Nat.add n O) O) (seq O n))) (@firstn (list bool) n (@skipn (list bool) O vnl)), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@firstn (list bool) n vnl) *) rewrite <- plus_n_O. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq nat (Init.Nat.sub n (@length (list bool) vnl)) O *) (* Goal: forall _ : @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@firstn (list bool) n (@skipn (list bool) O vnl)), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@firstn (list bool) n vnl) *) trivial. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq nat (Init.Nat.sub n (@length (list bool) vnl)) O *) omega. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) transitivity (firstn n (vnl ++ repeat (n - length vnl) nil)). (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) assert (n + 0 <= length (vnl ++ repeat (n - length vnl) nil)) as H0. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) (* Goal: le (Init.Nat.add n O) (@length (list bool) (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) rewrite app_length. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) (* Goal: le (Init.Nat.add n O) (Init.Nat.add (@length (list bool) vnl) (@length (list bool) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) rewrite length_repeat. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) (* Goal: le (Init.Nat.add n O) (Init.Nat.add (@length (list bool) vnl) (Init.Nat.sub n (@length (list bool) vnl))) *) omega. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) generalize (map_proj_seq_normal_gen n 0 (vnl ++ repeat (n - length vnl) nil) H0). (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: forall _ : @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) (@map nat BC (proj (Init.Nat.add n O) O) (seq O n))) (@firstn (list bool) n (@skipn (list bool) O (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))))), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) simpl. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: forall _ : @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) (@map nat BC (proj (Init.Nat.add n O) O) (seq O n))) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) rewrite <- plus_n_O. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: forall _ : @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) intro H1. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) rewrite <- H1. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@map BC (list bool) (fun f : BC => sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) *) clear H H0 H1. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) (@map BC (list bool) (fun f : BC => sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) *) rewrite map_sem_repeat with (n:=n) (s:=0). (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: forall (f : BC) (_ : @In BC f (@map nat BC (proj n O) (seq O n))), @eq Arities (arities f) (ok_arities n O) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) (@nil (list bool)) (@repeat (list bool) (Init.Nat.sub O (@length (list bool) (@nil (list bool)))) (@nil bool)))) (@map nat BC (proj n O) (seq O n))) (@map BC (list bool) (fun f : BC => sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@nil (list bool))) (@map nat BC (proj n O) (seq O n))) *) trivial. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: forall (f : BC) (_ : @In BC f (@map nat BC (proj n O) (seq O n))), @eq Arities (arities f) (ok_arities n O) *) intros f H. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n O) *) rewrite in_map_iff in H. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n O) *) destruct H as [i [H1 H2] ]. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n O) *) rewrite in_seq_iff in H2. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n O) *) subst f. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq Arities (arities (proj n O i)) (ok_arities n O) *) simpl. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq Arities (if match Init.Nat.add n O with | O => false | S m' => Nat.leb i m' end then ok_arities n O else error_proj n O i) (ok_arities n O) *) rewrite <- plus_n_O. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq Arities (if match n with | O => false | S m' => Nat.leb i m' end then ok_arities n O else error_proj n O i) (ok_arities n O) *) destruct n. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq Arities (if Nat.leb i n then ok_arities (S n) O else error_proj (S n) O i) (ok_arities (S n) O) *) (* Goal: @eq Arities (error_proj O O i) (ok_arities O O) *) contradict H2. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq Arities (if Nat.leb i n then ok_arities (S n) O else error_proj (S n) O i) (ok_arities (S n) O) *) (* Goal: not (and (le O i) (lt i (Init.Nat.add O O))) *) omega. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq Arities (if Nat.leb i n then ok_arities (S n) O else error_proj (S n) O i) (ok_arities (S n) O) *) case_eq (leb i n). (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: forall _ : @eq bool (Nat.leb i n) false, @eq Arities (error_proj (S n) O i) (ok_arities (S n) O) *) (* Goal: forall _ : @eq bool (Nat.leb i n) true, @eq Arities (ok_arities (S n) O) (ok_arities (S n) O) *) trivial. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: forall _ : @eq bool (Nat.leb i n) false, @eq Arities (error_proj (S n) O i) (ok_arities (S n) O) *) intro H. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq Arities (error_proj (S n) O i) (ok_arities (S n) O) *) rewrite leb_iff_conv in H. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: @eq Arities (error_proj (S n) O i) (ok_arities (S n) O) *) contradict H. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) (* Goal: not (lt n i) *) omega. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) clear H. (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) revert vnl. (* Goal: forall vnl : list (list bool), @eq (list (list bool)) (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) *) induction n as [ | n IH]; simpl in *; intro vnl. (* Goal: @eq (list (list bool)) match @app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end (@app (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) *) (* Goal: @eq (list (list bool)) (@nil (list bool)) (@nil (list bool)) *) trivial. (* Goal: @eq (list (list bool)) match @app (list bool) vnl (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool)) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end (@app (list bool) match vnl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) n l) end (@repeat (list bool) match @length (list bool) vnl with | O => S n | S l => Init.Nat.sub n l end (@nil bool))) *) destruct vnl; simpl. (* Goal: @eq (list (list bool)) (@cons (list bool) l (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))))) (@cons (list bool) l (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nil bool) (@firstn (list bool) n (@repeat (list bool) n (@nil bool)))) (@cons (list bool) (@nil bool) (@repeat (list bool) n (@nil bool))) *) clear IH. (* Goal: @eq (list (list bool)) (@cons (list bool) l (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))))) (@cons (list bool) l (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nil bool) (@firstn (list bool) n (@repeat (list bool) n (@nil bool)))) (@cons (list bool) (@nil bool) (@repeat (list bool) n (@nil bool))) *) f_equal. (* Goal: @eq (list (list bool)) (@cons (list bool) l (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))))) (@cons (list bool) l (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) (* Goal: @eq (list (list bool)) (@firstn (list bool) n (@repeat (list bool) n (@nil bool))) (@repeat (list bool) n (@nil bool)) *) apply firstn_repeat_le. (* Goal: @eq (list (list bool)) (@cons (list bool) l (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))))) (@cons (list bool) l (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) (* Goal: le n n *) trivial. (* Goal: @eq (list (list bool)) (@cons (list bool) l (@firstn (list bool) n (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))))) (@cons (list bool) l (@app (list bool) (@firstn (list bool) n vnl) (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool)))) *) congruence. Qed. Lemma map_proj_seq_safe_gen : forall n s i vnl vsl, s+i <= length vsl -> map (fun f : BC => sem f vnl vsl) (map (proj n (s+i)) (seq (n+i) s)) = firstn s (skipn i vsl). Proof. (* Goal: forall (n s i : nat) (vnl vsl : list (list bool)) (_ : le (Init.Nat.add s i) (@length (list bool) vsl)), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n (Init.Nat.add s i)) (seq (Init.Nat.add n i) s))) (@firstn (list bool) s (@skipn (list bool) i vsl)) *) intros n s. (* Goal: forall (i : nat) (vnl vsl : list (list bool)) (_ : le (Init.Nat.add s i) (@length (list bool) vsl)), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n (Init.Nat.add s i)) (seq (Init.Nat.add n i) s))) (@firstn (list bool) s (@skipn (list bool) i vsl)) *) revert n. (* Goal: forall (n i : nat) (vnl vsl : list (list bool)) (_ : le (Init.Nat.add s i) (@length (list bool) vsl)), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n (Init.Nat.add s i)) (seq (Init.Nat.add n i) s))) (@firstn (list bool) s (@skipn (list bool) i vsl)) *) induction s as [ | s IH]; simpl; intros n i vnl vsl Hs. (* Goal: @eq (list (list bool)) (@cons (list bool) (if match n with | 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)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n (S (Init.Nat.add s i))) (seq (S (Init.Nat.add n i)) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq (list (list bool)) (@nil (list bool)) (@nil (list bool)) *) trivial. (* Goal: @eq (list (list bool)) (@cons (list bool) (if match n with | 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)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n (S (Init.Nat.add s i))) (seq (S (Init.Nat.add n i)) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) destruct vsl as [ | v vsl]; simpl in *. (* Goal: @eq (list (list bool)) (@cons (list bool) (if match n with | 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 match Init.Nat.sub (Init.Nat.add n i) n with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj n (S (Init.Nat.add s i))) (seq (S (Init.Nat.add n i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) (if match n with | 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 match Init.Nat.sub (Init.Nat.add n i) n with | O => @nil bool | S m => @nil bool end) (@map BC (list bool) (fun f : BC => sem f vnl (@nil (list bool))) (@map nat BC (proj n (S (Init.Nat.add s i))) (seq (S (Init.Nat.add n i)) s)))) match @skipn (list bool) i (@nil (list bool)) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) contradict Hs. (* Goal: @eq (list (list bool)) (@cons (list bool) (if match n with | 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 match Init.Nat.sub (Init.Nat.add n i) n with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj n (S (Init.Nat.add s i))) (seq (S (Init.Nat.add n i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: not (le (S (Init.Nat.add s i)) O) *) omega. (* Goal: @eq (list (list bool)) (@cons (list bool) (if match n with | 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 match Init.Nat.sub (Init.Nat.add n i) n with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj n (S (Init.Nat.add s i))) (seq (S (Init.Nat.add n i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) destruct n as [ | n]. (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub (Init.Nat.add O i) O with | O => v | S m => @nth (list bool) m vsl (@nil bool) end (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (S (Init.Nat.add s i))) (seq (S (Init.Nat.add O i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) cutrewrite (0+i-0 = i). (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) match i with | O => v | S m => @nth (list bool) m vsl (@nil bool) end (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (S (Init.Nat.add s i))) (seq (S (Init.Nat.add O i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) destruct i as [ |i]; simpl. (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (S (Init.Nat.add s (S i)))) (seq (S (S i)) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) v (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (S (Init.Nat.add s O))) (seq (S O) s)))) (@cons (list bool) v (@firstn (list bool) s vsl)) *) f_equal. (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (S (Init.Nat.add s (S i)))) (seq (S (S i)) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (S (Init.Nat.add s O))) (seq (S O) s))) (@firstn (list bool) s vsl) *) cutrewrite (S (s+0) = s+1). (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (S (Init.Nat.add s (S i)))) (seq (S (S i)) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (S (Init.Nat.add s O)) (Init.Nat.add s (S O)) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (Init.Nat.add s (S O))) (seq (S O) s))) (@firstn (list bool) s vsl) *) apply IH. (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (S (Init.Nat.add s (S i)))) (seq (S (S i)) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (S (Init.Nat.add s O)) (Init.Nat.add s (S O)) *) (* Goal: le (Init.Nat.add s (S O)) (@length (list bool) (@cons (list bool) v vsl)) *) simpl; omega. (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (S (Init.Nat.add s (S i)))) (seq (S (S i)) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (S (Init.Nat.add s O)) (Init.Nat.add s (S O)) *) trivial. (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (S (Init.Nat.add s (S i)))) (seq (S (S i)) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) rewrite <- cons_skipn with (d:=nil). (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (S (Init.Nat.add s (S i)))) (seq (S (S i)) s)))) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@firstn (list bool) s (@skipn (list bool) (S i) vsl))) *) f_equal. (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (S (Init.Nat.add s (S i)))) (seq (S (S i)) s))) (@firstn (list bool) s (@skipn (list bool) (S i) vsl)) *) cutrewrite (S (s + S i) = s + S (S i)). (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq nat (S (Init.Nat.add s (S i))) (Init.Nat.add s (S (S i))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj O (Init.Nat.add s (S (S i)))) (seq (S (S i)) s))) (@firstn (list bool) s (@skipn (list bool) (S i) vsl)) *) rewrite IH. (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq nat (S (Init.Nat.add s (S i))) (Init.Nat.add s (S (S i))) *) (* Goal: le (Init.Nat.add s (S (S i))) (@length (list bool) (@cons (list bool) v vsl)) *) (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@skipn (list bool) (S (S i)) (@cons (list bool) v vsl))) (@firstn (list bool) s (@skipn (list bool) (S i) vsl)) *) f_equal. (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq nat (S (Init.Nat.add s (S i))) (Init.Nat.add s (S (S i))) *) (* Goal: le (Init.Nat.add s (S (S i))) (@length (list bool) (@cons (list bool) v vsl)) *) simpl; omega. (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq nat (S (Init.Nat.add s (S i))) (Init.Nat.add s (S (S i))) *) trivial. (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) (* Goal: lt i (@length (list bool) vsl) *) omega. (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add O i) O) i *) omega. (* Goal: @eq (list (list bool)) (@cons (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 match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) case_eq (leb (S n + i) n); intro H. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) (Init.Nat.add (S n) i) vnl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) apply leb_complete in H. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) (Init.Nat.add (S n) i) vnl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) contradict H. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: not (le (Init.Nat.add (S n) i) n) *) omega. (* Goal: @eq (list (list bool)) (@cons (list bool) match Init.Nat.sub (Init.Nat.add (S n) i) (S n) with | O => v | S m => @nth (list bool) m vsl (@nil bool) end (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) cutrewrite (S n + i - S n = i). (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) match i with | O => v | S m => @nth (list bool) m vsl (@nil bool) end (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s i))) (seq (S (Init.Nat.add (S n) i)) s)))) match @skipn (list bool) i (@cons (list bool) v vsl) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) destruct i as [ | i]; simpl. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s (S i)))) (seq (S (S (Init.Nat.add n (S i)))) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq (list (list bool)) (@cons (list bool) v (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s O))) (seq (S (S (Init.Nat.add n O))) s)))) (@cons (list bool) v (@firstn (list bool) s vsl)) *) f_equal. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s (S i)))) (seq (S (S (Init.Nat.add n (S i)))) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s O))) (seq (S (S (Init.Nat.add n O))) s))) (@firstn (list bool) s vsl) *) cutrewrite (S (s+0) = s+1). (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s (S i)))) (seq (S (S (Init.Nat.add n (S i)))) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (S (Init.Nat.add s O)) (Init.Nat.add s (S O)) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (Init.Nat.add s (S O))) (seq (S (S (Init.Nat.add n O))) s))) (@firstn (list bool) s vsl) *) cutrewrite (S (S (n+0)) = S n + 1). (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s (S i)))) (seq (S (S (Init.Nat.add n (S i)))) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (S (Init.Nat.add s O)) (Init.Nat.add s (S O)) *) (* Goal: @eq nat (S (S (Init.Nat.add n O))) (Init.Nat.add (S n) (S O)) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (Init.Nat.add s (S O))) (seq (Init.Nat.add (S n) (S O)) s))) (@firstn (list bool) s vsl) *) apply IH. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s (S i)))) (seq (S (S (Init.Nat.add n (S i)))) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (S (Init.Nat.add s O)) (Init.Nat.add s (S O)) *) (* Goal: @eq nat (S (S (Init.Nat.add n O))) (Init.Nat.add (S n) (S O)) *) (* Goal: le (Init.Nat.add s (S O)) (@length (list bool) (@cons (list bool) v vsl)) *) simpl; omega. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s (S i)))) (seq (S (S (Init.Nat.add n (S i)))) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (S (Init.Nat.add s O)) (Init.Nat.add s (S O)) *) (* Goal: @eq nat (S (S (Init.Nat.add n O))) (Init.Nat.add (S n) (S O)) *) ring. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s (S i)))) (seq (S (S (Init.Nat.add n (S i)))) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) (* Goal: @eq nat (S (Init.Nat.add s O)) (Init.Nat.add s (S O)) *) trivial. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s (S i)))) (seq (S (S (Init.Nat.add n (S i)))) s)))) match @skipn (list bool) i vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end *) rewrite <- cons_skipn with (d:=nil). (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s (S i)))) (seq (S (S (Init.Nat.add n (S i)))) s)))) (@cons (list bool) (@nth (list bool) i vsl (@nil bool)) (@firstn (list bool) s (@skipn (list bool) (S i) vsl))) *) f_equal. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (S (Init.Nat.add s (S i)))) (seq (S (S (Init.Nat.add n (S i)))) s))) (@firstn (list bool) s (@skipn (list bool) (S i) vsl)) *) cutrewrite (S (s + S i) = s + S (S i)). (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq nat (S (Init.Nat.add s (S i))) (Init.Nat.add s (S (S i))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (Init.Nat.add s (S (S i)))) (seq (S (S (Init.Nat.add n (S i)))) s))) (@firstn (list bool) s (@skipn (list bool) (S i) vsl)) *) cutrewrite (S (S (n + S i)) = (S n + S (S i))). (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq nat (S (Init.Nat.add s (S i))) (Init.Nat.add s (S (S i))) *) (* Goal: @eq nat (S (S (Init.Nat.add n (S i)))) (Init.Nat.add (S n) (S (S i))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@cons (list bool) v vsl)) (@map nat BC (proj (S n) (Init.Nat.add s (S (S i)))) (seq (Init.Nat.add (S n) (S (S i))) s))) (@firstn (list bool) s (@skipn (list bool) (S i) vsl)) *) rewrite IH. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq nat (S (Init.Nat.add s (S i))) (Init.Nat.add s (S (S i))) *) (* Goal: @eq nat (S (S (Init.Nat.add n (S i)))) (Init.Nat.add (S n) (S (S i))) *) (* Goal: le (Init.Nat.add s (S (S i))) (@length (list bool) (@cons (list bool) v vsl)) *) (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@skipn (list bool) (S (S i)) (@cons (list bool) v vsl))) (@firstn (list bool) s (@skipn (list bool) (S i) vsl)) *) trivial. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq nat (S (Init.Nat.add s (S i))) (Init.Nat.add s (S (S i))) *) (* Goal: @eq nat (S (S (Init.Nat.add n (S i)))) (Init.Nat.add (S n) (S (S i))) *) (* Goal: le (Init.Nat.add s (S (S i))) (@length (list bool) (@cons (list bool) v vsl)) *) simpl; omega. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq nat (S (Init.Nat.add s (S i))) (Init.Nat.add s (S (S i))) *) (* Goal: @eq nat (S (S (Init.Nat.add n (S i)))) (Init.Nat.add (S n) (S (S i))) *) ring. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: lt i (@length (list bool) vsl) *) (* Goal: @eq nat (S (Init.Nat.add s (S i))) (Init.Nat.add s (S (S i))) *) trivial. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) (* Goal: lt i (@length (list bool) vsl) *) omega. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) i *) omega. Qed. Lemma map_proj_seq_safe : forall n s vnl vsl, map (fun f : BC => sem f vnl vsl) (map (proj n s) (seq n s)) = firstn s vsl ++ repeat (s - length vsl) nil. Proof. (* Goal: forall (n s : nat) (vnl vsl : list (list bool)), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) intros n s vnl vsl. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) destruct (le_gt_dec (s+0) (length vsl)) as [H | H]. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) cutrewrite (s - length vsl = 0). (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq nat (Init.Nat.sub s (@length (list bool) vsl)) O *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) O (@nil bool))) *) generalize (map_proj_seq_safe_gen n s 0 vnl vsl H). (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq nat (Init.Nat.sub s (@length (list bool) vsl)) O *) (* Goal: forall _ : @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n (Init.Nat.add s O)) (seq (Init.Nat.add n O) s))) (@firstn (list bool) s (@skipn (list bool) O vsl)), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) O (@nil bool))) *) simpl_list. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq nat (Init.Nat.sub s (@length (list bool) vsl)) O *) (* Goal: forall _ : @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n (Init.Nat.add s O)) (seq (Init.Nat.add n O) s))) (@firstn (list bool) s (@skipn (list bool) O vsl)), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@firstn (list bool) s vsl) *) do 2 rewrite <- plus_n_O. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq nat (Init.Nat.sub s (@length (list bool) vsl)) O *) (* Goal: forall _ : @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@firstn (list bool) s (@skipn (list bool) O vsl)), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@firstn (list bool) s vsl) *) trivial. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq nat (Init.Nat.sub s (@length (list bool) vsl)) O *) omega. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) transitivity (firstn s (vsl ++ repeat (s - length vsl) nil)). (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) assert (s + 0 <= length (vsl ++ repeat (s - length vsl) nil)) as H0. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: le (Init.Nat.add s O) (@length (list bool) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) rewrite app_length. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: le (Init.Nat.add s O) (Init.Nat.add (@length (list bool) vsl) (@length (list bool) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) rewrite length_repeat. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: le (Init.Nat.add s O) (Init.Nat.add (@length (list bool) vsl) (Init.Nat.sub s (@length (list bool) vsl))) *) omega. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) generalize (map_proj_seq_safe_gen n s 0 vnl (vsl ++ repeat (s - length vsl) nil) H0). (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: forall _ : @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@map nat BC (proj n (Init.Nat.add s O)) (seq (Init.Nat.add n O) s))) (@firstn (list bool) s (@skipn (list bool) O (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) simpl. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: forall _ : @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@map nat BC (proj n (Init.Nat.add s O)) (seq (Init.Nat.add n O) s))) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) do 2 rewrite <- plus_n_O. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: forall _ : @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@map nat BC (proj n s) (seq n s))) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))), @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) intro H1. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) rewrite <- H1. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@map BC (list bool) (fun f : BC => sem f vnl (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@map nat BC (proj n s) (seq n s))) *) clear H H0 H1. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun f : BC => sem f vnl vsl) (@map nat BC (proj n s) (seq n s))) (@map BC (list bool) (fun f : BC => sem f vnl (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@map nat BC (proj n s) (seq n s))) *) apply map_ext2. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: forall (a : BC) (_ : @In BC a (@map nat BC (proj n s) (seq n s))), @eq (list bool) (sem a vnl vsl) (sem a vnl (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) intros f Hf. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq (list bool) (sem f vnl vsl) (sem f vnl (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) rewrite in_map_iff in Hf. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq (list bool) (sem f vnl vsl) (sem f vnl (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) destruct Hf as [i [H1 H2] ]. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq (list bool) (sem f vnl vsl) (sem f vnl (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) rewrite in_seq_iff in H2. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq (list bool) (sem f vnl vsl) (sem f vnl (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) rewrite sem_repeat with (n:=n) (s:=s). (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq (list bool) (sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (sem f vnl (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) symmetry. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq (list bool) (sem f vnl (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) rewrite sem_repeat with (n:=n) (s:=s). (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq (list bool) (sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) (@nil bool)))) (sem f (@app (list bool) vnl (@repeat (list bool) (Init.Nat.sub n (@length (list bool) vnl)) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) f_equal. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq (list (list bool)) (@app (list bool) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) (@nil bool))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) rewrite <- app_assoc. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq (list (list bool)) (@app (list bool) vsl (@app (list bool) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) (@nil bool)))) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) f_equal. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq (list (list bool)) (@app (list bool) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) (@nil bool))) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) *) transitivity (repeat (s - length vsl) nil (A:=list bool) ++ nil). (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq (list (list bool)) (@app (list bool) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) (@nil (list bool))) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) *) (* Goal: @eq (list (list bool)) (@app (list bool) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) (@nil bool))) (@app (list bool) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) (@nil (list bool))) *) f_equal. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq (list (list bool)) (@app (list bool) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) (@nil (list bool))) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) *) (* Goal: @eq (list (list bool)) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) (@nil bool)) (@nil (list bool)) *) rewrite app_length, length_repeat. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq (list (list bool)) (@app (list bool) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) (@nil (list bool))) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) *) (* Goal: @eq (list (list bool)) (@repeat (list bool) (Init.Nat.sub s (Init.Nat.add (@length (list bool) vsl) (Init.Nat.sub s (@length (list bool) vsl)))) (@nil bool)) (@nil (list bool)) *) cutrewrite (s - (length vsl + (s - length vsl)) = 0). (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq (list (list bool)) (@app (list bool) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) (@nil (list bool))) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) *) (* Goal: @eq nat (Init.Nat.sub s (Init.Nat.add (@length (list bool) vsl) (Init.Nat.sub s (@length (list bool) vsl)))) O *) (* Goal: @eq (list (list bool)) (@repeat (list bool) O (@nil bool)) (@nil (list bool)) *) trivial. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq (list (list bool)) (@app (list bool) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) (@nil (list bool))) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) *) (* Goal: @eq nat (Init.Nat.sub s (Init.Nat.add (@length (list bool) vsl) (Init.Nat.sub s (@length (list bool) vsl)))) O *) omega. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq (list (list bool)) (@app (list bool) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) (@nil (list bool))) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) *) simpl_list. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq (list (list bool)) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)) *) trivial. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) subst f. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (arities (proj n s i)) (ok_arities n s) *) simpl. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (if match Init.Nat.add n s with | O => false | S m' => Nat.leb i m' end then ok_arities n s else error_proj n s i) (ok_arities n s) *) case_eq (n+s). (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.add n s) (S n0)), @eq Arities (if Nat.leb i n0 then ok_arities n s else error_proj n s i) (ok_arities n s) *) (* Goal: forall _ : @eq nat (Init.Nat.add n s) O, @eq Arities (error_proj n s i) (ok_arities n s) *) intro H. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.add n s) (S n0)), @eq Arities (if Nat.leb i n0 then ok_arities n s else error_proj n s i) (ok_arities n s) *) (* Goal: @eq Arities (error_proj n s i) (ok_arities n s) *) contradict H. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.add n s) (S n0)), @eq Arities (if Nat.leb i n0 then ok_arities n s else error_proj n s i) (ok_arities n s) *) (* Goal: not (@eq nat (Init.Nat.add n s) O) *) omega. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.add n s) (S n0)), @eq Arities (if Nat.leb i n0 then ok_arities n s else error_proj n s i) (ok_arities n s) *) intros p H. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (if Nat.leb i p then ok_arities n s else error_proj n s i) (ok_arities n s) *) case_eq (leb i p). (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: forall _ : @eq bool (Nat.leb i p) false, @eq Arities (error_proj n s i) (ok_arities n s) *) (* Goal: forall _ : @eq bool (Nat.leb i p) true, @eq Arities (ok_arities n s) (ok_arities n s) *) trivial. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: forall _ : @eq bool (Nat.leb i p) false, @eq Arities (error_proj n s i) (ok_arities n s) *) intro Hleb. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (error_proj n s i) (ok_arities n s) *) rewrite leb_iff_conv in Hleb. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: @eq Arities (error_proj n s i) (ok_arities n s) *) contradict Hleb. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) (* Goal: not (lt p i) *) omega. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities f) (ok_arities n s) *) subst f. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (arities (proj n s i)) (ok_arities n s) *) simpl. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (if match Init.Nat.add n s with | O => false | S m' => Nat.leb i m' end then ok_arities n s else error_proj n s i) (ok_arities n s) *) case_eq (n+s). (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.add n s) (S n0)), @eq Arities (if Nat.leb i n0 then ok_arities n s else error_proj n s i) (ok_arities n s) *) (* Goal: forall _ : @eq nat (Init.Nat.add n s) O, @eq Arities (error_proj n s i) (ok_arities n s) *) intro H. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.add n s) (S n0)), @eq Arities (if Nat.leb i n0 then ok_arities n s else error_proj n s i) (ok_arities n s) *) (* Goal: @eq Arities (error_proj n s i) (ok_arities n s) *) contradict H. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.add n s) (S n0)), @eq Arities (if Nat.leb i n0 then ok_arities n s else error_proj n s i) (ok_arities n s) *) (* Goal: not (@eq nat (Init.Nat.add n s) O) *) omega. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.add n s) (S n0)), @eq Arities (if Nat.leb i n0 then ok_arities n s else error_proj n s i) (ok_arities n s) *) intros p H. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (if Nat.leb i p then ok_arities n s else error_proj n s i) (ok_arities n s) *) case_eq (leb i p). (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: forall _ : @eq bool (Nat.leb i p) false, @eq Arities (error_proj n s i) (ok_arities n s) *) (* Goal: forall _ : @eq bool (Nat.leb i p) true, @eq Arities (ok_arities n s) (ok_arities n s) *) trivial. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: forall _ : @eq bool (Nat.leb i p) false, @eq Arities (error_proj n s i) (ok_arities n s) *) intro Hleb. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (error_proj n s i) (ok_arities n s) *) rewrite leb_iff_conv in Hleb. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: @eq Arities (error_proj n s i) (ok_arities n s) *) contradict Hleb. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) (* Goal: not (lt p i) *) omega. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) clear H. (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) revert vsl. (* Goal: forall vsl : list (list bool), @eq (list (list bool)) (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))) *) induction s as [ | s IH]; simpl in *; intro vsl. (* Goal: @eq (list (list bool)) match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S s | S l => Init.Nat.sub s l end (@nil bool)) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end (@app (list bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end (@repeat (list bool) match @length (list bool) vsl with | O => S s | S l => Init.Nat.sub s l end (@nil bool))) *) (* Goal: @eq (list (list bool)) (@nil (list bool)) (@nil (list bool)) *) trivial. (* Goal: @eq (list (list bool)) match @app (list bool) vsl (@repeat (list bool) match @length (list bool) vsl with | O => S s | S l => Init.Nat.sub s l end (@nil bool)) with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end (@app (list bool) match vsl with | nil => @nil (list bool) | cons a l => @cons (list bool) a (@firstn (list bool) s l) end (@repeat (list bool) match @length (list bool) vsl with | O => S s | S l => Init.Nat.sub s l end (@nil bool))) *) destruct vsl; simpl. (* Goal: @eq (list (list bool)) (@cons (list bool) l (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) (@cons (list bool) l (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nil bool) (@firstn (list bool) s (@repeat (list bool) s (@nil bool)))) (@cons (list bool) (@nil bool) (@repeat (list bool) s (@nil bool))) *) clear IH. (* Goal: @eq (list (list bool)) (@cons (list bool) l (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) (@cons (list bool) l (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@nil bool) (@firstn (list bool) s (@repeat (list bool) s (@nil bool)))) (@cons (list bool) (@nil bool) (@repeat (list bool) s (@nil bool))) *) f_equal. (* Goal: @eq (list (list bool)) (@cons (list bool) l (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) (@cons (list bool) l (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: @eq (list (list bool)) (@firstn (list bool) s (@repeat (list bool) s (@nil bool))) (@repeat (list bool) s (@nil bool)) *) apply firstn_repeat_le. (* Goal: @eq (list (list bool)) (@cons (list bool) l (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) (@cons (list bool) l (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) (* Goal: le s s *) trivial. (* Goal: @eq (list (list bool)) (@cons (list bool) l (@firstn (list bool) s (@app (list bool) vsl (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool))))) (@cons (list bool) l (@app (list bool) (@firstn (list bool) s vsl) (@repeat (list bool) (Init.Nat.sub s (@length (list bool) vsl)) (@nil bool)))) *) congruence. Qed. Definition zero_e (n s:nat) : BC := comp n s zero nil nil. Lemma sem_comp_proj_normal : forall n1 n2 f1 vnl i, n2 <> 0 -> i < n2 -> sem (comp n1 0 (proj n2 0 i) f1 nil) vnl nil = sem (nth i f1 (zero_e n1 0)) vnl nil. Proof. (* Goal: forall (n1 n2 : nat) (f1 : list BC) (vnl : list (list bool)) (i : nat) (_ : not (@eq nat n2 O)) (_ : lt i n2), @eq (list bool) (sem (comp n1 O (proj n2 O i) f1 (@nil BC)) vnl (@nil (list bool))) (sem (@nth BC i f1 (zero_e n1 O)) vnl (@nil (list bool))) *) intros. (* Goal: @eq (list bool) (sem (comp n1 O (proj n2 O i) f1 (@nil BC)) vnl (@nil (list bool))) (sem (@nth BC i f1 (zero_e n1 O)) vnl (@nil (list bool))) *) simpl. (* Goal: @eq (list bool) (if match n2 with | O => false | S m' => Nat.leb i m' end then @nth (list bool) i (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) f1) (@nil bool) else match Init.Nat.sub i n2 with | O => @nil bool | S m => @nil bool end) (sem (@nth BC i f1 (zero_e n1 O)) vnl (@nil (list bool))) *) destruct n2; simpl. (* Goal: @eq (list bool) (if Nat.leb i n2 then @nth (list bool) i (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) f1) (@nil bool) else match Init.Nat.sub i (S n2) with | O => @nil bool | S m => @nil bool end) (sem (@nth BC i f1 (zero_e n1 O)) vnl (@nil (list bool))) *) (* Goal: @eq (list bool) match Init.Nat.sub i O with | O => @nil bool | S m => @nil bool end (sem (@nth BC i f1 (zero_e n1 O)) vnl (@nil (list bool))) *) elim H; auto. (* Goal: @eq (list bool) (if Nat.leb i n2 then @nth (list bool) i (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) f1) (@nil bool) else match Init.Nat.sub i (S n2) with | O => @nil bool | S m => @nil bool end) (sem (@nth BC i f1 (zero_e n1 O)) vnl (@nil (list bool))) *) rewrite leb_correct; [ | omega]. (* Goal: @eq (list bool) (@nth (list bool) i (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) f1) (@nil bool)) (sem (@nth BC i f1 (zero_e n1 O)) vnl (@nil (list bool))) *) rewrite map_nth2 with (d := zero_e n1 0). (* Goal: @eq (list bool) (sem (zero_e n1 O) vnl (@nil (list bool))) (@nil bool) *) (* Goal: @eq (list bool) (sem (@nth BC i f1 (zero_e n1 O)) vnl (@nil (list bool))) (sem (@nth BC i f1 (zero_e n1 O)) vnl (@nil (list bool))) *) auto. (* Goal: @eq (list bool) (sem (zero_e n1 O) vnl (@nil (list bool))) (@nil bool) *) simpl; auto. Qed. Lemma sem_comp_proj_safe : forall n1 s1 n2 s2 f1 f2 vnl vsl i, n2 <= i -> sem (comp n1 s1 (proj n2 s2 i) f1 f2) vnl vsl = sem (nth (i - n2) f2 (zero_e n1 s1)) vnl vsl. Proof. (* Goal: forall (n1 s1 n2 s2 : nat) (f1 f2 : list BC) (vnl vsl : list (list bool)) (i : nat) (_ : le n2 i), @eq (list bool) (sem (comp n1 s1 (proj n2 s2 i) f1 f2) vnl vsl) (sem (@nth BC (Init.Nat.sub i n2) f2 (zero_e n1 s1)) vnl vsl) *) intros. (* Goal: @eq (list bool) (sem (comp n1 s1 (proj n2 s2 i) f1 f2) vnl vsl) (sem (@nth BC (Init.Nat.sub i n2) f2 (zero_e n1 s1)) vnl vsl) *) simpl. (* Goal: @eq (list bool) (if match n2 with | O => false | S m' => Nat.leb i m' end then @nth (list bool) i (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) f1) (@nil bool) else @nth (list bool) (Init.Nat.sub i n2) (@map BC (list bool) (fun se : BC => sem se vnl vsl) f2) (@nil bool)) (sem (@nth BC (Init.Nat.sub i n2) f2 (zero_e n1 s1)) vnl vsl) *) destruct n2; simpl. (* Goal: @eq (list bool) (if Nat.leb i n2 then @nth (list bool) i (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) f1) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n2)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) f2) (@nil bool)) (sem (@nth BC (Init.Nat.sub i (S n2)) f2 (zero_e n1 s1)) vnl vsl) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i O) (@map BC (list bool) (fun se : BC => sem se vnl vsl) f2) (@nil bool)) (sem (@nth BC (Init.Nat.sub i O) f2 (zero_e n1 s1)) vnl vsl) *) rewrite map_nth2 with (d := (zero_e n1 s1)). (* Goal: @eq (list bool) (if Nat.leb i n2 then @nth (list bool) i (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) f1) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n2)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) f2) (@nil bool)) (sem (@nth BC (Init.Nat.sub i (S n2)) f2 (zero_e n1 s1)) vnl vsl) *) (* Goal: @eq (list bool) (sem (zero_e n1 s1) vnl vsl) (@nil bool) *) (* Goal: @eq (list bool) (sem (@nth BC (Init.Nat.sub i O) f2 (zero_e n1 s1)) vnl vsl) (sem (@nth BC (Init.Nat.sub i O) f2 (zero_e n1 s1)) vnl vsl) *) auto. (* Goal: @eq (list bool) (if Nat.leb i n2 then @nth (list bool) i (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) f1) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n2)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) f2) (@nil bool)) (sem (@nth BC (Init.Nat.sub i (S n2)) f2 (zero_e n1 s1)) vnl vsl) *) (* Goal: @eq (list bool) (sem (zero_e n1 s1) vnl vsl) (@nil bool) *) simpl; auto. (* Goal: @eq (list bool) (if Nat.leb i n2 then @nth (list bool) i (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) f1) (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n2)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) f2) (@nil bool)) (sem (@nth BC (Init.Nat.sub i (S n2)) f2 (zero_e n1 s1)) vnl vsl) *) rewrite leb_correct_conv; [ | omega]. (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n2)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) f2) (@nil bool)) (sem (@nth BC (Init.Nat.sub i (S n2)) f2 (zero_e n1 s1)) vnl vsl) *) rewrite map_nth2 with (d := zero_e n1 s1). (* Goal: @eq (list bool) (sem (zero_e n1 s1) vnl vsl) (@nil bool) *) (* Goal: @eq (list bool) (sem (@nth BC (Init.Nat.sub i (S n2)) f2 (zero_e n1 s1)) vnl vsl) (sem (@nth BC (Init.Nat.sub i (S n2)) f2 (zero_e n1 s1)) vnl vsl) *) auto. (* Goal: @eq (list bool) (sem (zero_e n1 s1) vnl vsl) (@nil bool) *) auto. Qed. Fixpoint poly_BC n (e : BC) : pol := match e with | zero => pcst 0 0 | proj n s i => if (leb (S i) n) then pproj n i else (pcst n 0) | succ b => pcst 0 1 | pred => pcst 0 0 | cond => pcst 0 0 | rec g h0 h1 => pplus (pshift (poly_BC (n - 1) g)) (pmult (pproj n 0) (pplus (poly_BC n h0) (poly_BC n h1))) | comp n s h rl tl => (pplus (pcst n 0) (pplus (pcomp (poly_BC (length rl) h) (map (poly_BC n) rl )) (pplusl (map (poly_BC n) tl)))) end. Lemma arity_poly_BC : forall e n s, arities e = ok_arities n s -> parity (poly_BC n e) = n. Proof. (* Goal: forall (e : BC) (n s : nat) (_ : @eq Arities (arities e) (ok_arities n s)), @eq nat (@fst nat (list mon) (poly_BC n e)) n *) apply BC_ind_inf; simpl; intros; auto. (* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) rl))) (@fst nat (list mon) (pplusl (@map BC pol (poly_BC n) tl))))) n *) (* Goal: @eq nat match match Init.Nat.max (@fst nat (list mon) (poly_BC (S n) h0)) (@fst nat (list mon) (poly_BC (S n) h1)) with | O => S n | S m' => S (Init.Nat.max n m') end with | O => S (@fst nat (list mon) (poly_BC (Init.Nat.sub n O) g)) | S m' => S (Init.Nat.max (@fst nat (list mon) (poly_BC (Init.Nat.sub n O) g)) m') end (S n) *) (* Goal: @eq nat (@fst nat (list mon) (if match n with | O => false | S m' => Nat.leb i m' end then pproj n i else pcst n O)) n *) destruct n. (* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) rl))) (@fst nat (list mon) (pplusl (@map BC pol (poly_BC n) tl))))) n *) (* Goal: @eq nat match match Init.Nat.max (@fst nat (list mon) (poly_BC (S n) h0)) (@fst nat (list mon) (poly_BC (S n) h1)) with | O => S n | S m' => S (Init.Nat.max n m') end with | O => S (@fst nat (list mon) (poly_BC (Init.Nat.sub n O) g)) | S m' => S (Init.Nat.max (@fst nat (list mon) (poly_BC (Init.Nat.sub n O) g)) m') end (S n) *) (* Goal: @eq nat (@fst nat (list mon) (if Nat.leb i n then pproj (S n) i else pcst (S n) O)) (S n) *) (* Goal: @eq nat (@fst nat (list mon) (pcst O O)) O *) rewrite parity_pcst; trivial. (* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) rl))) (@fst nat (list mon) (pplusl (@map BC pol (poly_BC n) tl))))) n *) (* Goal: @eq nat match match Init.Nat.max (@fst nat (list mon) (poly_BC (S n) h0)) (@fst nat (list mon) (poly_BC (S n) h1)) with | O => S n | S m' => S (Init.Nat.max n m') end with | O => S (@fst nat (list mon) (poly_BC (Init.Nat.sub n O) g)) | S m' => S (Init.Nat.max (@fst nat (list mon) (poly_BC (Init.Nat.sub n O) g)) m') end (S n) *) (* Goal: @eq nat (@fst nat (list mon) (if Nat.leb i n then pproj (S n) i else pcst (S n) O)) (S n) *) case_eq (leb i n); intros. (* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) rl))) (@fst nat (list mon) (pplusl (@map BC pol (poly_BC n) tl))))) n *) (* Goal: @eq nat match match Init.Nat.max (@fst nat (list mon) (poly_BC (S n) h0)) (@fst nat (list mon) (poly_BC (S n) h1)) with | O => S n | S m' => S (Init.Nat.max n m') end with | O => S (@fst nat (list mon) (poly_BC (Init.Nat.sub n O) g)) | S m' => S (Init.Nat.max (@fst nat (list mon) (poly_BC (Init.Nat.sub n O) g)) m') end (S n) *) (* Goal: @eq nat (@fst nat (list mon) (pcst (S n) O)) (S n) *) (* Goal: @eq nat (@fst nat (list mon) (pproj (S n) i)) (S n) *) rewrite parity_pproj; trivial. (* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) rl))) (@fst nat (list mon) (pplusl (@map BC pol (poly_BC n) tl))))) n *) (* Goal: @eq nat match match Init.Nat.max (@fst nat (list mon) (poly_BC (S n) h0)) (@fst nat (list mon) (poly_BC (S n) h1)) with | O => S n | S m' => S (Init.Nat.max n m') end with | O => S (@fst nat (list mon) (poly_BC (Init.Nat.sub n O) g)) | S m' => S (Init.Nat.max (@fst nat (list mon) (poly_BC (Init.Nat.sub n O) g)) m') end (S n) *) (* Goal: @eq nat (@fst nat (list mon) (pcst (S n) O)) (S n) *) rewrite parity_pcst; trivial. (* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) rl))) (@fst nat (list mon) (pplusl (@map BC pol (poly_BC n) tl))))) n *) (* Goal: @eq nat match match Init.Nat.max (@fst nat (list mon) (poly_BC (S n) h0)) (@fst nat (list mon) (poly_BC (S n) h1)) with | O => S n | S m' => S (Init.Nat.max n m') end with | O => S (@fst nat (list mon) (poly_BC (Init.Nat.sub n O) g)) | S m' => S (Init.Nat.max (@fst nat (list mon) (poly_BC (Init.Nat.sub n O) g)) m') end (S n) *) rewrite H3, H4, <- minus_n_O, H2. (* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) rl))) (@fst nat (list mon) (pplusl (@map BC pol (poly_BC n) tl))))) n *) (* Goal: @eq nat match match Init.Nat.max (S n) (S n) with | O => S n | S m' => S (Init.Nat.max n m') end with | O => S n | S m' => S (Init.Nat.max n m') end (S n) *) repeat rewrite Nat.max_idempotent; trivial. (* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) rl))) (@fst nat (list mon) (pplusl (@map BC pol (poly_BC n) tl))))) n *) apply max_l. (* Goal: le (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) rl))) (@fst nat (list mon) (pplusl (@map BC pol (poly_BC n) tl)))) n *) apply Nat.max_lub. (* Goal: le (@fst nat (list mon) (pplusl (@map BC pol (poly_BC n) tl))) n *) (* Goal: le (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) rl))) n *) apply maxl_map; intros. (* Goal: le (@fst nat (list mon) (pplusl (@map BC pol (poly_BC n) tl))) n *) (* Goal: @eq nat (@fst nat (list mon) x) n *) rewrite in_map_iff in H5. (* Goal: le (@fst nat (list mon) (pplusl (@map BC pol (poly_BC n) tl))) n *) (* Goal: @eq nat (@fst nat (list mon) x) n *) destruct H5 as [p [Hp1 Hp2]]; subst; auto. (* Goal: le (@fst nat (list mon) (pplusl (@map BC pol (poly_BC n) tl))) n *) rewrite parity_pplusl. (* Goal: le (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) tl))) n *) apply maxl_map; intros. (* Goal: @eq nat (@fst nat (list mon) x) n *) rewrite in_map_iff in H5. (* Goal: @eq nat (@fst nat (list mon) x) n *) destruct H5 as [p [Hp1 Hp2]]; subst; auto. Qed. Lemma pWF_poly_BC : forall e n s, arities e = ok_arities n s -> pWF (poly_BC n e). Proof. (* Goal: forall (e : BC) (n s : nat) (_ : @eq Arities (arities e) (ok_arities n s)), pWF (poly_BC n e) *) apply BC_ind_inf; simpl; intros; auto; try pWF; auto. (* Goal: pWF x *) (* Goal: pWF x *) (* Goal: pWF (poly_BC (Init.Nat.sub n O) g) *) (* Goal: pWF (if match n with | O => false | S m' => Nat.leb i m' end then pproj n i else pcst n O) *) destruct n; [ pWF | ]. (* Goal: pWF x *) (* Goal: pWF x *) (* Goal: pWF (poly_BC (Init.Nat.sub n O) g) *) (* Goal: pWF (if Nat.leb i n then pproj (S n) i else pcst (S n) O) *) case_eq (leb i n); intros; pWF. (* Goal: pWF x *) (* Goal: pWF x *) (* Goal: pWF (poly_BC (Init.Nat.sub n O) g) *) (* Goal: lt i (S n) *) apply leb_complete in H0; omega. (* Goal: pWF x *) (* Goal: pWF x *) (* Goal: pWF (poly_BC (Init.Nat.sub n O) g) *) rewrite <- minus_n_O; auto. (* Goal: pWF x *) (* Goal: pWF x *) rewrite in_map_iff in H5. (* Goal: pWF x *) (* Goal: pWF x *) destruct H5 as [p [Hp1 Hp2]]; subst; auto. (* Goal: pWF x *) rewrite in_map_iff in H5. (* Goal: pWF x *) destruct H5 as [p [Hp1 Hp2]]; subst; auto. Qed. Lemma polymax_bounding : forall (e : BC) xl yl n s, arities e = ok_arities n s -> length (sem e xl yl) <= peval (poly_BC n e) (map (@length _) xl) + maxl (map (@length _) yl). Lemma proj_seq_shift_safe : forall n m ln ls d, map (fun x : BC => sem x ln (d :: ls)) (map (proj n (S m)) (seq (S n) m)) = map (fun x : BC => sem x ln ls) (map (proj n m) (seq n m)). Proof. (* Goal: forall (n m : nat) (ln ls : list (list bool)) (d : list bool), @eq (list (list bool)) (@map BC (list bool) (fun x : BC => sem x ln (@cons (list bool) d ls)) (@map nat BC (proj n (S m)) (seq (S n) m))) (@map BC (list bool) (fun x : BC => sem x ln ls) (@map nat BC (proj n m) (seq n m))) *) intros. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun x : BC => sem x ln (@cons (list bool) d ls)) (@map nat BC (proj n (S m)) (seq (S n) m))) (@map BC (list bool) (fun x : BC => sem x ln ls) (@map nat BC (proj n m) (seq n m))) *) rewrite <- seq_shift. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun x : BC => sem x ln (@cons (list bool) d ls)) (@map nat BC (proj n (S m)) (@map nat nat S (seq n m)))) (@map BC (list bool) (fun x : BC => sem x ln ls) (@map nat BC (proj n m) (seq n m))) *) rewrite map_map with (f := S). (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun x : BC => sem x ln (@cons (list bool) d ls)) (@map nat BC (fun x : nat => proj n (S m) (S x)) (seq n m))) (@map BC (list bool) (fun x : BC => sem x ln ls) (@map nat BC (proj n m) (seq n m))) *) rewrite map_map with (f := (proj n m)). (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun x : BC => sem x ln (@cons (list bool) d ls)) (@map nat BC (fun x : nat => proj n (S m) (S x)) (seq n m))) (@map nat (list bool) (fun x : nat => sem (proj n m x) ln ls) (seq n m)) *) rewrite map_map with (f := (fun x : nat => proj n (S m) (S x))). (* Goal: @eq (list (list bool)) (@map nat (list bool) (fun x : nat => sem (proj n (S m) (S x)) ln (@cons (list bool) d ls)) (seq n m)) (@map nat (list bool) (fun x : nat => sem (proj n m x) ln ls) (seq n m)) *) apply map_ext2; intros. (* Goal: @eq (list bool) (sem (proj n (S m) (S a)) ln (@cons (list bool) d ls)) (sem (proj n m a) ln ls) *) simpl. (* Goal: @eq (list bool) (if match n with | O => false | S (O as m') => false | S (S m'0 as m') => Nat.leb a m'0 end then @nth (list bool) (S a) ln (@nil bool) else match match n with | O => S a | S l => Init.Nat.sub a l end with | O => d | S m => @nth (list bool) m ls (@nil bool) end) (if match n with | O => false | S m' => Nat.leb a m' end then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a n) ls (@nil bool)) *) rewrite in_seq_iff in H. (* Goal: @eq (list bool) (if match n with | O => false | S (O as m') => false | S (S m'0 as m') => Nat.leb a m'0 end then @nth (list bool) (S a) ln (@nil bool) else match match n with | O => S a | S l => Init.Nat.sub a l end with | O => d | S m => @nth (list bool) m ls (@nil bool) end) (if match n with | O => false | S m' => Nat.leb a m' end then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a n) ls (@nil bool)) *) destruct n; simpl in *. (* Goal: @eq (list bool) (if match n with | O => false | S m' => Nat.leb a m' end then @nth (list bool) (S a) ln (@nil bool) else match Init.Nat.sub a n with | O => d | S m => @nth (list bool) m ls (@nil bool) end) (if Nat.leb a n then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S n)) ls (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) a ls (@nil bool)) (@nth (list bool) (Init.Nat.sub a O) ls (@nil bool)) *) rewrite <- minus_n_O; trivial. (* Goal: @eq (list bool) (if match n with | O => false | S m' => Nat.leb a m' end then @nth (list bool) (S a) ln (@nil bool) else match Init.Nat.sub a n with | O => d | S m => @nth (list bool) m ls (@nil bool) end) (if Nat.leb a n then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S n)) ls (@nil bool)) *) destruct n; simpl in *. (* Goal: @eq (list bool) (if Nat.leb a n then @nth (list bool) (S a) ln (@nil bool) else match Init.Nat.sub a (S n) with | O => d | S m => @nth (list bool) m ls (@nil bool) end) (if Nat.leb a (S n) then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S (S n))) ls (@nil bool)) *) (* Goal: @eq (list bool) match Init.Nat.sub a O with | O => d | S m => @nth (list bool) m ls (@nil bool) end (if Nat.leb a O then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S O)) ls (@nil bool)) *) rewrite <- minus_n_O; trivial. (* Goal: @eq (list bool) (if Nat.leb a n then @nth (list bool) (S a) ln (@nil bool) else match Init.Nat.sub a (S n) with | O => d | S m => @nth (list bool) m ls (@nil bool) end) (if Nat.leb a (S n) then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S (S n))) ls (@nil bool)) *) (* Goal: @eq (list bool) match a with | O => d | S m => @nth (list bool) m ls (@nil bool) end (if Nat.leb a O then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S O)) ls (@nil bool)) *) destruct a; simpl in *. (* Goal: @eq (list bool) (if Nat.leb a n then @nth (list bool) (S a) ln (@nil bool) else match Init.Nat.sub a (S n) with | O => d | S m => @nth (list bool) m ls (@nil bool) end) (if Nat.leb a (S n) then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S (S n))) ls (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) a ls (@nil bool)) (@nth (list bool) (Init.Nat.sub a O) ls (@nil bool)) *) (* Goal: @eq (list bool) d (@nth (list bool) O ln (@nil bool)) *) elimtype False; omega. (* Goal: @eq (list bool) (if Nat.leb a n then @nth (list bool) (S a) ln (@nil bool) else match Init.Nat.sub a (S n) with | O => d | S m => @nth (list bool) m ls (@nil bool) end) (if Nat.leb a (S n) then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S (S n))) ls (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) a ls (@nil bool)) (@nth (list bool) (Init.Nat.sub a O) ls (@nil bool)) *) rewrite <- minus_n_O; trivial. (* Goal: @eq (list bool) (if Nat.leb a n then @nth (list bool) (S a) ln (@nil bool) else match Init.Nat.sub a (S n) with | O => d | S m => @nth (list bool) m ls (@nil bool) end) (if Nat.leb a (S n) then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S (S n))) ls (@nil bool)) *) rewrite leb_correct_conv; [ | omega ]. (* Goal: @eq (list bool) match Init.Nat.sub a (S n) with | O => d | S m => @nth (list bool) m ls (@nil bool) end (if Nat.leb a (S n) then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S (S n))) ls (@nil bool)) *) case_eq (a - S n); intros. (* Goal: @eq (list bool) (@nth (list bool) n0 ls (@nil bool)) (if Nat.leb a (S n) then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S (S n))) ls (@nil bool)) *) (* Goal: @eq (list bool) d (if Nat.leb a (S n) then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S (S n))) ls (@nil bool)) *) elimtype False; omega. (* Goal: @eq (list bool) (@nth (list bool) n0 ls (@nil bool)) (if Nat.leb a (S n) then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S (S n))) ls (@nil bool)) *) rewrite leb_correct_conv; [ | omega ]. (* Goal: @eq (list bool) (@nth (list bool) n0 ls (@nil bool)) (@nth (list bool) (Init.Nat.sub a (S (S n))) ls (@nil bool)) *) f_equal. (* Goal: @eq nat n0 (Init.Nat.sub a (S (S n))) *) omega. Qed. Lemma proj_seq_shift_normal : forall n ln ls d, map (fun x : BC => sem x (d :: ln) ls) (map (proj (S n) 0) (seq 1 n)) = map (fun x : BC => sem x ln ls) (map (proj n 0) (seq 0 n)). Proof. (* Goal: forall (n : nat) (ln ls : list (list bool)) (d : list bool), @eq (list (list bool)) (@map BC (list bool) (fun x : BC => sem x (@cons (list bool) d ln) ls) (@map nat BC (proj (S n) O) (seq (S O) n))) (@map BC (list bool) (fun x : BC => sem x ln ls) (@map nat BC (proj n O) (seq O n))) *) intros. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun x : BC => sem x (@cons (list bool) d ln) ls) (@map nat BC (proj (S n) O) (seq (S O) n))) (@map BC (list bool) (fun x : BC => sem x ln ls) (@map nat BC (proj n O) (seq O n))) *) rewrite <- seq_shift. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun x : BC => sem x (@cons (list bool) d ln) ls) (@map nat BC (proj (S n) O) (@map nat nat S (seq O n)))) (@map BC (list bool) (fun x : BC => sem x ln ls) (@map nat BC (proj n O) (seq O n))) *) rewrite map_map with (f := S). (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun x : BC => sem x (@cons (list bool) d ln) ls) (@map nat BC (fun x : nat => proj (S n) O (S x)) (seq O n))) (@map BC (list bool) (fun x : BC => sem x ln ls) (@map nat BC (proj n O) (seq O n))) *) rewrite map_map with (f := (proj n 0)). (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun x : BC => sem x (@cons (list bool) d ln) ls) (@map nat BC (fun x : nat => proj (S n) O (S x)) (seq O n))) (@map nat (list bool) (fun x : nat => sem (proj n O x) ln ls) (seq O n)) *) rewrite map_map with (f := (fun x : nat => proj (S n) 0 (S x))). (* Goal: @eq (list (list bool)) (@map nat (list bool) (fun x : nat => sem (proj (S n) O (S x)) (@cons (list bool) d ln) ls) (seq O n)) (@map nat (list bool) (fun x : nat => sem (proj n O x) ln ls) (seq O n)) *) apply map_ext2; intros. (* Goal: @eq (list bool) (sem (proj (S n) O (S a)) (@cons (list bool) d ln) ls) (sem (proj n O a) ln ls) *) simpl. (* Goal: @eq (list bool) (if match n with | O => false | S m' => Nat.leb a m' end then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a n) ls (@nil bool)) (if match n with | O => false | S m' => Nat.leb a m' end then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a n) ls (@nil bool)) *) rewrite in_seq_iff in H. (* Goal: @eq (list bool) (if match n with | O => false | S m' => Nat.leb a m' end then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a n) ls (@nil bool)) (if match n with | O => false | S m' => Nat.leb a m' end then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a n) ls (@nil bool)) *) destruct n; simpl in *. (* Goal: @eq (list bool) (if Nat.leb a n then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S n)) ls (@nil bool)) (if Nat.leb a n then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S n)) ls (@nil bool)) *) (* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub a O) ls (@nil bool)) (@nth (list bool) (Init.Nat.sub a O) ls (@nil bool)) *) rewrite <- minus_n_O; trivial. (* Goal: @eq (list bool) (if Nat.leb a n then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S n)) ls (@nil bool)) (if Nat.leb a n then @nth (list bool) a ln (@nil bool) else @nth (list bool) (Init.Nat.sub a (S n)) ls (@nil bool)) *) trivial. Qed. Section TIME. Variable ptime_zero_cost ptime_succ_cost ptime_pred_cost ptime_cond_cost: nat. Variable ptime_proj_cost : nat -> nat -> nat -> nat. Fixpoint sem_cost_rec (sem_g sem_h0 sem_h1:list bs->list bs->bs*nat)(v:bs)(vnl vsl:list bs) : bs * nat := match v with | nil => sem_g vnl vsl | b::v' => if b then let sem_cost := sem_cost_rec sem_g sem_h0 sem_h1 v' vnl vsl in let sem_cost_h := sem_h1 (v'::vnl) (fst sem_cost :: vsl) in (fst sem_cost_h, snd sem_cost + snd sem_cost_h) else let sem_cost := sem_cost_rec sem_g sem_h0 sem_h1 v' vnl vsl in let sem_cost_h := sem_h0 (v'::vnl) (fst sem_cost :: vsl) in (fst sem_cost_h, snd sem_cost + snd sem_cost_h) end. Fixpoint sem_cost (e:BC)(vnl vsl:list bs) : bs*nat := match e with | zero => (nil, ptime_zero_cost) | proj n s j => ( if leb (S j) n then nth j vnl nil else nth (j-n) vsl nil, ptime_proj_cost n s j ) | succ b => (b :: hd nil vsl, ptime_succ_cost) | pred => (tail (hd nil vsl), ptime_pred_cost) | cond => ( match vsl with | a :: b :: c :: d :: _ => match a with | nil => b | true :: _ => c | false :: _ => d end | a :: b :: c :: _ => match a with | nil => b | true :: _ => c | false :: _ => nil end | a :: b :: _ => match a with | nil => b | _ => nil end | _ => nil end, ptime_cond_cost ) | rec g h0 h1 => sem_cost_rec (sem_cost g) (sem_cost h0) (sem_cost h1) (hd nil vnl) (tail vnl) vsl | comp _ _ h nl sl => let sem_cost_nl := List.map (fun ne => sem_cost ne vnl nil) nl in let sem_cost_sl := List.map (fun se => sem_cost se vnl vsl) sl in let sem_nl := List.map (@fst _ _) sem_cost_nl in let sem_sl := List.map (@fst _ _) sem_cost_sl in let cost_nl := List.map (@snd _ _) sem_cost_nl in let cost_sl := List.map (@snd _ _) sem_cost_sl in let sem_cost_h := sem_cost h sem_nl sem_sl in (fst sem_cost_h, snd sem_cost_h + plusl cost_nl + plusl cost_sl) end. Lemma sem_cost_correct : forall e n s, arities e = ok_arities n s -> forall vnl vsl, fst (sem_cost e vnl vsl) = sem e vnl vsl. Proof. (* Goal: forall (e : BC) (n s : nat) (_ : @eq Arities (arities e) (ok_arities n s)) (vnl vsl : list (list bool)), @eq (list bool) (@fst (list bool) nat (sem_cost e vnl vsl)) (sem e vnl vsl) *) refine (BC_ind_inf _ _ _ _ _ _ _ _); simpl; trivial; intros. (* Goal: @eq (list bool) (@fst (list bool) nat (sem_cost h (@map (prod (list bool) nat) (list bool) (@fst (list bool) nat) (@map BC (prod (list bool) nat) (fun ne : BC => sem_cost ne vnl (@nil (list bool))) rl)) (@map (prod (list bool) nat) (list bool) (@fst (list bool) nat) (@map BC (prod (list bool) nat) (fun se : BC => sem_cost se vnl vsl) tl)))) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) *) (* Goal: @eq (list bool) (@fst (list bool) nat (sem_cost_rec (sem_cost g) (sem_cost h0) (sem_cost h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl)) (sem_rec (sem g) (sem h0) (sem h1) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *) induction (hd nil vnl) as [ | [ | ] ]; simpl; trivial; congruence. (* Goal: @eq (list bool) (@fst (list bool) nat (sem_cost h (@map (prod (list bool) nat) (list bool) (@fst (list bool) nat) (@map BC (prod (list bool) nat) (fun ne : BC => sem_cost ne vnl (@nil (list bool))) rl)) (@map (prod (list bool) nat) (list bool) (@fst (list bool) nat) (@map BC (prod (list bool) nat) (fun se : BC => sem_cost se vnl vsl) tl)))) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) *) rewrite H2. (* Goal: @eq (list bool) (sem h (@map (prod (list bool) nat) (list bool) (@fst (list bool) nat) (@map BC (prod (list bool) nat) (fun ne : BC => sem_cost ne vnl (@nil (list bool))) rl)) (@map (prod (list bool) nat) (list bool) (@fst (list bool) nat) (@map BC (prod (list bool) nat) (fun se : BC => sem_cost se vnl vsl) tl))) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) *) do 2 rewrite map_map. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun x : BC => @fst (list bool) nat (sem_cost x vnl (@nil (list bool)))) rl) (@map BC (list bool) (fun x : BC => @fst (list bool) nat (sem_cost x vnl vsl)) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) *) clear H. (* Goal: @eq (list bool) (sem h (@map BC (list bool) (fun x : BC => @fst (list bool) nat (sem_cost x vnl (@nil (list bool)))) rl) (@map BC (list bool) (fun x : BC => @fst (list bool) nat (sem_cost x vnl vsl)) tl)) (sem h (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) *) f_equal. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun x : BC => @fst (list bool) nat (sem_cost x vnl vsl)) tl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) *) (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun x : BC => @fst (list bool) nat (sem_cost x vnl (@nil (list bool)))) rl) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl) *) induction rl; simpl; intros; trivial. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun x : BC => @fst (list bool) nat (sem_cost x vnl vsl)) tl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) *) (* Goal: @eq (list (list bool)) (@cons (list bool) (@fst (list bool) nat (sem_cost a vnl (@nil (list bool)))) (@map BC (list bool) (fun x : BC => @fst (list bool) nat (sem_cost x vnl (@nil (list bool)))) rl)) (@cons (list bool) (sem a vnl (@nil (list bool))) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) rl)) *) rewrite H3, IHrl; auto with *. (* Goal: @eq (list (list bool)) (@map BC (list bool) (fun x : BC => @fst (list bool) nat (sem_cost x vnl vsl)) tl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl) *) induction tl; simpl; intros; trivial. (* Goal: @eq (list (list bool)) (@cons (list bool) (@fst (list bool) nat (sem_cost a vnl vsl)) (@map BC (list bool) (fun x : BC => @fst (list bool) nat (sem_cost x vnl vsl)) tl)) (@cons (list bool) (sem a vnl vsl) (@map BC (list bool) (fun se : BC => sem se vnl vsl) tl)) *) rewrite H4, IHtl; auto with *. Qed. Variable ptime_zero ptime_succ ptime_pred ptime_cond: pol. Variable ptime_proj : nat -> nat -> nat -> pol. Hypothesis ptime_zero_spec : snd (sem_cost zero nil nil) <= peval ptime_zero nil. Hypothesis ptime_zero_wf : pWF ptime_zero. Hypothesis ptime_zero_arity : parity ptime_zero = 0. Hypothesis ptime_succ_spec : forall b, snd (sem_cost (succ b) nil nil) <= peval ptime_succ nil. Hypothesis ptime_succ_wf : pWF ptime_succ. Hypothesis ptime_succ_arity : parity ptime_succ = 0. Hypothesis ptime_proj_spec : forall n s i l, length l = n -> snd (sem_cost (proj n s i) l nil) <= peval (ptime_proj n s i) (map (@length _) l). Hypothesis ptime_proj_wf : forall n s i, pWF (ptime_proj n s i). Hypothesis ptime_proj_arity : forall n s i, parity (ptime_proj n s i) = n. Hypothesis ptime_cond_spec : snd (sem_cost cond nil nil) <= peval ptime_cond nil. Hypothesis ptime_cond_wf : pWF ptime_cond. Hypothesis ptime_cond_arity : parity ptime_cond = 0. Hypothesis ptime_pred_spec : snd (sem_cost pred nil nil) <= peval ptime_pred nil. Hypothesis ptime_pred_wf : pWF ptime_pred. Hypothesis ptime_pred_arity : parity ptime_pred = 0. Fixpoint poly_time n (e:BC) : pol := match e with | zero => ptime_zero | succ _ => ptime_succ | pred => ptime_pred | cond => ptime_cond | proj n s i => ptime_proj n s i | rec g h0 h1 => pplus (pshift (poly_time (n - 1) g)) (pmult (pproj n 0) (pplus (poly_time n h0) (poly_time n h1))) | comp n0 s h rl tl => pplus (pplus (pcst n0 0) (pcomp (poly_time (length rl) h) (map (poly_BC n0) rl))) (pplus (pplusl (map (poly_time n0) rl)) (pplusl (map (poly_time n0) tl))) end. Lemma poly_time_WF : forall e n s, arities e = ok_arities n s -> pWF (poly_time n e). Proof. (* Goal: forall (e : BC) (n s : nat) (_ : @eq Arities (arities e) (ok_arities n s)), pWF (poly_time n e) *) refine (BC_ind_inf _ _ _ _ _ _ _ _); simpl; trivial; intros; try pWF; auto. (* Goal: pWF x *) (* Goal: pWF x *) (* Goal: pWF x *) (* Goal: pWF (poly_time (Init.Nat.sub n O) g) *) rewrite <- minus_n_O; auto. (* Goal: pWF x *) (* Goal: pWF x *) (* Goal: pWF x *) apply in_map_iff in H5. (* Goal: pWF x *) (* Goal: pWF x *) (* Goal: pWF x *) destruct H5 as [e2 [H5 H7] ]; subst. (* Goal: pWF x *) (* Goal: pWF x *) (* Goal: pWF (poly_BC n e2) *) eapply pWF_poly_BC; eauto. (* Goal: pWF x *) (* Goal: pWF x *) apply in_map_iff in H5. (* Goal: pWF x *) (* Goal: pWF x *) destruct H5 as [e2 [H5 H7] ]; subst; auto. (* Goal: pWF x *) apply in_map_iff in H5. (* Goal: pWF x *) destruct H5 as [e2 [H5 H7] ]; subst; auto. Qed. Lemma arity_poly_time : forall e n s, arities e = ok_arities n s -> parity (poly_time n e) = n. Proof. (* Goal: forall (e : BC) (n s : nat) (_ : @eq Arities (arities e) (ok_arities n s)), @eq nat (@fst nat (list mon) (poly_time n e)) n *) apply BC_ind_inf; simpl; intros; auto. (* Goal: @eq nat (Init.Nat.max (Init.Nat.max n (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) rl)))) (Init.Nat.max (@fst nat (list mon) (pplusl (@map BC pol (poly_time n) rl))) (@fst nat (list mon) (pplusl (@map BC pol (poly_time n) tl))))) n *) (* Goal: @eq nat match match Init.Nat.max (@fst nat (list mon) (poly_time (S n) h0)) (@fst nat (list mon) (poly_time (S n) h1)) with | O => S n | S m' => S (Init.Nat.max n m') end with | O => S (@fst nat (list mon) (poly_time (Init.Nat.sub n O) g)) | S m' => S (Init.Nat.max (@fst nat (list mon) (poly_time (Init.Nat.sub n O) g)) m') end (S n) *) rewrite H3, H4, <- minus_n_O, H2. (* Goal: @eq nat (Init.Nat.max (Init.Nat.max n (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) rl)))) (Init.Nat.max (@fst nat (list mon) (pplusl (@map BC pol (poly_time n) rl))) (@fst nat (list mon) (pplusl (@map BC pol (poly_time n) tl))))) n *) (* Goal: @eq nat match match Init.Nat.max (S n) (S n) with | O => S n | S m' => S (Init.Nat.max n m') end with | O => S n | S m' => S (Init.Nat.max n m') end (S n) *) rewrite !Nat.max_idempotent; trivial. (* Goal: @eq nat (Init.Nat.max (Init.Nat.max n (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map BC pol (poly_BC n) rl)))) (Init.Nat.max (@fst nat (list mon) (pplusl (@map BC pol (poly_time n) rl))) (@fst nat (list mon) (pplusl (@map BC pol (poly_time n) tl))))) n *) rewrite !parity_pplusl, !map_map. (* Goal: @eq nat (Init.Nat.max (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) (Init.Nat.max (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) rl)) (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) tl)))) n *) rewrite max_l; auto. (* Goal: le (Init.Nat.max (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) rl)) (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) tl))) (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) (* Goal: @eq nat (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) n *) rewrite max_l; auto. (* Goal: le (Init.Nat.max (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) rl)) (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) tl))) (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) (* Goal: le (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl)) n *) apply maxl_map; intros. (* Goal: le (Init.Nat.max (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) rl)) (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) tl))) (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) (* Goal: @eq nat (@fst nat (list mon) (poly_BC n x)) n *) eapply arity_poly_BC; eauto. (* Goal: le (Init.Nat.max (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) rl)) (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) tl))) (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) apply Nat.max_lub. (* Goal: le (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) tl)) (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) (* Goal: le (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) rl)) (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) apply maxl_bound_in; intros. (* Goal: le (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) tl)) (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) (* Goal: le e' (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) rewrite in_map_iff in H5. (* Goal: le (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) tl)) (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) (* Goal: le e' (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) destruct H5 as [p [Hp1 Hp2]]. (* Goal: le (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) tl)) (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) (* Goal: le e' (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) rewrite <- Hp1. (* Goal: le (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) tl)) (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) (* Goal: le (@fst nat (list mon) (poly_time n p)) (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) rewrite H3; trivial. (* Goal: le (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) tl)) (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) (* Goal: le n (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) apply Nat.le_max_l. (* Goal: le (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) tl)) (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) apply le_trans with n. (* Goal: le n (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) (* Goal: le (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_time n x)) tl)) n *) apply maxl_map; intros. (* Goal: le n (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) (* Goal: @eq nat (@fst nat (list mon) (poly_time n x)) n *) apply H4; auto. (* Goal: le n (Init.Nat.max n (maxl (@map BC nat (fun x : BC => @fst nat (list mon) (poly_BC n x)) rl))) *) apply Nat.le_max_l. Qed. Lemma sem_cost_bounded : forall e n s, arities e = ok_arities n s -> (forall vnl vsl, length vnl = n -> length vsl = s -> snd (sem_cost e vnl vsl) <= peval (poly_time n e) (List.map (@length _) vnl)). End TIME.
From Coq Require Import ssreflect ssrbool ssrfun Setoid. From mathcomp Require Import seq. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Set Warnings "-projection-no-head-constant". Lemma andTp p : True /\ p <-> p. Proof. by intuition. Qed. Proof. (* Goal: iff (and True p) p *) by intuition. Qed. Lemma andFp p : False /\ p <-> False. Proof. by intuition. Qed. Proof. (* Goal: iff (and False p) False *) by intuition. Qed. Lemma orTp p : True \/ p <-> True. Proof. by intuition. Qed. Proof. (* Goal: iff (or True p) True *) by intuition. Qed. Lemma orFp p : False \/ p <-> p. Proof. by intuition. Qed. Proof. (* Goal: iff (or False p) p *) by intuition. Qed. Delimit Scope rel_scope with rel. Open Scope rel_scope. Definition Pred T := T -> Prop. Identity Coercion fun_of_Pred : Pred >-> Funclass. Notation xPred0 := (fun _ => False). Notation xPred1 := (fun x y => x = y). Notation xPredT := (fun _ => True). Notation xPredI := (fun (p1 p2 : Pred _) x => p1 x /\ p2 x). Notation xPredU := (fun (p1 p2 : Pred _) x => p1 x \/ p2 x). Notation xPredC := (fun (p : Pred _) x => ~ p x). Notation xPredD := (fun (p1 p2 : Pred _) x => ~ p2 x /\ p1 x). Notation xPreim := (fun f (p : Pred _) x => p (f x)). Section Predicates. Variable T : Type. Definition Simpl_Pred := simpl_fun T Prop. Definition SimplPred (p : Pred T) : Simpl_Pred := SimplFun p. Coercion Pred_of_Simpl (p : Simpl_Pred) : Pred T := p : T -> Prop. Definition Pred0 := SimplPred xPred0. Definition Pred1 x := SimplPred (xPred1 x). Definition PredT := SimplPred xPredT. Definition PredI p1 p2 := SimplPred (xPredI p1 p2). Definition PredU p1 p2 := SimplPred (xPredU p1 p2). Definition PredC p := SimplPred (xPredC p). Definition PredD p1 p2 := SimplPred (xPredD p1 p2). Definition Preim rT f (d : Pred rT) := SimplPred (xPreim f d). CoInductive Mem_Pred : Type := MemProp of Pred T. Definition isMem pT toPred mem := mem = (fun p : pT => MemProp [eta toPred p]). Structure PredType : Type := PropPredType { Pred_Sort :> Type; toPred : Pred_Sort -> Pred T; _ : {mem | isMem toPred mem}}. Definition mkPredType pT toP := PropPredType (exist (@isMem pT toP) _ (erefl _)). Canonical Structure PredPredType := Eval hnf in @mkPredType (Pred T) id. Canonical Structure SimplPredPredType := Eval hnf in mkPredType Pred_of_Simpl. Coercion Pred_of_Mem mp : Pred_Sort PredPredType := let: MemProp p := mp in [eta p]. Canonical Structure MemPredType := Eval hnf in mkPredType Pred_of_Mem. Canonical Structure predPredType := Eval hnf in @mkPredType (pred T) id. Canonical Structure simplpredPredType := Eval hnf in @mkPredType (simpl_pred T) (fun p x => p x). End Predicates. Arguments Pred0 [T]. Arguments PredT [T]. Prenex Implicits Pred0 PredT PredI PredU PredC PredD Preim. Notation "r1 +p r2" := (PredU r1 r2 : Pred _) (at level 55, right associativity) : rel_scope. Notation "r1 *p r2" := (xPredI r1 r2 : Pred _) (at level 45, right associativity) : rel_scope. Notation "[ 'Pred' : T | E ]" := (SimplPred (fun _ : T => E)) (at level 0, format "[ 'Pred' : T | E ]") : fun_scope. Notation "[ 'Pred' x | E ]" := (SimplPred (fun x => E)) (at level 0, x ident, format "[ 'Pred' x | E ]") : fun_scope. Notation "[ 'Pred' x : T | E ]" := (SimplPred (fun x : T => E)) (at level 0, x ident, only parsing) : fun_scope. Notation "[ 'Pred' x y | E ]" := (SimplPred (fun t => let: (x, y) := t in E)) (at level 0, x ident, y ident, format "[ 'Pred' x y | E ]") : fun_scope. Notation "[ 'Pred' x y : T | E ]" := (SimplPred (fun t : (T*T) => let: (x, y) := t in E)) (at level 0, x ident, y ident, only parsing) : fun_scope. Definition repack_Pred T pT := let: PropPredType _ a mP := pT return {type of @PropPredType T for pT} -> _ in fun k => k a mP. Notation "[ 'PredType' 'of' T ]" := (repack_Pred (fun a => @PropPredType _ T a)) (at level 0, format "[ 'PredType' 'of' T ]") : form_scope. Notation Pred_Class := (Pred_Sort (PredPredType _)). Coercion Sort_of_Simpl_Pred T (p : Simpl_Pred T) : Pred_Class := p : Pred T. Definition PredArgType := Type. Coercion Pred_of_argType (T : PredArgType) : Simpl_Pred T := PredT. Notation "{ :: T }" := (T%type : PredArgType) (at level 0, format "{ :: T }") : type_scope. Definition Mem T (pT : PredType T) : pT -> Mem_Pred T := nosimpl (let: PropPredType _ _ (exist mem _) := pT return pT -> _ in mem). Definition InMem T x mp := nosimpl Pred_of_Mem T mp x. Prenex Implicits Mem. Coercion Pred_of_Mem_Pred T mp := [Pred x : T | InMem x mp]. Definition EqPredType T (pT : PredType T) (p1 p2 : pT) := forall x : T, toPred p1 x <-> toPred p2 x. Definition SubPredType T (pT : PredType T) (p1 p2 : pT) := forall x : T, toPred p1 x -> toPred p2 x. Definition EqSimplPred T (p1 p2 : Simpl_Pred T) := EqPredType p1 p2. Definition SubSimplPred T (p1 p2 : Simpl_Pred T) := SubPredType p1 p2. Definition EqPredFun T1 T2 (pT2 : PredType T2) p1 p2 := forall x : T1, @EqPredType T2 pT2 (p1 x) (p2 x). Definition SubPredFun T1 T2 (pT2 : PredType T2) p1 p2 := forall x : T1, @SubPredType T2 pT2 (p1 x) (p2 x). Definition EqMem T p1 p2 := forall x : T, InMem x p1 <-> InMem x p2. Definition SubMem T p1 p2 := forall x : T, InMem x p1 -> InMem x p2. Notation "A <~> B" := (@EqPredType _ _ A B) (at level 70, no associativity) : rel_scope. Notation "A ~> B" := (@SubPredType _ _ A B) (at level 70, no associativity) : rel_scope. Notation "A <~1> B" := (@EqPredFun _ _ _ A B) (at level 70, no associativity) : rel_scope. Notation "A ~1> B" := (@SubPredFun _ _ _ A B) (at level 70, no associativity) : rel_scope. Notation "x \In A" := (InMem x (Mem A)) (at level 70, no associativity) : rel_scope. Notation "x \Notin A" := (~ (x \In A)) (at level 70, no associativity) : rel_scope. Notation "A =p B" := (EqMem (Mem A) (Mem B)) (at level 70, no associativity) : type_scope. Notation "A <=p B" := (SubMem (Mem A) (Mem B)) (at level 70, no associativity) : type_scope. Notation "[ 'Mem' A ]" := (Pred_of_Simpl (Pred_of_Mem_Pred (Mem A))) (at level 0, only parsing) : fun_scope. Notation "[ 'PredI' A & B ]" := (PredI [Mem A] [Mem B]) (at level 0, format "[ 'PredI' A & B ]") : fun_scope. Notation "[ 'PredU' A & B ]" := (PredU [Mem A] [Mem B]) (at level 0, format "[ 'PredU' A & B ]") : fun_scope. Notation "[ 'PredD' A & B ]" := (PredD [Mem A] [Mem B]) (at level 0, format "[ 'PredD' A & B ]") : fun_scope. Notation "[ 'PredC' A ]" := (PredC [Mem A]) (at level 0, format "[ 'PredC' A ]") : fun_scope. Notation "[ 'Preim' f 'of' A ]" := (Preim f [Mem A]) (at level 0, format "[ 'Preim' f 'of' A ]") : fun_scope. Notation "[ 'Pred' x \In A ]" := [Pred x | x \In A] (at level 0, x ident, format "[ 'Pred' x \In A ]") : fun_scope. Notation "[ 'Pred' x \In A | E ]" := [Pred x | (x \In A) /\ E] (at level 0, x ident, format "[ 'Pred' x \In A | E ]") : fun_scope. Notation "[ 'Pred' x y \In A & B | E ]" := [Pred x y | (x \In A) /\ (y \In B) /\ E] (at level 0, x ident, y ident, format "[ 'Pred' x y \In A & B | E ]") : fun_scope. Notation "[ 'Pred' x y \In A & B ]" := [Pred x y | (x \In A) /\ (y \In B)] (at level 0, x ident, y ident, format "[ 'Pred' x y \In A & B ]") : fun_scope. Notation "[ 'Pred' x y \In A | E ]" := [Pred x y \In A & A | E] (at level 0, x ident, y ident, format "[ 'Pred' x y \In A | E ]") : fun_scope. Notation "[ 'Pred' x y \In A ]" := [Pred x y \In A & A] (at level 0, x ident, y ident, format "[ 'Pred' x y \In A ]") : fun_scope. Section Simplifications. Variables (T : Type) (pT : PredType T). Lemma Mem_toPred : forall (p : pT), Mem (toPred p) = Mem p. Proof. (* Goal: forall p : @Pred_Sort T pT, @eq (Mem_Pred T) (@Mem T (PredPredType T) (@toPred T pT p)) (@Mem T pT p) *) by rewrite /Mem; case: pT => T1 app1 [mem1 /= ->]. Qed. Lemma toPredE x (p : pT) : toPred p x = (x \In p). Proof. (* Goal: @eq Prop (@toPred T pT p x) (@InMem T x (@Mem T pT p)) *) by rewrite -Mem_toPred. Qed. Lemma In_Simpl x (p : Simpl_Pred T) : (x \In p) = p x. Proof. (* Goal: @eq Prop (@InMem T x (@Mem T (SimplPredPredType T) p)) (@Pred_of_Simpl T p x) *) by []. Qed. Lemma Simpl_PredE (p : Pred T) : p <~> [Pred x | p x]. Proof. (* Goal: @EqPredType T (PredPredType T) p (@Sort_of_Simpl_Pred T (@SimplPred T (fun x : T => p x))) *) by []. Qed. Lemma Mem_Simpl (p : Simpl_Pred T) : Mem p = p :> Pred T. Proof. (* Goal: @eq (Pred T) (@Pred_of_Simpl T (@Pred_of_Mem_Pred T (@Mem T (SimplPredPredType T) p))) (@Pred_of_Simpl T p) *) by []. Qed. Definition MemE := Mem_Simpl. Lemma Mem_Mem (p : pT) : (Mem (Mem p) = Mem p) * (Mem [Mem p] = Mem p). Proof. (* Goal: prod (@eq (Mem_Pred T) (@Mem T (MemPredType T) (@Mem T pT p)) (@Mem T pT p)) (@eq (Mem_Pred T) (@Mem T (PredPredType T) (@Pred_of_Simpl T (@Pred_of_Mem_Pred T (@Mem T pT p)))) (@Mem T pT p)) *) by rewrite -Mem_toPred. Qed. End Simplifications. Section RelProperties. Variables (T : Type) (pT : PredType T). Lemma EqPredType_refl (r : pT) : EqPredType r r. Proof. by []. Qed. Proof. (* Goal: @EqPredType T pT r r *) by []. Qed. Lemma EqPredType_sym (r1 r2 : pT) : EqPredType r1 r2 -> EqPredType r2 r1. Proof. (* Goal: forall _ : @EqPredType T pT r1 r2, @EqPredType T pT r2 r1 *) by move=>H1 x; split; move/H1. Qed. Lemma EqPredType_trans' (r1 r2 r3 : pT) : EqPredType r1 r2 -> EqPredType r2 r3 -> EqPredType r1 r3. Proof. (* Goal: forall (_ : @EqPredType T pT r1 r2) (_ : @EqPredType T pT r2 r3), @EqPredType T pT r1 r3 *) by move=>H1 H2 x; split; [move/H1; move/H2 | move/H2; move/H1]. Qed. Lemma SubPredType_trans' (r1 r2 r3 : pT) : SubPredType r1 r2 -> SubPredType r2 r3 -> SubPredType r1 r3. Proof. (* Goal: forall (_ : @SubPredType T pT r1 r2) (_ : @SubPredType T pT r2 r3), @SubPredType T pT r1 r3 *) by move=>H1 H2 x; move/H1; move/H2. Qed. Definition EqPredType_trans r2 r1 r3 := @EqPredType_trans' r1 r2 r3. Definition SubPredType_trans r2 r1 r3 := @SubPredType_trans' r1 r2 r3. Section RelLaws. Variable (T : Type). Lemma orrI (r : Pred nat) : r +p r <~> r. Proof. (* Goal: @EqPredType nat (PredPredType nat) (@Pred_of_Simpl nat (@PredU nat r r) : Pred nat) r *) by move=>x; split; [case | left]. Qed. Lemma orrC (r1 r2 : Pred T) : r1 +p r2 <~> r2 +p r1. Proof. (* Goal: @EqPredType T (PredPredType T) (@Pred_of_Simpl T (@PredU T r1 r2) : Pred T) (@Pred_of_Simpl T (@PredU T r2 r1) : Pred T) *) move=>x; split=>/=; tauto. Qed. Lemma orr0 (r : Pred T) : r +p Pred0 <~> r. Proof. (* Goal: @EqPredType T (PredPredType T) (@Pred_of_Simpl T (@PredU T r (@Pred_of_Simpl T (@Pred0 T))) : Pred T) r *) by move=>x; split; [case | left]. Qed. Lemma or0r (r : Pred T) : Pred0 +p r <~> r. Proof. (* Goal: @EqPredType T (PredPredType T) (@Pred_of_Simpl T (@PredU T (@Pred_of_Simpl T (@Pred0 T)) r) : Pred T) r *) by rewrite orrC orr0. Qed. Lemma orrCA (r1 r2 r3 : Pred T) : r1 +p r2 +p r3 <~> r2 +p r1 +p r3. Proof. (* Goal: @EqPredType T (PredPredType T) (@Pred_of_Simpl T (@PredU T r1 (@Pred_of_Simpl T (@PredU T r2 r3) : Pred T)) : Pred T) (@Pred_of_Simpl T (@PredU T r2 (@Pred_of_Simpl T (@PredU T r1 r3) : Pred T)) : Pred T) *) by move=>x; split=>/=; intuition. Qed. Lemma orrAC (r1 r2 r3 : Pred T) : (r1 +p r2) +p r3 <~> (r1 +p r3) +p r2. Proof. (* Goal: @EqPredType T (PredPredType T) (@Pred_of_Simpl T (@PredU T (@Pred_of_Simpl T (@PredU T r1 r2) : Pred T) r3) : Pred T) (@Pred_of_Simpl T (@PredU T (@Pred_of_Simpl T (@PredU T r1 r3) : Pred T) r2) : Pred T) *) by move=>?; split=>/=; intuition. Qed. Lemma orrA (r1 r2 r3 : Pred T) : (r1 +p r2) +p r3 <~> r1 +p r2 +p r3. Proof. (* Goal: @EqPredType T (PredPredType T) (@Pred_of_Simpl T (@PredU T (@Pred_of_Simpl T (@PredU T r1 r2) : Pred T) r3) : Pred T) (@Pred_of_Simpl T (@PredU T r1 (@Pred_of_Simpl T (@PredU T r2 r3) : Pred T)) : Pred T) *) by rewrite (orrC r2) orrCA orrC. Qed. Lemma orrAb (r1 a : Pred T) : r1 <~> r1 +p a <-> a ~> r1. Proof. (* Goal: iff (@EqPredType T (PredPredType T) r1 (@Pred_of_Simpl T (@PredU T r1 a) : Pred T)) (@SubPredType T (PredPredType T) a r1) *) split; first by move=>-> x /=; auto. (* Goal: forall _ : @SubPredType T (PredPredType T) a r1, @EqPredType T (PredPredType T) r1 (@Pred_of_Simpl T (@PredU T r1 a)) *) move=>H x /=; split; first by auto. (* Goal: forall _ : or (r1 x) (a x), r1 x *) by case=>//; move/H. Qed. Lemma sub_orl (r1 r2 : Pred T) : r1 ~> r1 +p r2. Proof. by left. Qed. Proof. (* Goal: @SubPredType T (PredPredType T) r1 (@Pred_of_Simpl T (@PredU T r1 r2) : Pred T) *) by left. Qed. End RelLaws. Section SubMemLaws. Variable T : Type. Lemma subp_refl (p : Pred T) : p <=p p. Proof. (* Goal: @SubMem T (@Mem T (PredPredType T) p) (@Mem T (PredPredType T) p) *) by []. Qed. Lemma subp_asym (p1 p2 : Pred T) : p1 <=p p2 -> p2 <=p p1 -> p1 =p p2. Proof. (* Goal: forall (_ : @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2)) (_ : @SubMem T (@Mem T (PredPredType T) p2) (@Mem T (PredPredType T) p1)), @EqMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2) *) by move=>H1 H2 x; split; [move/H1 | move/H2]. Qed. Lemma subp_trans (p2 p1 p3 : Pred T) : p1 <=p p2 -> p2 <=p p3 -> p1 <=p p3. Proof. (* Goal: forall (_ : @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2)) (_ : @SubMem T (@Mem T (PredPredType T) p2) (@Mem T (PredPredType T) p3)), @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p3) *) by move=>H1 H2 x; move/H1; move/H2. Qed. Lemma subp_or (p1 p2 q : Pred T) : p1 <=p q /\ p2 <=p q <-> p1 +p p2 <=p q. Proof. (* Goal: iff (and (@SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) q)) (@SubMem T (@Mem T (PredPredType T) p2) (@Mem T (PredPredType T) q))) (@SubMem T (@Mem T (PredPredType T) (@Pred_of_Simpl T (@PredU T p1 p2) : Pred T)) (@Mem T (PredPredType T) q)) *) split=>[[H1] H2 x|H1]; first by case; [move/H1 | move/H2]. (* Goal: and (@SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) q)) (@SubMem T (@Mem T (PredPredType T) p2) (@Mem T (PredPredType T) q)) *) by split=>x H2; apply: H1; [left | right]. Qed. Lemma subp_and (p1 p2 q : Pred T) : q <=p p1 /\ q <=p p2 <-> q <=p p1 *p p2. Proof. (* Goal: iff (and (@SubMem T (@Mem T (PredPredType T) q) (@Mem T (PredPredType T) p1)) (@SubMem T (@Mem T (PredPredType T) q) (@Mem T (PredPredType T) p2))) (@SubMem T (@Mem T (PredPredType T) q) (@Mem T (PredPredType T) ((fun (p3 p4 : Pred T) (x : T) => and (p3 x) (p4 x)) p1 p2 : Pred T))) *) split=>[[H1] H2 x|] H; last by split=>x; case/H. (* Goal: @InMem T x (@Mem T (PredPredType T) (fun x : T => and (p1 x) (p2 x))) *) by split; [apply: H1 | apply: H2]. Qed. Lemma subp_orl (p1 p2 q : Pred T) : p1 <=p p2 -> p1 +p q <=p p2 +p q. Proof. (* Goal: forall _ : @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2), @SubMem T (@Mem T (PredPredType T) (@Pred_of_Simpl T (@PredU T p1 q) : Pred T)) (@Mem T (PredPredType T) (@Pred_of_Simpl T (@PredU T p2 q) : Pred T)) *) by move=>H x; case; [move/H; left|right]. Qed. Lemma subp_orr (p1 p2 q : Pred T) : p1 <=p p2 -> q +p p1 <=p q +p p2. Proof. (* Goal: forall _ : @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2), @SubMem T (@Mem T (PredPredType T) (@Pred_of_Simpl T (@PredU T q p1) : Pred T)) (@Mem T (PredPredType T) (@Pred_of_Simpl T (@PredU T q p2) : Pred T)) *) by move=>H x; case; [left | move/H; right]. Qed. Lemma subp_andl (p1 p2 q : Pred T) : p1 <=p p2 -> p1 *p q <=p p2 *p q. Proof. (* Goal: forall _ : @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2), @SubMem T (@Mem T (PredPredType T) ((fun (p2 p3 : Pred T) (x : T) => and (p2 x) (p3 x)) p1 q : Pred T)) (@Mem T (PredPredType T) ((fun (p1 p3 : Pred T) (x : T) => and (p1 x) (p3 x)) p2 q : Pred T)) *) by by move=>H x [H1 H2]; split; [apply: H|]. Qed. Lemma subp_andr (p1 p2 q : Pred T) : p1 <=p p2 -> q *p p1 <=p q *p p2. Proof. (* Goal: forall _ : @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2), @SubMem T (@Mem T (PredPredType T) ((fun (p2 p3 : Pred T) (x : T) => and (p2 x) (p3 x)) q p1 : Pred T)) (@Mem T (PredPredType T) ((fun (p1 p3 : Pred T) (x : T) => and (p1 x) (p3 x)) q p2 : Pred T)) *) by move=>H x [H1 H2]; split; [|apply: H]. Qed. End SubMemLaws. Hint Resolve subp_refl : core. Section ListMembership. Variable T : Type. Fixpoint Mem_Seq (s : seq T) := if s is y::s' then (fun x => x = y \/ Mem_Seq s' x) else xPred0. Definition EqSeq_Class := seq T. Identity Coercion seq_of_EqSeq : EqSeq_Class >-> seq. Coercion Pred_of_Eq_Seq (s : EqSeq_Class) : Pred_Class := [eta Mem_Seq s]. Canonical Structure seq_PredType := @mkPredType T (seq T) Pred_of_Eq_Seq. Canonical Structure Mem_Seq_PredType := mkPredType Mem_Seq. Lemma In_cons y s x : (x \In y :: s) <-> (x = y) \/ (x \In s). Proof. (* Goal: iff (@InMem T x (@Mem T seq_PredType (@cons T y s))) (or (@eq T x y) (@InMem T x (@Mem T seq_PredType s))) *) by []. Qed. Lemma In_nil x : (x \In [::]) <-> False. Proof. (* Goal: iff (@InMem T x (@Mem T seq_PredType (@nil T))) False *) by []. Qed. Lemma Mem_Seq1 x y : (x \In [:: y]) <-> (x = y). Proof. (* Goal: iff (@InMem T x (@Mem T seq_PredType (@cons T y (@nil T)))) (@eq T x y) *) by rewrite In_cons orpF. Qed. Definition InE := (Mem_Seq1, In_cons, In_Simpl). Lemma Mem_cat x : forall s1 s2, (x \In s1 ++ s2) <-> x \In s1 \/ x \In s2. Proof. (* Goal: forall s1 s2 : list T, iff (@InMem T x (@Mem T seq_PredType (@cat T s1 s2))) (or (@InMem T x (@Mem T seq_PredType s1)) (@InMem T x (@Mem T seq_PredType s2))) *) elim=>[|y s1 IH] s2 /=; first by split; [right | case]. (* Goal: iff (@InMem T x (@Mem T seq_PredType (@cons T y (@cat T s1 s2)))) (or (@InMem T x (@Mem T seq_PredType (@cons T y s1))) (@InMem T x (@Mem T seq_PredType s2))) *) rewrite !InE /=. (* Goal: iff (or (@eq T x y) (@InMem T x (@Mem T seq_PredType (@cat T s1 s2)))) (or (or (@eq T x y) (@InMem T x (@Mem T seq_PredType s1))) (@InMem T x (@Mem T seq_PredType s2))) *) split. (* Goal: forall _ : or (or (@eq T x y) (@InMem T x (@Mem T seq_PredType s1))) (@InMem T x (@Mem T seq_PredType s2)), or (@eq T x y) (@InMem T x (@Mem T seq_PredType (@cat T s1 s2))) *) (* Goal: forall _ : or (@eq T x y) (@InMem T x (@Mem T seq_PredType (@cat T s1 s2))), or (or (@eq T x y) (@InMem T x (@Mem T seq_PredType s1))) (@InMem T x (@Mem T seq_PredType s2)) *) - (* Goal: forall _ : or (or (@eq T x y) (@InMem T x (@Mem T seq_PredType s1))) (@InMem T x (@Mem T seq_PredType s2)), or (@eq T x y) (@InMem T x (@Mem T seq_PredType (@cat T s1 s2))) *) (* Goal: forall _ : or (@eq T x y) (@InMem T x (@Mem T seq_PredType (@cat T s1 s2))), or (or (@eq T x y) (@InMem T x (@Mem T seq_PredType s1))) (@InMem T x (@Mem T seq_PredType s2)) *) case=>[->|/IH]; first by left; left. (* Goal: forall _ : or (or (@eq T x y) (@InMem T x (@Mem T seq_PredType s1))) (@InMem T x (@Mem T seq_PredType s2)), or (@eq T x y) (@InMem T x (@Mem T seq_PredType (@cat T s1 s2))) *) (* Goal: forall _ : or (@InMem T x (@Mem T seq_PredType s1)) (@InMem T x (@Mem T seq_PredType s2)), or (or (@eq T x y) (@InMem T x (@Mem T seq_PredType s1))) (@InMem T x (@Mem T seq_PredType s2)) *) by case; [left; right | right]. (* Goal: forall _ : or (or (@eq T x y) (@InMem T x (@Mem T seq_PredType s1))) (@InMem T x (@Mem T seq_PredType s2)), or (@eq T x y) (@InMem T x (@Mem T seq_PredType (@cat T s1 s2))) *) case; first by case; [left | move=>H; right; apply/IH; left]. (* Goal: forall _ : @InMem T x (@Mem T seq_PredType s2), or (@eq T x y) (@InMem T x (@Mem T seq_PredType (@cat T s1 s2))) *) by move=>H; right; apply/IH; right. Qed. Lemma In_split x s : x \In s -> exists s1 s2, s = s1 ++ x :: s2. Proof. (* Goal: forall _ : @InMem T x (@Mem T seq_PredType s), @ex (list T) (fun s1 : list T => @ex (list T) (fun s2 : list T => @eq (@Pred_Sort T seq_PredType) s (@cat T s1 (@cons T x s2)))) *) elim:s=>[|y s IH] //=; rewrite InE. (* Goal: forall _ : or (@eq T x y) (@InMem T x (@Mem T seq_PredType s)), @ex (list T) (fun s1 : list T => @ex (list T) (fun s2 : list T => @eq (list T) (@cons T y s) (@cat T s1 (@cons T x s2)))) *) case=>[<-|]; first by exists [::], s. (* Goal: forall _ : @InMem T x (@Mem T seq_PredType s), @ex (list T) (fun s1 : list T => @ex (list T) (fun s2 : list T => @eq (list T) (@cons T y s) (@cat T s1 (@cons T x s2)))) *) by case/IH=>s1 [s2 ->]; exists (y :: s1), s2. Qed. End ListMembership. Lemma Mem_map T T' (f : T -> T') x (s : seq T) : x \In s -> f x \In (map f s). Proof. (* Goal: forall _ : @InMem T x (@Mem T (seq_PredType T) s), @InMem T' (f x) (@Mem T' (seq_PredType T') (@map T T' f s)) *) elim: s=>[|y s IH] //; rewrite InE /=. (* Goal: forall _ : or (@eq T x y) (@InMem T x (@Mem T (seq_PredType T) s)), @InMem T' (f x) (@Mem T' (seq_PredType T') (@cons T' (f y) (@map T T' f s))) *) by case=>[<-|/IH]; [left | right]. Qed. Lemma Mem_map_inv T T' (f : T -> T') x (s : seq T) : x \In (map f s) -> exists y, x = f y /\ y \In s. Proof. (* Goal: forall _ : @InMem T' x (@Mem T' (seq_PredType T') (@map T T' f s)), @ex T (fun y : T => and (@eq T' x (f y)) (@InMem T y (@Mem T (seq_PredType T) s))) *) elim: s=>[|y s IH] //=; rewrite InE /=. (* Goal: forall _ : or (@eq T' x (f y)) (@InMem T' x (@Mem T' (seq_PredType T') (@map T T' f s))), @ex T (fun y0 : T => and (@eq T' x (f y0)) (@InMem T y0 (@Mem T (seq_PredType T) (@cons T y s)))) *) case; first by move=>->; exists y; split=>//; left. (* Goal: forall _ : @InMem T' x (@Mem T' (seq_PredType T') (@map T T' f s)), @ex T (fun y0 : T => and (@eq T' x (f y0)) (@InMem T y0 (@Mem T (seq_PredType T) (@cons T y s)))) *) by case/IH=>z [->]; exists z; split=>//; right. Qed. Lemma eqfun_sym A B (f1 f2 : A -> B) : f1 =1 f2 -> f2 =1 f1. Proof. (* Goal: forall _ : @eqfun B A f1 f2, @eqfun B A f2 f1 *) by move=>H x; rewrite H. Qed. Lemma eqfun_trans A B (f1 f2 f3 : A -> B) : f1 =1 f2 -> f2 =1 f3 -> f1 =1 f3. Proof. (* Goal: forall (_ : @eqfun B A f1 f2) (_ : @eqfun B A f2 f3), @eqfun B A f1 f3 *) by move=>H1 H2 x; rewrite H1 H2. Qed. Add Parametric Relation A B : (A -> B) (@eqfun _ _) reflexivity proved by (@eqfun_refl A B) symmetry proved by (@eqfun_sym A B) transitivity proved by (@eqfun_trans A B) as eqfun_morph. Section Image. Variables (A B : Type) (P : Pred A) (f : A -> B). Inductive image_spec b : Prop := Im_mem a of b = f a & a \In P. Definition Image' : Pred B := image_spec. End Image. Notation Image f P := (Image' P f). Notation "[ 'Image' E | i <- s ]" := (Image (fun i => E) s) (at level 0, E at level 99, i ident, format "[ '[hv' 'Image' E '/ ' | i <- s ] ']'") : rel_scope. Notation "[ 'Image' E | i <- s & C ]" := [Image E | i <- [PredI s & C]] (at level 0, E at level 99, i ident, format "[ '[hv' 'Image' E '/ ' | i <- s '/ ' & C ] ']'") : rel_scope. Notation "[ 'Image' E | i : T <- s ]" := (Image (fun i : T => E) s) (at level 0, E at level 99, i ident, only parsing) : rel_scope. Notation "[ 'Image' E | i : T <- s & C ]" := [Image E | i : T <- [PredI s & C]] (at level 0, E at level 99, i ident, only parsing) : rel_scope. Lemma Image_mem A B (f : A -> B) (P : Pred A) x : x \In P -> f x \In Image f P. Proof. (* Goal: forall _ : @InMem A x (@Mem A (PredPredType A) P), @InMem B (f x) (@Mem B (PredPredType B) (@Image' A B P f)) *) by apply: Im_mem. Qed. Lemma Image_inj_sub A B (f : A -> B) (X1 X2 : Pred A) : injective f -> Image f X1 <=p Image f X2 -> X1 <=p X2. Proof. (* Goal: forall (_ : @injective B A f) (_ : @SubMem B (@Mem B (PredPredType B) (@Image' A B X1 f)) (@Mem B (PredPredType B) (@Image' A B X2 f))), @SubMem A (@Mem A (PredPredType A) X1) (@Mem A (PredPredType A) X2) *) by move=>H E x /(Image_mem f) /E [y] /H ->. Qed. Lemma Image_inj_eqmem A B (f : A -> B) (X1 X2 : Pred A) : injective f -> Image f X1 =p Image f X2 -> X1 =p X2. Proof. (* Goal: forall (_ : @injective B A f) (_ : @EqMem B (@Mem B (PredPredType B) (@Image' A B X1 f)) (@Mem B (PredPredType B) (@Image' A B X2 f))), @EqMem A (@Mem A (PredPredType A) X1) (@Mem A (PredPredType A) X2) *) by move=>H E; split; apply: Image_inj_sub H _ _; rewrite E. Qed. Lemma ImageU A B (f : A -> B) (X1 X2 : Pred A) : Image f (PredU X1 X2) =p [PredU Image f X1 & Image f X2]. Proof. (* Goal: @EqMem B (@Mem B (PredPredType B) (@Image' A B (@Pred_of_Simpl A (@PredU A X1 X2)) f)) (@Mem B (SimplPredPredType B) (@PredU B (@Pred_of_Simpl B (@Pred_of_Mem_Pred B (@Mem B (PredPredType B) (@Image' A B X1 f)))) (@Pred_of_Simpl B (@Pred_of_Mem_Pred B (@Mem B (PredPredType B) (@Image' A B X2 f)))))) *) move=>x; split. (* Goal: forall _ : @InMem B x (@Mem B (SimplPredPredType B) (@PredU B (@Pred_of_Simpl B (@Pred_of_Mem_Pred B (@Mem B (PredPredType B) (@Image' A B X1 f)))) (@Pred_of_Simpl B (@Pred_of_Mem_Pred B (@Mem B (PredPredType B) (@Image' A B X2 f)))))), @InMem B x (@Mem B (PredPredType B) (@Image' A B (@Pred_of_Simpl A (@PredU A X1 X2)) f)) *) (* Goal: forall _ : @InMem B x (@Mem B (PredPredType B) (@Image' A B (@Pred_of_Simpl A (@PredU A X1 X2)) f)), @InMem B x (@Mem B (SimplPredPredType B) (@PredU B (@Pred_of_Simpl B (@Pred_of_Mem_Pred B (@Mem B (PredPredType B) (@Image' A B X1 f)))) (@Pred_of_Simpl B (@Pred_of_Mem_Pred B (@Mem B (PredPredType B) (@Image' A B X2 f)))))) *) - (* Goal: forall _ : @InMem B x (@Mem B (SimplPredPredType B) (@PredU B (@Pred_of_Simpl B (@Pred_of_Mem_Pred B (@Mem B (PredPredType B) (@Image' A B X1 f)))) (@Pred_of_Simpl B (@Pred_of_Mem_Pred B (@Mem B (PredPredType B) (@Image' A B X2 f)))))), @InMem B x (@Mem B (PredPredType B) (@Image' A B (@Pred_of_Simpl A (@PredU A X1 X2)) f)) *) (* Goal: forall _ : @InMem B x (@Mem B (PredPredType B) (@Image' A B (@Pred_of_Simpl A (@PredU A X1 X2)) f)), @InMem B x (@Mem B (SimplPredPredType B) (@PredU B (@Pred_of_Simpl B (@Pred_of_Mem_Pred B (@Mem B (PredPredType B) (@Image' A B X1 f)))) (@Pred_of_Simpl B (@Pred_of_Mem_Pred B (@Mem B (PredPredType B) (@Image' A B X2 f)))))) *) by case=>y -> [H|H]; [left | right]; apply: Image_mem. (* Goal: forall _ : @InMem B x (@Mem B (SimplPredPredType B) (@PredU B (@Pred_of_Simpl B (@Pred_of_Mem_Pred B (@Mem B (PredPredType B) (@Image' A B X1 f)))) (@Pred_of_Simpl B (@Pred_of_Mem_Pred B (@Mem B (PredPredType B) (@Image' A B X2 f)))))), @InMem B x (@Mem B (PredPredType B) (@Image' A B (@Pred_of_Simpl A (@PredU A X1 X2)) f)) *) by case; case=>y -> H; apply: Image_mem; [left | right]. Qed. Lemma ImageIm A B C (f1 : B -> C) (f2 : A -> B) (X : Pred A) : Image f1 (Image f2 X) =p Image (f1 \o f2) X. Proof. (* Goal: @EqMem C (@Mem C (PredPredType C) (@Image' B C (@Image' A B X f2) f1)) (@Mem C (PredPredType C) (@Image' A C X (@funcomp C B A tt f1 f2))) *) move=>x; split; first by case=>_ -> [x' ->] H; exists x'. (* Goal: forall _ : @InMem C x (@Mem C (PredPredType C) (@Image' A C X (@funcomp C B A tt f1 f2))), @InMem C x (@Mem C (PredPredType C) (@Image' B C (@Image' A B X f2) f1)) *) by case=>a -> H; exists (f2 a)=>//; exists a. Qed. Lemma ImageEq A B (f1 f2 : A -> B) (X : Pred A) : f1 =1 f2 -> Image f1 X =p Image f2 X. Proof. (* Goal: forall _ : @eqfun B A f1 f2, @EqMem B (@Mem B (PredPredType B) (@Image' A B X f1)) (@Mem B (PredPredType B) (@Image' A B X f2)) *) by move=>H x; split; case=>a ->; exists a. Qed.
Require Export GeoCoq.Elements.OriginalProofs.lemma_betweennotequal. Require Export GeoCoq.Elements.OriginalProofs.lemma_congruencesymmetric. Section Euclid. Context `{Ax:euclidean_neutral}. Lemma lemma_extensionunique : forall A B E F, BetS A B E -> BetS A B F -> Cong B E B F -> eq E F. Proof. (* Goal: forall (A B E F : @Point Ax) (_ : @BetS Ax A B E) (_ : @BetS Ax A B F) (_ : @Cong Ax B E B F), @eq Ax E F *) intros. (* Goal: @eq Ax E F *) assert (Cong B E B E) by (conclude cn_congruencereflexive). (* Goal: @eq Ax E F *) assert (Cong B F B E) by (conclude lemma_congruencesymmetric). (* Goal: @eq Ax E F *) assert (Cong A E A E) by (conclude cn_congruencereflexive). (* Goal: @eq Ax E F *) assert (Cong A B A B) by (conclude cn_congruencereflexive). (* Goal: @eq Ax E F *) assert (Cong B E B F) by (conclude lemma_congruencesymmetric). (* Goal: @eq Ax E F *) assert (Cong E E E F) by (conclude axiom_5_line). (* Goal: @eq Ax E F *) assert (Cong E F E E) by (conclude lemma_congruencesymmetric). (* Goal: @eq Ax E F *) assert (~ neq E F). (* Goal: @eq Ax E F *) (* Goal: not (@neq Ax E F) *) { (* Goal: not (@neq Ax E F) *) intro. (* Goal: False *) assert (neq E E) by (conclude axiom_nocollapse). (* Goal: False *) assert (eq E E) by (conclude cn_equalityreflexive). (* Goal: False *) contradict. (* BG Goal: @eq Ax E F *) } (* Goal: @eq Ax E F *) close. Qed. End Euclid.
Require Import TS. Require Import sur_les_relations. Require Import sigma_lift. Require Import lambda_sigma_lift. Require Import betapar. Definition e_slstar_bp_slstar (b : wsort) := explicit_comp_rel _ (e_relSLstar b) (explicit_comp_rel _ (e_beta_par b) (e_relSLstar b)). Notation slstar_bp_slstar := (e_slstar_bp_slstar _) (only parsing). Hint Unfold e_slstar_bp_slstar. Goal forall a a' b b' : terms, e_beta_par _ b b' -> e_slstar_bp_slstar _ a a' -> e_slstar_bp_slstar _ (app a b) (app a' b'). simple induction 2; intros. red in |- *; apply comp_2rel with (app y b). auto. elim H2; intros. apply comp_2rel with (app y0 b'); auto. Save slbpsl_context_app_l. Hint Resolve slbpsl_context_app_l. Goal forall a a' b b' : terms, e_beta_par _ a a' -> e_slstar_bp_slstar _ b b' -> e_slstar_bp_slstar _ (app a b) (app a' b'). simple induction 2; intros. red in |- *; apply comp_2rel with (app a y). auto. elim H2; intros. apply comp_2rel with (app a' y0); auto. Save slbpsl_context_app_r. Hint Resolve slbpsl_context_app_r. Goal forall a b a' b' : terms, e_beta_par _ b b' -> e_slstar_bp_slstar _ a a' -> e_slstar_bp_slstar _ (app (lambda a) b) (env a' (cons b' id)). simple induction 2; intros. red in |- *; apply comp_2rel with (app (lambda y) b). auto. elim H2; intros. apply comp_2rel with (env y0 (cons b' id)); auto. Save slbpsl_context_beta_l. Hint Resolve slbpsl_context_beta_l. Goal forall a b a' b' : terms, e_beta_par _ a a' -> e_slstar_bp_slstar _ b b' -> e_slstar_bp_slstar _ (app (lambda a) b) (env a' (cons b' id)). simple induction 2; intros. red in |- *; apply comp_2rel with (app (lambda a) y). auto. elim H2; intros. apply comp_2rel with (env a' (cons y0 id)); auto. Save slbpsl_context_beta_r. Hint Resolve slbpsl_context_beta_r. Goal forall a a' : terms, e_slstar_bp_slstar _ a a' -> e_slstar_bp_slstar _ (lambda a) (lambda a'). simple induction 1; intros. red in |- *; apply comp_2rel with (lambda y). auto. elim H1; intros. apply comp_2rel with (lambda y0); auto. Save slbpsl_context_lambda. Hint Resolve slbpsl_context_lambda. Goal forall (a a' : terms) (s s' : sub_explicits), e_beta_par _ s s' -> e_slstar_bp_slstar _ a a' -> e_slstar_bp_slstar _ (env a s) (env a' s'). simple induction 2; intros. red in |- *; apply comp_2rel with (env y s). auto. elim H2; intros. apply comp_2rel with (env y0 s'); auto. Save slbpsl_context_env_t. Hint Resolve slbpsl_context_env_t. Goal forall (a a' : terms) (s s' : sub_explicits), e_beta_par _ a a' -> e_slstar_bp_slstar _ s s' -> e_slstar_bp_slstar _ (env a s) (env a' s'). simple induction 2; intros. red in |- *; apply comp_2rel with (env a y). auto. elim H2; intros. apply comp_2rel with (env a' y0); auto. Save slbpsl_context_env_s. Hint Resolve slbpsl_context_env_s. Goal forall (a a' : terms) (s s' : sub_explicits), e_beta_par _ s s' -> e_slstar_bp_slstar _ a a' -> e_slstar_bp_slstar _ (cons a s) (cons a' s'). simple induction 2; intros. red in |- *; apply comp_2rel with (cons y s). auto. elim H2; intros. apply comp_2rel with (cons y0 s'); auto. Save slbpsl_context_cons_t. Hint Resolve slbpsl_context_cons_t. Goal forall (a a' : terms) (s s' : sub_explicits), e_beta_par _ a a' -> e_slstar_bp_slstar _ s s' -> e_slstar_bp_slstar _ (cons a s) (cons a' s'). simple induction 2; intros. red in |- *; apply comp_2rel with (cons a y). auto. elim H2; intros. apply comp_2rel with (cons a' y0); auto. Save slbpsl_context_cons_s. Hint Resolve slbpsl_context_cons_s. Goal forall s s' t t' : sub_explicits, e_beta_par _ t t' -> e_slstar_bp_slstar _ s s' -> e_slstar_bp_slstar _ (comp s t) (comp s' t'). simple induction 2; intros. red in |- *; apply comp_2rel with (comp y t). auto. elim H2; intros. apply comp_2rel with (comp y0 t'); auto. Save slbpsl_context_comp_l. Hint Resolve slbpsl_context_comp_l. Goal forall s s' t t' : sub_explicits, e_beta_par _ s s' -> e_slstar_bp_slstar _ t t' -> e_slstar_bp_slstar _ (comp s t) (comp s' t'). simple induction 2; intros. red in |- *; apply comp_2rel with (comp s y). auto. elim H2; intros. apply comp_2rel with (comp s' y0); auto. Save slbpsl_context_comp_r. Hint Resolve slbpsl_context_comp_r. Goal forall s s' : sub_explicits, e_slstar_bp_slstar _ s s' -> e_slstar_bp_slstar _ (lift s) (lift s'). simple induction 1; intros. red in |- *; apply comp_2rel with (lift y). auto. elim H1; intros. apply comp_2rel with (lift y0); auto. Save slbpsl_context_lift. Hint Resolve slbpsl_context_lift. Goal forall (b : wsort) (M N : TS b), e_beta_par _ M N -> e_slstar_bp_slstar _ M N. intros; red in |- *; apply comp_2rel with M. red in |- *; auto. apply comp_2rel with N; auto. Save betapar_slbpsl. Hint Resolve betapar_slbpsl. Goal forall (b : wsort) (M : TS b), e_slstar_bp_slstar _ M M. auto. Save refl_slbpsl. Hint Resolve refl_slbpsl. Goal forall b : wsort, explicit_inclus _ (e_relLSL b) (e_slstar_bp_slstar b). red in |- *; simple induction 1; auto. simple induction 1; auto. simple induction 1; auto. intros b1 M0 N0 H1; red in |- *; apply comp_2rel with N0. auto. apply comp_2rel with N0; auto. Save relLSL_inclus_slbpsl. Hint Resolve relLSL_inclus_slbpsl. Goal forall b : wsort, explicit_inclus _ (e_beta_par b) (e_relLSLstar b). red in |- *; simple induction 1; intros; auto. red in |- *; apply star_trans1 with (env M (cons N id)). auto. change (e_relLSLstar _ (env M (cons N id)) (env M' (cons N' id))) in |- *; auto. Save betapar_inclus_relSLstar. Hint Resolve betapar_inclus_relSLstar. Goal forall b : wsort, explicit_inclus _ (e_relSL b) (e_relLSL b). red in |- *; simple induction 1; auto. Save relSL_inclus_relLSL. Hint Resolve relSL_inclus_relLSL. Goal forall b : wsort, explicit_inclus _ (e_slstar_bp_slstar b) (e_relLSLstar b). unfold e_slstar_bp_slstar in |- *; intro b. apply inclus_comp. change (explicit_inclus _ (explicit_star _ (e_relSL b)) (explicit_star _ (e_relLSL b))) in |- *; auto. apply inclus_comp. auto. change (explicit_inclus _ (explicit_star _ (e_relSL b)) (explicit_star _ (e_relLSL b))) in |- *; auto. intros; red in |- *; apply star_trans with y; assumption. intros; red in |- *; apply star_trans with y; assumption. Save slbpsl_inclus_relLSLstar. Hint Resolve slbpsl_inclus_relLSLstar.
From Coq Require Import ssreflect ssrbool ssrfun. From mathcomp Require Import ssrnat eqtype seq path fintype. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Module Ordered. Section RawMixin. Structure mixin_of (T : eqType) := Mixin {ordering : rel T; _ : irreflexive ordering; _ : transitive ordering; _ : forall x y, [|| ordering x y, x == y | ordering y x]}. End RawMixin. Section ClassDef. Record class_of (T : Type) := Class { base : Equality.class_of T; mixin : mixin_of (EqType T base)}. Local Coercion base : class_of >-> Equality.class_of. Structure type : Type := Pack {sort : Type; _ : class_of sort}. Local Coercion sort : type >-> Sortclass. Variables (T : Type) (cT : type). Definition class := let: Pack _ c as cT' := cT return class_of cT' in c. Definition clone c of phant_id class c := @Pack T c. Definition pack b (m0 : mixin_of (EqType T b)) := fun m & phant_id m0 m => Pack (@Class T b m). Definition eqType := Eval hnf in EqType cT class. End ClassDef. Module Exports. Coercion sort : type >-> Sortclass. Coercion eqType : type >-> Equality.type. Canonical Structure eqType. Notation ordType := Ordered.type. Notation OrdMixin := Mixin. Notation OrdType T m := (@pack T _ m _ id). Definition ord T : rel (sort T) := (ordering (mixin (class T))). Notation "[ 'ordType' 'of' T 'for' cT ]" := (@clone T cT _ id) (at level 0, format "[ 'ordType' 'of' T 'for' cT ]") : form_scope. Notation "[ 'ordType' 'of' T ]" := (@clone T _ _ id) (at level 0, format "[ 'ordType' 'of' T ]") : form_scope. End Exports. End Ordered. Export Ordered.Exports. Definition oleq (T : ordType) (t1 t2 : T) := ord t1 t2 || (t1 == t2). Prenex Implicits ord oleq. Section Lemmas. Variable T : ordType. Implicit Types x y : T. Lemma irr : irreflexive (@ord T). Proof. (* Goal: @irreflexive (Ordered.sort T) (@ord T) *) by case: T=>s [b [m]]. Qed. Lemma trans : transitive (@ord T). Proof. (* Goal: @transitive (Ordered.sort T) (@ord T) *) by case: T=>s [b [m]]. Qed. Lemma total x y : [|| ord x y, x == y | ord y x]. Proof. (* Goal: is_true (orb (@ord T x y) (orb (@eq_op (Ordered.eqType T) x y) (@ord T y x))) *) by case: T x y=>s [b [m]]. Qed. Lemma nsym x y : ord x y -> ord y x -> False. Proof. (* Goal: forall (_ : is_true (@ord T x y)) (_ : is_true (@ord T y x)), False *) by move=>E1 E2; move: (trans E1 E2); rewrite irr. Qed. Lemma orefl x : oleq x x. Proof. (* Goal: is_true (@oleq T x x) *) by rewrite /oleq eq_refl orbT. Qed. Lemma otrans : transitive (@oleq T). Proof. (* Goal: @transitive (Ordered.sort T) (@oleq T) *) move=>x y z /=; case/orP; last by move/eqP=>->. (* Goal: forall (_ : is_true (@ord T y x)) (_ : is_true (@oleq T x z)), is_true (@oleq T y z) *) rewrite /oleq; move=>T1; case/orP; first by move/(trans T1)=>->. (* Goal: forall _ : is_true (@eq_op (Ordered.eqType T) x z), is_true (orb (@ord T y z) (@eq_op (Ordered.eqType T) y z)) *) by move/eqP=><-; rewrite T1. Qed. Lemma sorted_oleq s : sorted (@ord T) s -> sorted (@oleq T) s. Proof. (* Goal: forall _ : is_true (@sorted (Ordered.eqType T) (@ord T) s), is_true (@sorted (Ordered.eqType T) (@oleq T) s) *) by elim: s=>[|x s IH] //=; apply: sub_path=>z y; rewrite /oleq=>->. Qed. End Lemmas. Hint Resolve orefl : core. Section Totality. Variable K : ordType. CoInductive total_spec (x y : K) : bool -> bool -> bool -> Type := | total_spec_lt of ord x y : total_spec x y true false false | total_spec_eq of x == y : total_spec x y false true false | total_spec_gt of ord y x : total_spec x y false false true. Lemma totalP x y : total_spec x y (ord x y) (x == y) (ord y x). Proof. (* Goal: total_spec x y (@ord K x y) (@eq_op (Ordered.eqType K) x y) (@ord K y x) *) case H1: (x == y). (* Goal: total_spec x y (@ord K x y) false (@ord K y x) *) (* Goal: total_spec x y (@ord K x y) true (@ord K y x) *) - (* Goal: total_spec x y (@ord K x y) false (@ord K y x) *) (* Goal: total_spec x y (@ord K x y) true (@ord K y x) *) by rewrite (eqP H1) irr; apply: total_spec_eq. (* Goal: total_spec x y (@ord K x y) false (@ord K y x) *) case H2: (ord x y); case H3: (ord y x). (* Goal: total_spec x y false false false *) (* Goal: total_spec x y false false true *) (* Goal: total_spec x y true false false *) (* Goal: total_spec x y true false true *) - (* Goal: total_spec x y false false false *) (* Goal: total_spec x y false false true *) (* Goal: total_spec x y true false false *) (* Goal: total_spec x y true false true *) by case: (nsym H2 H3). (* Goal: total_spec x y false false false *) (* Goal: total_spec x y false false true *) (* Goal: total_spec x y true false false *) - (* Goal: total_spec x y false false false *) (* Goal: total_spec x y false false true *) (* Goal: total_spec x y true false false *) by apply: total_spec_lt H2. (* Goal: total_spec x y false false false *) (* Goal: total_spec x y false false true *) - (* Goal: total_spec x y false false false *) (* Goal: total_spec x y false false true *) by apply: total_spec_gt H3. (* Goal: total_spec x y false false false *) by move: (total x y); rewrite H1 H2 H3. Qed. End Totality. Section Mono. Variables (A B :ordType). Definition strictly_increasing f x y := @ord A x y -> @ord B (f x) (f y). Structure mono : Type := Mono {fun_of: A -> B; _: forall x y, strictly_increasing fun_of x y}. End Mono. Arguments strictly_increasing {A B} f x y. Arguments Mono {A B _} _. Section NatOrd. Lemma irr_ltn_nat : irreflexive ltn. Proof. by move=>x; rewrite /= ltnn. Qed. Proof. (* Goal: @irreflexive nat (@rel_of_simpl_rel nat ltn) *) by move=>x; rewrite /= ltnn. Qed. Lemma total_ltn_nat x y : [|| x < y, x == y | y < x]. Proof. (* Goal: is_true (orb (leq (S x) y) (orb (@eq_op nat_eqType x y) (leq (S y) x))) *) by case: ltngtP. Qed. Definition nat_ordMixin := OrdMixin irr_ltn_nat trans_ltn_nat total_ltn_nat. Canonical Structure nat_ordType := OrdType nat nat_ordMixin. End NatOrd. Section ProdOrd. Variables K T : ordType. Definition lex : rel (K * T) := fun x y => if x.1 == y.1 then ord x.2 y.2 else ord x.1 y.1. Lemma irr_lex : irreflexive lex. Proof. (* Goal: @irreflexive (prod (Ordered.sort K) (Ordered.sort T)) lex *) by move=>x; rewrite /lex eq_refl irr. Qed. Lemma trans_lex : transitive lex. Proof. (* Goal: @transitive (prod (Ordered.sort K) (Ordered.sort T)) lex *) move=>[x1 x2][y1 y2][z1 z2]; rewrite /lex /=. (* Goal: forall (_ : is_true (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1)) (_ : is_true (if @eq_op (Ordered.eqType K) x1 z1 then @ord T x2 z2 else @ord K x1 z1)), is_true (if @eq_op (Ordered.eqType K) y1 z1 then @ord T y2 z2 else @ord K y1 z1) *) case: ifP=>H1; first by rewrite (eqP H1); case: eqP=>// _; apply: trans. (* Goal: forall (_ : is_true (@ord K y1 x1)) (_ : is_true (if @eq_op (Ordered.eqType K) x1 z1 then @ord T x2 z2 else @ord K x1 z1)), is_true (if @eq_op (Ordered.eqType K) y1 z1 then @ord T y2 z2 else @ord K y1 z1) *) case: ifP=>H2; first by rewrite (eqP H2) in H1 *; rewrite H1. (* Goal: forall (_ : is_true (@ord K y1 x1)) (_ : is_true (@ord K x1 z1)), is_true (if @eq_op (Ordered.eqType K) y1 z1 then @ord T y2 z2 else @ord K y1 z1) *) case: ifP=>H3; last by apply: trans. (* Goal: forall (_ : is_true (@ord K y1 x1)) (_ : is_true (@ord K x1 z1)), is_true (@ord T y2 z2) *) by rewrite (eqP H3)=>R1; move/(nsym R1). Qed. Lemma total_lex : forall x y, [|| lex x y, x == y | lex y x]. Proof. (* Goal: forall x y : prod (Ordered.sort K) (Ordered.sort T), is_true (orb (lex x y) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) x y) (lex y x))) *) move=>[x1 x2][y1 y2]; rewrite /lex /=. (* Goal: is_true (orb (if @eq_op (Ordered.eqType K) x1 y1 then @ord T x2 y2 else @ord K x1 y1) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) (@pair (Ordered.sort K) (Ordered.sort T) x1 x2) (@pair (Ordered.sort K) (Ordered.sort T) y1 y2)) (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1))) *) case: ifP=>H1. (* Goal: is_true (orb (@ord K x1 y1) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) (@pair (Ordered.sort K) (Ordered.sort T) x1 x2) (@pair (Ordered.sort K) (Ordered.sort T) y1 y2)) (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1))) *) (* Goal: is_true (orb (@ord T x2 y2) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) (@pair (Ordered.sort K) (Ordered.sort T) x1 x2) (@pair (Ordered.sort K) (Ordered.sort T) y1 y2)) (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1))) *) - (* Goal: is_true (orb (@ord K x1 y1) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) (@pair (Ordered.sort K) (Ordered.sort T) x1 x2) (@pair (Ordered.sort K) (Ordered.sort T) y1 y2)) (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1))) *) (* Goal: is_true (orb (@ord T x2 y2) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) (@pair (Ordered.sort K) (Ordered.sort T) x1 x2) (@pair (Ordered.sort K) (Ordered.sort T) y1 y2)) (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1))) *) rewrite (eqP H1) eq_refl -pair_eqE /= eq_refl /=; exact: total. (* Goal: is_true (orb (@ord K x1 y1) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) (@pair (Ordered.sort K) (Ordered.sort T) x1 x2) (@pair (Ordered.sort K) (Ordered.sort T) y1 y2)) (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1))) *) rewrite (eq_sym y1) -pair_eqE /= H1 /=. (* Goal: is_true (orb (@ord K x1 y1) (@ord K y1 x1)) *) by move: (total x1 y1); rewrite H1. Qed. Definition prod_ordMixin := OrdMixin irr_lex trans_lex total_lex. Canonical Structure prod_ordType := Eval hnf in OrdType (K * T) prod_ordMixin. End ProdOrd. Section FinTypeOrd. Variable T : finType. Definition ordf : rel T := fun x y => index x (enum T) < index y (enum T). Lemma irr_ordf : irreflexive ordf. Proof. (* Goal: @irreflexive (Finite.sort T) ordf *) by move=>x; rewrite /ordf ltnn. Qed. Lemma trans_ordf : transitive ordf. Proof. (* Goal: @transitive (Finite.sort T) ordf *) by move=>x y z; rewrite /ordf; apply: ltn_trans. Qed. Lemma total_ordf x y : [|| ordf x y, x == y | ordf y x]. Proof. (* Goal: is_true (orb (ordf x y) (orb (@eq_op (Finite.eqType T) x y) (ordf y x))) *) rewrite /ordf; case: ltngtP=>//= H; rewrite ?orbT ?orbF //. (* Goal: is_true (@eq_op (Finite.eqType T) x y) *) have [H1 H2]: x \in enum T /\ y \in enum T by rewrite !mem_enum. (* Goal: is_true (@eq_op (Finite.eqType T) x y) *) by rewrite -(nth_index x H1) -(nth_index x H2) H eq_refl. Qed. Definition fin_ordMixin := OrdMixin irr_ordf trans_ordf total_ordf. End FinTypeOrd. Notation "[ 'fin_ordMixin' 'of' T ]" := (fin_ordMixin _ : Ordered.mixin_of [eqType of T]) (at level 0). Definition ordinal_ordMixin n := [fin_ordMixin of 'I_n]. Canonical Structure ordinal_ordType n := OrdType 'I_n (ordinal_ordMixin n). Section SeqOrd. Variable (T : ordType). Fixpoint ords x : pred (seq T) := fun y => match x , y with | [::] , [::] => false | [::] , t :: ts => true | x :: xs , y :: ys => if x == y then ords xs ys else ord x y | _ :: _ , [::] => false end. Lemma irr_ords : irreflexive ords. Proof. (* Goal: @irreflexive (list (Equality.sort (Ordered.eqType T))) ords *) by elim=>//= a l ->; rewrite irr; case:eqP=> //=. Qed. Lemma trans_ords : transitive ords. Proof. (* Goal: @transitive (list (Equality.sort (Ordered.eqType T))) ords *) elim=>[|y ys IHy][|x xs][|z zs]//=. (* Goal: forall (_ : is_true (if @eq_op (Ordered.eqType T) x y then ords xs ys else @ord T x y)) (_ : is_true (if @eq_op (Ordered.eqType T) y z then ords ys zs else @ord T y z)), is_true (if @eq_op (Ordered.eqType T) x z then ords xs zs else @ord T x z) *) case:eqP=>//[->|H0];case:eqP=>//H; first by move/IHy; apply. (* Goal: forall (_ : is_true (@ord T x y)) (_ : is_true (@ord T y z)), is_true (if @eq_op (Ordered.eqType T) x z then ords xs zs else @ord T x z) *) (* Goal: forall (_ : is_true (@ord T x y)) (_ : is_true (ords ys zs)), is_true (if @eq_op (Ordered.eqType T) x z then ords xs zs else @ord T x z) *) - (* Goal: forall (_ : is_true (@ord T x y)) (_ : is_true (@ord T y z)), is_true (if @eq_op (Ordered.eqType T) x z then ords xs zs else @ord T x z) *) (* Goal: forall (_ : is_true (@ord T x y)) (_ : is_true (ords ys zs)), is_true (if @eq_op (Ordered.eqType T) x z then ords xs zs else @ord T x z) *) by case:eqP=>//; rewrite -H; first (by move/H0). (* Goal: forall (_ : is_true (@ord T x y)) (_ : is_true (@ord T y z)), is_true (if @eq_op (Ordered.eqType T) x z then ords xs zs else @ord T x z) *) case:eqP=>//[->|H1] H2; first by move/(nsym H2). (* Goal: forall _ : is_true (@ord T y z), is_true (@ord T x z) *) by move/(trans H2). Qed. Lemma total_ords : forall x y, [|| ords x y, x == y | ords y x]. Proof. (* Goal: forall (x : list (Equality.sort (Ordered.eqType T))) (y : list (Ordered.sort T)), is_true (orb (ords x y) (orb (@eq_op (seq_eqType (Ordered.eqType T)) x y) (ords y x))) *) elim=>[|x xs IH][|y ys]//=; case:eqP=>//[->|H1]; (case:eqP=>//= H; first (by rewrite orbT //=)). (* Goal: is_true (orb (@ord T x y) (if @eq_op (Ordered.eqType T) y x then ords ys xs else @ord T y x)) *) (* Goal: is_true (orb (ords xs ys) (if @eq_op (Ordered.eqType T) y y then ords ys xs else @ord T y y)) *) - (* Goal: is_true (orb (@ord T x y) (if @eq_op (Ordered.eqType T) y x then ords ys xs else @ord T y x)) *) (* Goal: is_true (orb (ords xs ys) (if @eq_op (Ordered.eqType T) y y then ords ys xs else @ord T y y)) *) by case:eqP=>//H3 ; case: (or3P (IH ys))=> [-> | /eqP H0 | ->]; [ rewrite orTb // | apply: False_ind; apply: H; rewrite H0 | rewrite orbT //]. (* Goal: is_true (orb (@ord T x y) (if @eq_op (Ordered.eqType T) y x then ords ys xs else @ord T y x)) *) case:eqP; first by move/(esym)/H1. (* Goal: forall _ : not (@eq (Equality.sort (Ordered.eqType T)) y x), is_true (orb (@ord T x y) (@ord T y x)) *) by move=>_ ;case: (or3P (total x y))=>[-> //| /eqP /H1 //| -> //]; rewrite orbT. Qed. Definition seq_ordMixin := OrdMixin irr_ords trans_ords total_ords. Canonical Structure seq_ordType := Eval hnf in OrdType (seq T) seq_ordMixin. End SeqOrd. Section unitOrd. Let ordtt (x y : unit ) := false. Lemma irr_tt : irreflexive ordtt. Proof. (* Goal: @irreflexive unit ordtt *) by []. Qed. Lemma trans_tt : transitive ordtt. Proof. (* Goal: @transitive unit ordtt *) by []. Qed. Lemma total_tt x y : [|| ordtt x y, x == y | ordtt y x ]. Let unit_ordMixin := OrdMixin irr_tt trans_tt total_tt. Canonical Structure unit_ordType := Eval hnf in OrdType unit unit_ordMixin. End unitOrd. Lemma seq_last_in (A : eqType) (s : seq A) x : last x s \notin s -> s = [::]. Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort A) (@last (Equality.sort A) x s) (@mem (Equality.sort A) (seq_predType A) s))), @eq (list (Equality.sort A)) s (@nil (Equality.sort A)) *) case: (lastP s)=>// {s} s y; case: negP=>//; elim; rewrite last_rcons. (* Goal: is_true (@in_mem (Equality.sort A) y (@mem (Equality.sort A) (seq_predType A) (@rcons (Equality.sort A) s y))) *) by elim: s=>[|y' s IH]; rewrite /= inE // IH orbT. Qed. Lemma path_last (A : ordType) (s : seq A) x : path oleq x s -> oleq x (last x s). Proof. (* Goal: forall _ : is_true (@path (Ordered.sort A) (@oleq A) x s), is_true (@oleq A x (@last (Ordered.sort A) x s)) *) move/(order_path_min (@otrans _)); rewrite -nth_last. (* Goal: forall _ : is_true (@all (Equality.sort (Ordered.eqType A)) (@oleq A x) s), is_true (@oleq A x (@nth (Ordered.sort A) x s (Nat.pred (@size (Ordered.sort A) s)))) *) by case: s =>// h s' /all_nthP->. Qed. Lemma sorted_last_key_max (A : ordType) (s : seq A) x y : sorted oleq s -> x \in s -> oleq x (last y s). Proof. (* Goal: forall (_ : is_true (@sorted (Ordered.eqType A) (@oleq A) s)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType A)) x (@mem (Equality.sort (Ordered.eqType A)) (seq_predType (Ordered.eqType A)) s))), is_true (@oleq A x (@last (Ordered.sort A) y s)) *) elim: s x y=>[|z s IH] //= x y H; rewrite inE /=. (* Goal: forall _ : is_true (orb (@eq_op (Ordered.eqType A) x z) (@in_mem (Ordered.sort A) x (@mem (Ordered.sort A) (seq_predType (Ordered.eqType A)) s))), is_true (@oleq A x (@last (Ordered.sort A) z s)) *) case: eqP=>[->|] /= _; first by apply: path_last. (* Goal: forall _ : is_true (@in_mem (Ordered.sort A) x (@mem (Ordered.sort A) (seq_predType (Ordered.eqType A)) s)), is_true (@oleq A x (@last (Ordered.sort A) z s)) *) by apply: IH (path_sorted H). Qed. Lemma sorted_max_key_last (A : ordType) (s : seq A) x y : sorted oleq s -> x \in s -> (forall z, z \in s -> oleq z x) -> last y s = x. Proof. (* Goal: forall (_ : is_true (@sorted (Ordered.eqType A) (@oleq A) s)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType A)) x (@mem (Equality.sort (Ordered.eqType A)) (seq_predType (Ordered.eqType A)) s))) (_ : forall (z : Equality.sort (Ordered.eqType A)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType A)) z (@mem (Equality.sort (Ordered.eqType A)) (seq_predType (Ordered.eqType A)) s))), is_true (@oleq A z x)), @eq (Ordered.sort A) (@last (Ordered.sort A) y s) x *) elim: s x y => [|w s IH] //= x y; rewrite inE /=. (* Goal: forall (_ : is_true (@path (Ordered.sort A) (@oleq A) w s)) (_ : is_true (orb (@eq_op (Ordered.eqType A) x w) (@in_mem (Ordered.sort A) x (@mem (Ordered.sort A) (seq_predType (Ordered.eqType A)) s)))) (_ : forall (z : Ordered.sort A) (_ : is_true (@in_mem (Ordered.sort A) z (@mem (Ordered.sort A) (seq_predType (Ordered.eqType A)) (@cons (Ordered.sort A) w s)))), is_true (@oleq A z x)), @eq (Ordered.sort A) (@last (Ordered.sort A) w s) x *) case: eqP=>[<- /= H1 _ H2 | _ H /= H1 H2]; last first. (* Goal: @eq (Ordered.sort A) (@last (Ordered.sort A) x s) x *) (* Goal: @eq (Ordered.sort A) (@last (Ordered.sort A) w s) x *) - (* Goal: @eq (Ordered.sort A) (@last (Ordered.sort A) x s) x *) (* Goal: @eq (Ordered.sort A) (@last (Ordered.sort A) w s) x *) apply: IH (path_sorted H) H1 _ => z H3; apply: H2. (* Goal: @eq (Ordered.sort A) (@last (Ordered.sort A) x s) x *) (* Goal: is_true (@in_mem (Ordered.sort A) z (@mem (Ordered.sort A) (seq_predType (Ordered.eqType A)) (@cons (Ordered.sort A) w s))) *) by rewrite inE /= H3 orbT. (* Goal: @eq (Ordered.sort A) (@last (Ordered.sort A) x s) x *) apply/eqP; move: (H2 (last x s)) (path_last H1); rewrite inE /= /oleq eq_sym. (* Goal: forall (_ : forall _ : is_true (orb (@eq_op (Ordered.eqType A) x (@last (Ordered.sort A) x s)) (@in_mem (Ordered.sort A) (@last (Ordered.sort A) x s) (@mem (Ordered.sort A) (seq_predType (Ordered.eqType A)) s))), is_true (orb (@ord A (@last (Ordered.sort A) x s) x) (@eq_op (Ordered.eqType A) x (@last (Ordered.sort A) x s)))) (_ : is_true (orb (@ord A x (@last (Ordered.sort A) x s)) (@eq_op (Ordered.eqType A) x (@last (Ordered.sort A) x s)))), is_true (@eq_op (Ordered.eqType A) x (@last (Ordered.sort A) x s)) *) case: totalP=>//=; case E: (last x s \in s)=>//. (* Goal: forall (_ : is_true (@ord A x (@last (Ordered.sort A) x s))) (_ : forall _ : is_true false, is_true false) (_ : is_true true), is_true false *) by move/negbT/seq_last_in: E=>->; rewrite irr. Qed. Lemma seq_last_mono (A : ordType) (s1 s2 : seq A) x : path oleq x s1 -> path oleq x s2 -> {subset s1 <= s2} -> oleq (last x s1) (last x s2).
Require Export Qsyntax. Require Export Field_Theory_Q. Require Export Q_ordered_field_properties. Definition Qmax p q := if Q_le_lt_dec p q then q else p. Definition Qmin p q := if Q_le_lt_dec p q then p else q. Lemma Qle_max_l: forall p q, p <= Qmax p q. Proof. (* Goal: forall p q : Q, Qle p (Qmax p q) *) intros p q; unfold Qmax; destruct (Q_le_lt_dec p q); simpl; trivial. Qed. Lemma Qle_max_r: forall p q, q <= Qmax p q. Proof. (* Goal: forall p q : Q, Qle q (Qmax p q) *) intros p q; unfold Qmax; destruct (Q_le_lt_dec p q); auto. Qed. Lemma Qmax_lub: forall q1 q2 p, q1 <= p -> q2 <= p -> Qmax q1 q2 <= p. Proof. (* Goal: forall (q1 q2 p : Q) (_ : Qle q1 p) (_ : Qle q2 p), Qle (Qmax q1 q2) p *) intros q1 q2 p H1 H2; unfold Qmax; destruct (Q_le_lt_dec q1 q2); trivial. Qed. Lemma Qmax_Qlt_upper_bound:forall p q1 q2, p<q1 -> p<q2 ->p < Qmax q1 q2. Lemma Qmax_nondecreasing: forall q1 q2 p1 p2, q1 <= p1 -> q2 <= p2 -> Qmax q1 q2 <= Qmax p1 p2. Proof. (* Goal: forall (q1 q2 p1 p2 : Q) (_ : Qle q1 p1) (_ : Qle q2 p2), Qle (Qmax q1 q2) (Qmax p1 p2) *) intros q1 q2 p1 p2 H1 H2; unfold Qmax; destruct (Q_le_lt_dec q1 q2); destruct (Q_le_lt_dec p1 p2); trivial; [apply Qlt_le_weak; apply Qle_lt_trans with p2 | apply Qle_trans with p1]; trivial. Qed. Lemma Qmin_Qmax_Qle:forall q1 q2, Qmin q1 q2 <= Qmax q1 q2. Lemma Qmin_nondecreasing: forall q1 q2 p1 p2, q1 <= p1 -> q2 <= p2 -> Qmin q1 q2 <= Qmin p1 p2. Proof. (* Goal: forall (q1 q2 p1 p2 : Q) (_ : Qle q1 p1) (_ : Qle q2 p2), Qle (Qmin q1 q2) (Qmin p1 p2) *) intros q1 q2 p1 p2 H1 H2; unfold Qmin; destruct (Q_le_lt_dec q1 q2); destruct (Q_le_lt_dec p1 p2); trivial; [apply Qle_trans with q2| apply Qlt_le_weak; apply Qlt_le_trans with q1]; trivial. Qed. Lemma Qmin_glb: forall q1 q2 p, p<=q1 -> p<=q2 -> p<=Qmin q1 q2. Proof. (* Goal: forall (q1 q2 p : Q) (_ : Qle p q1) (_ : Qle p q2), Qle p (Qmin q1 q2) *) intros q1 q2 p H1 H2; unfold Qmin; destruct (Q_le_lt_dec q1 q2); trivial. Qed. Lemma Qmin_Qlt_upper_bound:forall p q1 q2, p<q1 -> p<q2 ->p < Qmin q1 q2. Lemma Qle_min_l: forall p q : Q, Qmin p q <= p. Proof. (* Goal: forall p q : Q, Qle (Qmin p q) p *) intros p q; unfold Qmin; destruct (Q_le_lt_dec p q); trivial ; apply Qlt_le_weak; assumption. Qed. Lemma Qle_min_r: forall p q : Q, Qmin p q <= q. Proof. (* Goal: forall p q : Q, Qle (Qmin p q) q *) intros p q; unfold Qmin; destruct (Q_le_lt_dec p q); trivial ; apply Qlt_le_weak; assumption. Qed. Lemma Qmax_or_informative:forall p q, {Qmax p q = p} + {Qmax p q = q}. Lemma Qmin_or_informative:forall p q, {Qmin p q = p} + {Qmin p q = q}. Definition Qmax4 q1 q2 q3 q4 := Qmax (Qmax q1 q2) (Qmax q3 q4). Definition Qmin4 q1 q2 q3 q4 := Qmin (Qmin q1 q2) (Qmin q3 q4). Lemma Qmax4_informative:forall q1 q2 q3 q4, {Qmax4 q1 q2 q3 q4=q1} + {Qmax4 q1 q2 q3 q4=q2} + {Qmax4 q1 q2 q3 q4=q3} + {Qmax4 q1 q2 q3 q4=q4}. Lemma Qmin4_informative:forall q1 q2 q3 q4, {Qmin4 q1 q2 q3 q4=q1} + {Qmin4 q1 q2 q3 q4=q2} + {Qmin4 q1 q2 q3 q4=q3} + {Qmin4 q1 q2 q3 q4=q4}. Lemma Qmin4_Qmax4_Qle:forall q1 q2 q3 q4, Qmin4 q1 q2 q3 q4<= Qmax4 q1 q2 q3 q4. Lemma Qle_Qmax4_1:forall q1 q2 q3 q4, q1<=Qmax4 q1 q2 q3 q4. Lemma Qle_Qmax4_2:forall q1 q2 q3 q4, q2<=Qmax4 q1 q2 q3 q4. Lemma Qle_Qmax4_3:forall q1 q2 q3 q4, q3<=Qmax4 q1 q2 q3 q4. Lemma Qle_Qmax4_4:forall q1 q2 q3 q4, q4<=Qmax4 q1 q2 q3 q4. Lemma Qle_Qmin4_1:forall q1 q2 q3 q4, Qmin4 q1 q2 q3 q4<= q1. Lemma Qle_Qmin4_2:forall q1 q2 q3 q4, Qmin4 q1 q2 q3 q4<= q2. Lemma Qle_Qmin4_3:forall q1 q2 q3 q4, Qmin4 q1 q2 q3 q4<= q3. Lemma Qle_Qmin4_4:forall q1 q2 q3 q4, Qmin4 q1 q2 q3 q4<= q4. Lemma Qmax4_Qlt_upper_bound:forall p q1 q2 q3 q4, p<q1 -> p<q2 -> p<q3 -> p<q4 -> p < Qmax4 q1 q2 q3 q4. Lemma Qlt_Qmin_upper_bound: forall p q1 q2 : Q, p < Qmin q1 q2 -> p < q1 /\ p < q2. Proof. (* Goal: forall (p q1 q2 : Q) (_ : Qlt p (Qmin q1 q2)), and (Qlt p q1) (Qlt p q2) *) intros p q1 q2; split; apply Qlt_le_trans with (Qmin q1 q2); trivial; [apply Qle_min_l|apply Qle_min_r]. Qed. Definition Qlt_Qmin_upper_bound_l p q1 q2 (hyp:p < Qmin q1 q2) : p < q1 :=proj1 (Qlt_Qmin_upper_bound p q1 q2 hyp). Definition Qlt_Qmin_upper_bound_r p q1 q2 (hyp:p < Qmin q1 q2) : p < q2 :=proj2 (Qlt_Qmin_upper_bound p q1 q2 hyp). Lemma Qmax_Qlt_lower_bound: forall p q1 q2 : Q, q1 < p -> q2 < p -> Qmax q1 q2 < p. Proof. (* Goal: forall (p q1 q2 : Q) (_ : Qlt q1 p) (_ : Qlt q2 p), Qlt (Qmax q1 q2) p *) intros p q1 q2 H1 H2; unfold Qmax; destruct (Q_le_lt_dec q1 q2); trivial. Qed. Lemma Qlt_Qmax_lower_bound: forall p q1 q2 : Q, Qmax q1 q2 < p -> q1 < p /\ q2 < p. Proof. (* Goal: forall (p q1 q2 : Q) (_ : Qlt (Qmax q1 q2) p), and (Qlt q1 p) (Qlt q2 p) *) intros p q1 q2; split; apply Qle_lt_trans with (Qmax q1 q2); trivial; [apply Qle_max_l|apply Qle_max_r]. Qed. Definition Qlt_Qmax_lower_bound_l p q1 q2 (hyp:Qmax q1 q2 < p) := proj1 (Qlt_Qmax_lower_bound p q1 q2 hyp). Definition Qlt_Qmax_lower_bound_r p q1 q2 (hyp:Qmax q1 q2 < p) := proj2 (Qlt_Qmax_lower_bound p q1 q2 hyp). Lemma Qmin_involutive : forall q, Qmin q q = q. Proof. (* Goal: forall q : Q, @eq Q (Qmin q q) q *) intros q; destruct (Qmin_or_informative q q); trivial. Qed. Lemma Qmax_involutive : forall q, Qmax q q = q. Proof. (* Goal: forall q : Q, @eq Q (Qmax q q) q *) intros q; destruct (Qmax_or_informative q q); trivial. Qed. Definition Qmean (x y:Q):Q := (x+y) / (Qone + Qone). Lemma Qmean_property:forall (x y:Q), x < y -> x < Qmean x y /\ Qmean x y < y. Definition Qmean_property_l x y (hyp:x<y) := proj1 (Qmean_property x y hyp). Definition Qmean_property_r x y (hyp:x<y) := proj2 (Qmean_property x y hyp). Lemma Qmean_incr: forall x1 x2 y1 y2, x1< x2 -> y1 < y2 -> Qmean x1 y1 < Qmean x2 y2. Proof. (* Goal: forall (x1 x2 y1 y2 : Q) (_ : Qlt x1 x2) (_ : Qlt y1 y2), Qlt (Qmean x1 y1) (Qmean x2 y2) *) intros x1 x2 y1 y2 Hx Hy; unfold Qmean; apply Qmult_Qdiv_pos; auto; (stepl (x1 + x1 + y1 + y1) by ring); stepr (x2 + x2 + y2 + y2) ; auto; ring. Qed. Theorem Q_is_dense:forall x y, x<y -> {z:Q | x<z /\ z<y}.
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinear4. Section Euclid. Context `{Ax1:euclidean_neutral_ruler_compass}. Lemma lemma_Pasch_outer2 : forall A B C P Q, BetS A P C -> BetS B C Q -> nCol B P A -> exists X, BetS A X Q /\ BetS B P X. Proof. (* Goal: forall (A B C P Q : @Point Ax) (_ : @BetS Ax A P C) (_ : @BetS Ax B C Q) (_ : @nCol Ax B P A), @ex (@Point Ax) (fun X : @Point Ax => and (@BetS Ax A X Q) (@BetS Ax B P X)) *) intros. (* Goal: @ex (@Point Ax) (fun X : @Point Ax => and (@BetS Ax A X Q) (@BetS Ax B P X)) *) assert (~ Col B Q A). (* Goal: @ex (@Point Ax) (fun X : @Point Ax => and (@BetS Ax A X Q) (@BetS Ax B P X)) *) (* Goal: not (@Col Ax B Q A) *) { (* Goal: not (@Col Ax B Q A) *) intro. (* Goal: False *) assert (Col A P C) by (conclude_def Col ). (* Goal: False *) assert (Col B C Q) by (conclude_def Col ). (* Goal: False *) assert (Col B Q C) by (forward_using lemma_collinearorder). (* Goal: False *) assert (~ eq Q A). (* Goal: False *) (* Goal: not (@eq Ax Q A) *) { (* Goal: not (@eq Ax Q A) *) intro. (* Goal: False *) assert (Col B A C) by (conclude cn_equalitysub). (* Goal: False *) assert (Col C A B) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col C A P) by (forward_using lemma_collinearorder). (* Goal: False *) assert (neq A C) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (neq C A) by (conclude lemma_inequalitysymmetric). (* Goal: False *) assert (Col A B P) by (conclude lemma_collinear4). (* Goal: False *) assert (Col B P A) by (forward_using lemma_collinearorder). (* Goal: False *) contradict. (* BG Goal: @ex (@Point Ax) (fun X : @Point Ax => and (@BetS Ax A X Q) (@BetS Ax B P X)) *) (* BG Goal: False *) } (* Goal: False *) assert (Col B Q C) by (forward_using lemma_collinearorder). (* Goal: False *) assert (neq B Q) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (Col Q A C) by (conclude lemma_collinear4). (* Goal: False *) assert (Col A C Q) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col A C P) by (forward_using lemma_collinearorder). (* Goal: False *) assert (neq A C) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (Col C Q P) by (conclude lemma_collinear4). (* Goal: False *) assert (Col C Q B) by (forward_using lemma_collinearorder). (* Goal: False *) assert (neq C 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 Q B) by (conclude lemma_inequalitysymmetric). (* Goal: False *) assert (Col B P A) by (conclude lemma_collinear4). (* Goal: False *) contradict. (* BG Goal: @ex (@Point Ax) (fun X : @Point Ax => and (@BetS Ax A X Q) (@BetS Ax B P X)) *) } (* Goal: @ex (@Point Ax) (fun X : @Point Ax => and (@BetS Ax A X Q) (@BetS Ax B P X)) *) let Tf:=fresh in assert (Tf:exists E, (BetS A E Q /\ BetS B P E)) by (conclude postulate_Pasch_outer);destruct Tf as [E];spliter. (* Goal: @ex (@Point Ax) (fun X : @Point Ax => and (@BetS Ax A X Q) (@BetS Ax B P X)) *) close. Qed. End Euclid.
Set Implicit Arguments. Unset Strict Implicit. Require Export Integral_domain_cat. Require Export Ring_facts. Require Export Classical_Prop. Section Lemmas. Variable R : INTEGRAL_DOMAIN. Lemma INTEGRAL_DOMAIN_prop_rev : forall x y : R, ~ Equal x (monoid_unit R) -> ~ Equal y (monoid_unit R) -> ~ Equal (ring_mult x y) (monoid_unit R). Proof. (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))))), not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) x y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) exact (idomain_prf R). Qed. Lemma INTEGRAL_DOMAIN_prop : forall x y : R, Equal (ring_mult x y) (monoid_unit R) -> Equal x (monoid_unit R) \/ Equal y (monoid_unit R). Proof. (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) x y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))), or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) intros x y H'; try assumption. (* Goal: or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) generalize (INTEGRAL_DOMAIN_prop_rev (x:=x) (y:=y)). (* Goal: forall _ : forall (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))))), not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) x y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))), or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) apply NNPP; tauto. Qed. Lemma INTEGRAL_DOMAIN_mult_l : forall x y : R, ~ Equal (ring_mult x y) (monoid_unit R) -> ~ Equal x (monoid_unit R). Proof. (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) x y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))))), not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) unfold not in |- *. (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) x y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), False) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))), False *) intros x y H' H'0; try assumption. (* Goal: False *) absurd (Equal (ring_mult x y) (monoid_unit R)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) x y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (ring_mult (monoid_unit R) y); auto with algebra. Qed. Lemma INTEGRAL_DOMAIN_mult_r : forall x y : R, ~ Equal (ring_mult x y) (monoid_unit R) -> ~ Equal y (monoid_unit R). Proof. (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) x y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))))), not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) unfold not in |- *. (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) x y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), False) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))), False *) intros x y H' H'0; try assumption. (* Goal: False *) absurd (Equal (ring_mult x y) (monoid_unit R)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) x y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (ring_mult x (monoid_unit R)); auto with algebra. Qed. Lemma INTEGRAL_DOMAIN_mult_n0_r : forall x y : R, Equal (ring_mult x y) (monoid_unit R) -> ~ Equal y (monoid_unit R) -> Equal x (monoid_unit R). Proof. (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) x y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) intros x y H' H'0; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) intuition. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) elim (INTEGRAL_DOMAIN_prop (x:=x) (y:=y)); auto with algebra. (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) intros H'1; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) absurd (Equal y (monoid_unit R)); auto with algebra. Qed. Lemma INTEGRAL_DOMAIN_mult_n0_l : forall x y : R, Equal (ring_mult x y) (monoid_unit R) -> ~ Equal x (monoid_unit R) -> Equal y (monoid_unit R). Proof. (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) x y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) intros x y H' H'0; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) elim (INTEGRAL_DOMAIN_prop (x:=x) (y:=y)); auto with algebra. (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) intros H'1; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) absurd (Equal x (monoid_unit R)); auto with algebra. Qed. Hint Resolve INTEGRAL_DOMAIN_prop INTEGRAL_DOMAIN_prop_rev INTEGRAL_DOMAIN_mult_l INTEGRAL_DOMAIN_mult_r INTEGRAL_DOMAIN_mult_n0_l INTEGRAL_DOMAIN_mult_n0_r: algebra. Lemma INTEGRAL_DOMAIN_simpl_r : forall x y z : R, ~ Equal z (monoid_unit R) -> Equal (ring_mult x z) (ring_mult y z) -> Equal x y. Proof. (* Goal: forall (x y z : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) x z) (@ring_mult (cring_ring (idomain_ring R)) y z)), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) intros x y z H' H'0; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) cut (Equal (ring_mult (sgroup_law R x (group_inverse R y)) z) (monoid_unit R)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) intros H'1; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) cut (Equal (sgroup_law R x (group_inverse R y)) (monoid_unit R)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) intros H'2; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) apply GROUP_reg_right with (group_inverse R y); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) y (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) *) apply Trans with (monoid_unit R); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply INTEGRAL_DOMAIN_mult_n0_r with z; auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (sgroup_law R (ring_mult x z) (ring_mult (group_inverse R y) z)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) x z) (@ring_mult (cring_ring (idomain_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y) z)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (sgroup_law R (ring_mult x z) (group_inverse R (ring_mult y z))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) x z) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) y z))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (sgroup_law R (ring_mult x z) (group_inverse R (ring_mult x z))); auto with algebra. Qed. Lemma INTEGRAL_DOMAIN_simpl_l : forall x y z : R, ~ Equal z (monoid_unit R) -> Equal (ring_mult z x) (ring_mult z y) -> Equal x y. Proof. (* Goal: forall (x y z : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z x) (@ring_mult (cring_ring (idomain_ring R)) z y)), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) intros x y z H' H'0; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) cut (Equal (ring_mult z (sgroup_law R x (group_inverse R y))) (monoid_unit R)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) intros H'1; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) cut (Equal (sgroup_law R x (group_inverse R y)) (monoid_unit R)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) intros H'2; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) apply GROUP_reg_right with (group_inverse R y); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) y (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) *) apply Trans with (monoid_unit R); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply INTEGRAL_DOMAIN_mult_n0_l with z; auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (sgroup_law R (ring_mult z x) (ring_mult z (group_inverse R y))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) z x) (@ring_mult (cring_ring (idomain_ring R)) z (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (sgroup_law R (ring_mult z x) (group_inverse R (ring_mult z y))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) z x) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) z y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (sgroup_law R (ring_mult z x) (group_inverse R (ring_mult z x))); auto with algebra. Qed. Lemma INTEGRAL_DOMAIN_mult_eq_r : forall x y z : R, Equal (ring_mult x z) (ring_mult y z) -> Equal x y \/ Equal z (monoid_unit R). Proof. (* Goal: forall (x y z : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) x z) (@ring_mult (cring_ring (idomain_ring R)) y z)), or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) intros x y z H'; try assumption. (* Goal: or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) cut (Equal (ring_mult (sgroup_law R x (group_inverse R y)) z) (monoid_unit R)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) intros H'0; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) elim (INTEGRAL_DOMAIN_prop (x:=sgroup_law R x (group_inverse R y)) (y:=z)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) intros H'1; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) left; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) apply GROUP_reg_right with (group_inverse R y); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) y (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) *) apply Trans with (monoid_unit R); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) z) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (sgroup_law R (ring_mult x z) (ring_mult (group_inverse R y) z)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) x z) (@ring_mult (cring_ring (idomain_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y) z)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (sgroup_law R (ring_mult x z) (group_inverse R (ring_mult y z))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) x z) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) y z))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (sgroup_law R (ring_mult x z) (group_inverse R (ring_mult x z))); auto with algebra. Qed. Lemma INTEGRAL_DOMAIN_mult_eq_l : forall x y z : R, Equal (ring_mult z x) (ring_mult z y) -> Equal x y \/ Equal z (monoid_unit R). Proof. (* Goal: forall (x y z : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z x) (@ring_mult (cring_ring (idomain_ring R)) z y)), or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) intros x y z H'; try assumption. (* Goal: or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) cut (Equal (ring_mult z (sgroup_law R x (group_inverse R y))) (monoid_unit R)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) intros H'0; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) elim (INTEGRAL_DOMAIN_prop (x:=z) (y:=sgroup_law R x (group_inverse R y))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) intros H'1; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: or (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) z (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) left; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) x y *) apply GROUP_reg_right with (group_inverse R y); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) y (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y)) *) apply Trans with (monoid_unit R); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) z (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) x (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (sgroup_law R (ring_mult z x) (ring_mult z (group_inverse R y))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) z x) (@ring_mult (cring_ring (idomain_ring R)) z (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (sgroup_law R (ring_mult z x) (group_inverse R (ring_mult z y))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) z x) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) z y))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (sgroup_law R (ring_mult z x) (group_inverse R (ring_mult z x))); auto with algebra. Qed. End Lemmas. Hint Resolve INTEGRAL_DOMAIN_prop INTEGRAL_DOMAIN_prop_rev INTEGRAL_DOMAIN_mult_l INTEGRAL_DOMAIN_mult_r INTEGRAL_DOMAIN_mult_n0_l INTEGRAL_DOMAIN_mult_n0_r: algebra. Hint Resolve INTEGRAL_DOMAIN_simpl_r INTEGRAL_DOMAIN_simpl_l: algebra.
Require Export GeoCoq.Elements.OriginalProofs.lemma_inequalitysymmetric. Require Export GeoCoq.Elements.OriginalProofs.lemma_ray4. Require Export GeoCoq.Elements.OriginalProofs.lemma_collinearorder. Require Export GeoCoq.Elements.OriginalProofs.lemma_congruenceflip. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma proposition_08 : forall A B C D E F, Triangle A B C -> Triangle D E F -> Cong A B D E -> Cong A C D F -> Cong B C E F -> CongA B A C E D F /\ CongA C B A F E D /\ CongA A C B D F E. Proof. (* Goal: forall (A B C D E F : @Point Ax0) (_ : @Triangle Ax0 A B C) (_ : @Triangle Ax0 D E F) (_ : @Cong Ax0 A B D E) (_ : @Cong Ax0 A C D F) (_ : @Cong Ax0 B C E F), and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) intros. (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (eq E E) by (conclude cn_equalityreflexive). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (eq F F) by (conclude cn_equalityreflexive). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (eq B B) by (conclude cn_equalityreflexive). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (eq C C) by (conclude cn_equalityreflexive). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (eq D D) by (conclude cn_equalityreflexive). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (eq A A) by (conclude cn_equalityreflexive). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (nCol A B C) by (conclude_def Triangle ). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (nCol D E F) by (conclude_def Triangle ). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (~ eq A B). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F 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 *) contradict. (* BG Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) } (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (neq B A) by (conclude lemma_inequalitysymmetric). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (~ eq B C). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) (* 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 (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) } (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (neq C B) by (conclude lemma_inequalitysymmetric). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (~ eq D E). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) (* Goal: not (@eq Ax0 D E) *) { (* Goal: not (@eq Ax0 D E) *) intro. (* Goal: False *) assert (Col D E F) by (conclude_def Col ). (* Goal: False *) contradict. (* BG Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) } (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (neq E D) by (conclude lemma_inequalitysymmetric). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (~ eq A C). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) (* 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 (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) } (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (neq C A) by (conclude lemma_inequalitysymmetric). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (~ eq D F). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) (* Goal: not (@eq Ax0 D F) *) { (* Goal: not (@eq Ax0 D F) *) intro. (* Goal: False *) assert (Col D E F) by (conclude_def Col ). (* Goal: False *) contradict. (* BG Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) } (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (neq F D) by (conclude lemma_inequalitysymmetric). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (~ eq E F). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) (* Goal: not (@eq Ax0 E F) *) { (* Goal: not (@eq Ax0 E F) *) intro. (* Goal: False *) assert (Col D E F) by (conclude_def Col ). (* Goal: False *) contradict. (* BG Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) } (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (neq F E) by (conclude lemma_inequalitysymmetric). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Out D E E) by (conclude lemma_ray4). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Out D F F) by (conclude lemma_ray4). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Out A B B) by (conclude lemma_ray4). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Out A C C) by (conclude lemma_ray4). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (~ Col B A C). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) (* 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 (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) } (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (CongA B A C E D F) by (conclude_def CongA ). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Cong B A E D) by (forward_using lemma_congruenceflip). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Cong C A F D) by (forward_using lemma_congruenceflip). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Out E F F) by (conclude lemma_ray4). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Out E D D) by (conclude lemma_ray4). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Out B C C) by (conclude lemma_ray4). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Out B A A) by (conclude lemma_ray4). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (~ Col C B A). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) (* 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 (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) } (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (CongA C B A F E D) by (conclude_def CongA ). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Cong C A F D) by (forward_using lemma_congruenceflip). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Cong C B F E) by (forward_using lemma_congruenceflip). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Out F D D) by (conclude lemma_ray4). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Out F E E) by (conclude lemma_ray4). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Out C A A) by (conclude lemma_ray4). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (Out C B B) by (conclude lemma_ray4). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (~ Col A C B). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) (* Goal: not (@Col Ax0 A C B) *) { (* Goal: not (@Col Ax0 A C B) *) intro. (* Goal: False *) assert (Col A B C) by (forward_using lemma_collinearorder). (* Goal: False *) contradict. (* BG Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) } (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) assert (CongA A C B D F E) by (conclude_def CongA ). (* Goal: and (@CongA Ax0 B A C E D F) (and (@CongA Ax0 C B A F E D) (@CongA Ax0 A C B D F E)) *) close. Qed. End Euclid.
Require Export GeoCoq.Elements.OriginalProofs.proposition_10. Require Export GeoCoq.Elements.OriginalProofs.lemma_ABCequalsCBA. Require Export GeoCoq.Elements.OriginalProofs.lemma_equalanglestransitive. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma proposition_09 : forall A B C, nCol B A C -> exists X, CongA B A X X A C /\ InAngle B A C X. Proof. (* Goal: forall (A B C : @Point Ax0) (_ : @nCol Ax0 B A C), @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) intros. (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (~ eq A B). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) (* Goal: not (@eq Ax0 A B) *) { (* Goal: not (@eq Ax0 A B) *) intro. (* Goal: False *) assert (eq B A) by (conclude lemma_equalitysymmetric). (* Goal: False *) assert (Col B A C) by (conclude_def Col ). (* Goal: False *) contradict. (* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) } (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (~ eq A C). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) (* Goal: not (@eq Ax0 A C) *) { (* Goal: not (@eq Ax0 A C) *) intro. (* Goal: False *) assert (Col B A C) by (conclude_def Col ). (* Goal: False *) contradict. (* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) } (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) let Tf:=fresh in assert (Tf:exists E, (Out A C E /\ Cong A E A B)) by (conclude lemma_layoff);destruct Tf as [E];spliter. (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (~ eq B E). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) (* Goal: not (@eq Ax0 B E) *) { (* Goal: not (@eq Ax0 B E) *) intro. (* Goal: False *) assert (Col A B E) by (conclude_def Col ). (* Goal: False *) assert (Col A C E) by (conclude lemma_rayimpliescollinear). (* 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 (conclude lemma_raystrict). (* Goal: False *) assert (neq E A) by (conclude lemma_inequalitysymmetric). (* Goal: False *) assert (Col A B C) by (conclude lemma_collinear4). (* Goal: False *) assert (Col B A C) by (forward_using lemma_collinearorder). (* Goal: False *) contradict. (* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) } (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) let Tf:=fresh in assert (Tf:exists F, (BetS B F E /\ Cong F B F E)) by (conclude proposition_10);destruct Tf as [F];spliter. (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (eq B B) by (conclude cn_equalityreflexive). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (eq F F) by (conclude cn_equalityreflexive). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (Cong A F A F) by (conclude cn_congruencereflexive). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (Cong A B A E) by (conclude lemma_congruencesymmetric). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (Cong E F B F) by (forward_using lemma_doublereverse). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (Cong B F E F) by (conclude lemma_congruencesymmetric). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (~ Col B A F). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) (* Goal: not (@Col Ax0 B A F) *) { (* Goal: not (@Col Ax0 B A F) *) intro. (* Goal: False *) assert (Col B F E) by (conclude_def Col ). (* Goal: False *) assert (Col F B E) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col F B A) 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 E A) by (conclude lemma_collinear4). (* Goal: False *) assert (Col A C E) by (conclude lemma_rayimpliescollinear). (* 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 (conclude lemma_raystrict). (* Goal: False *) assert (neq E A) by (conclude lemma_inequalitysymmetric). (* Goal: False *) assert (Col A B C) by (conclude lemma_collinear4). (* Goal: False *) assert (Col B A C) by (forward_using lemma_collinearorder). (* Goal: False *) contradict. (* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) } (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (Out A B B) by (conclude lemma_ray4). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (~ eq A F). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) (* Goal: not (@eq Ax0 A F) *) { (* Goal: not (@eq Ax0 A F) *) intro. (* Goal: False *) assert (Col B A F) by (conclude_def Col ). (* Goal: False *) contradict. (* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) } (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (Out A F F) by (conclude lemma_ray4). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (CongA B A F C A F) by (conclude_def CongA ). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (CongA C A F B A F) by (conclude lemma_equalanglessymmetric). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (nCol C A F) by (conclude_def CongA ). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (CongA C A F F A C) by (conclude lemma_ABCequalsCBA). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (CongA B A F F A C) by (conclude lemma_equalanglestransitive). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) assert (InAngle B A C F) by (conclude_def InAngle ). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@CongA Ax0 B A X X A C) (@InAngle Ax0 B A C X)) *) close. Qed. End Euclid.
Global Set Automatic Coercions Import. Global Set Asymmetric Patterns. Set Implicit Arguments. Unset Strict Implicit. Section Sets1. Comments "Basically, algebraic structures are sets, in which we talk about elements, belonging, equality," "applications, equivalence relations, quotient sets, etc". Comments "Types in Coq are not well-suited to represent sets, because they cannot be quotiented". Comments "We will define sets in Coq as types with an equivalence relation". Comments "First, we need some definitions on binary relations on types:". Section Relations. Variable E : Type. Definition relation (E : Type) := E -> E -> Prop. Definition app_rel (R : relation E) (x y : E) := R x y. Definition reflexive (R : relation E) : Prop := forall x : E, app_rel R x x. Definition symmetric (R : relation E) : Prop := forall x y : E, app_rel R x y -> app_rel R y x. Definition transitive (R : relation E) : Prop := forall x y z : E, app_rel R x y -> app_rel R y z -> app_rel R x z. Comments "A partial equivalence on" E " is a relation which is transitive and symmetric:". Definition partial_equivalence (R : relation E) : Prop := transitive R /\ symmetric R. Comments "An equivalence relation is reflexive, symmetric and transitive:". Definition equivalence (R : relation E) : Prop := reflexive R /\ partial_equivalence R. Comments "Some immediate properties:". Lemma equiv_refl : forall R : relation E, equivalence R -> reflexive R. Proof. (* Goal: forall (R : relation E) (_ : equivalence R), reflexive R *) compute in |- *. (* Goal: forall (R : forall (_ : E) (_ : E), Prop) (_ : and (forall x : E, R x x) (and (forall (x y z : E) (_ : R x y) (_ : R y z), R x z) (forall (x y : E) (_ : R x y), R y x))) (x : E), R x x *) tauto. Qed. Lemma equiv_sym : forall R : relation E, equivalence R -> symmetric R. Proof. (* Goal: forall (R : relation E) (_ : equivalence R), symmetric R *) compute in |- *; tauto. Qed. Lemma equiv_trans : forall R : relation E, equivalence R -> transitive R. Proof. (* Goal: forall (R : relation E) (_ : equivalence R), transitive R *) compute in |- *; tauto. Qed. End Relations. Hint Unfold reflexive transitive symmetric partial_equivalence equivalence: algebra. Hint Resolve equiv_refl equiv_sym equiv_trans: algebra. Comments "Then we define a dedicated structure to represent sets:". Record Setoid : Type := {Carrier :> Type; Equal : relation Carrier; Prf_equiv :> equivalence Equal}. Hint Resolve Prf_equiv: algebra. Comments "A set is then given by a type (for its elements), a binary relation" "and a proof that this relation is an equivalence relation". Comments "We will write" (Equal x y) "for the equality of two elements of a set". Lemma Refl : forall (E : Setoid) (x : E), Equal x x. Proof. (* Goal: forall (E : Setoid) (x : Carrier E), @Equal E x x *) intros E; try assumption. (* Goal: forall x : Carrier E, @Equal E x x *) cut (reflexive (Equal (s:=E))); auto with algebra. Qed. Lemma Sym : forall (E : Setoid) (x y : E), Equal x y -> Equal y x. Proof. (* Goal: forall (E : Setoid) (x y : Carrier E) (_ : @Equal E x y), @Equal E y x *) intros E; try assumption. (* Goal: forall (x y : Carrier E) (_ : @Equal E x y), @Equal E y x *) cut (symmetric (Equal (s:=E))); auto with algebra. Qed. Lemma Trans : forall (E : Setoid) (x y z : E), Equal x y -> Equal y z -> Equal x z. Proof. (* Goal: forall (E : Setoid) (x y z : Carrier E) (_ : @Equal E x y) (_ : @Equal E y z), @Equal E x z *) intros E; try assumption. (* Goal: forall (x y z : Carrier E) (_ : @Equal E x y) (_ : @Equal E y z), @Equal E x z *) cut (transitive (Equal (s:=E))); auto with algebra. Qed. Hint Resolve Refl: algebra. Hint Immediate Sym: algebra. Comments "Every type in Coq can be seen as a set, with the Leibnitz equality:". Let eqT_equiv : forall A : Type, equivalence (eq (A:=A)). Proof. (* Goal: forall A : Type, @equivalence A (@eq A) *) intros A; try assumption. (* Goal: @equivalence A (@eq A) *) red in |- *. (* Goal: and (@reflexive A (@eq A)) (@partial_equivalence A (@eq A)) *) split; [ try assumption | idtac ]. (* Goal: @partial_equivalence A (@eq A) *) (* Goal: @reflexive A (@eq A) *) red in |- *. (* Goal: @partial_equivalence A (@eq A) *) (* Goal: forall x : A, @app_rel A (@eq A) x x *) unfold app_rel in |- *; auto with algebra. (* Goal: @partial_equivalence A (@eq A) *) red in |- *. (* Goal: and (@transitive A (@eq A)) (@symmetric A (@eq A)) *) split; [ try assumption | idtac ]. (* Goal: @symmetric A (@eq A) *) (* Goal: @transitive A (@eq A) *) red in |- *. (* Goal: @symmetric A (@eq A) *) (* Goal: forall (x y z : A) (_ : @app_rel A (@eq A) x y) (_ : @app_rel A (@eq A) y z), @app_rel A (@eq A) x z *) unfold app_rel in |- *; auto with algebra. (* Goal: @symmetric A (@eq A) *) (* Goal: forall (x y z : A) (_ : @eq A x y) (_ : @eq A y z), @eq A x z *) intros x y z H' H'0; try assumption. (* Goal: @symmetric A (@eq A) *) (* Goal: @eq A x z *) rewrite H'; auto with algebra. (* Goal: @symmetric A (@eq A) *) red in |- *. (* Goal: forall (x y : A) (_ : @app_rel A (@eq A) x y), @app_rel A (@eq A) y x *) unfold app_rel in |- *; auto with algebra. Qed. Definition Leibnitz_set (A : Type) : Setoid := Build_Setoid (eqT_equiv A). Lemma Leibnitz_set_prop : forall (A : Type) (x y : Leibnitz_set A), Equal x y -> x = y. Proof. (* Goal: forall (A : Type) (x y : Carrier (Leibnitz_set A)) (_ : @Equal (Leibnitz_set A) x y), @eq (Carrier (Leibnitz_set A)) x y *) auto with algebra. Qed. Lemma Leibnitz_set_prop_rev : forall (A : Type) (x y : Leibnitz_set A), x = y -> Equal x y. Proof. (* Goal: forall (A : Type) (x y : Carrier (Leibnitz_set A)) (_ : @eq (Carrier (Leibnitz_set A)) x y), @Equal (Leibnitz_set A) x y *) auto with algebra. Qed. Section Quotient1. Comments "We can now define quotient sets, using equivalence relations on sets". Comments "A binary relation on a set is a binary relation on its carrier, which is compatible with equality:". Variable E : Setoid. Definition rel_compatible (R : relation E) : Prop := forall x x' y y' : E, Equal x x' -> Equal y y' -> app_rel R x y -> app_rel R x' y'. Record Relation : Type := {Rel_fun :> relation E; Rel_compatible_prf : rel_compatible Rel_fun}. Lemma Rel_comp : forall (R : Relation) (x x' y y' : E), Equal x x' -> Equal y y' -> app_rel R x y -> app_rel R x' y'. Proof. (* Goal: forall (R : Relation) (x x' y y' : Carrier E) (_ : @Equal E x x') (_ : @Equal E y y') (_ : @app_rel (Carrier E) (Rel_fun R) x y), @app_rel (Carrier E) (Rel_fun R) x' y' *) intros R; try assumption. (* Goal: forall (x x' y y' : Carrier E) (_ : @Equal E x x') (_ : @Equal E y y') (_ : @app_rel (Carrier E) (Rel_fun R) x y), @app_rel (Carrier E) (Rel_fun R) x' y' *) exact (Rel_compatible_prf (r:=R)). Qed. Hint Resolve Rel_comp: algebra. Variable R : Relation. Hypothesis R_equiv : equivalence R. Set Strict Implicit. Unset Implicit Arguments. Definition quotient : Setoid := Build_Setoid R_equiv. Set Implicit Arguments. Unset Strict Implicit. End Quotient1. Section Maps1. Comments "Maps between two sets are functions which are compatible with equalities:". Section Maps1_1. Variable A B : Setoid. Definition fun_compatible (f : A -> B) : Prop := forall x y : A, Equal x y -> Equal (f x) (f y). Record Map : Type := {Ap :> A -> B; Map_compatible_prf :> fun_compatible Ap:Prop}. Comments "Two maps are equal when they have the same values:". Definition Map_eq (f g : Map) : Prop := forall x : A, Equal (f x) (g x). Let Map_eq_equiv : equivalence Map_eq. Proof. (* Goal: @equivalence Map Map_eq *) red in |- *. (* Goal: and (@reflexive Map Map_eq) (@partial_equivalence Map Map_eq) *) split; [ try assumption | idtac ]. (* Goal: @partial_equivalence Map Map_eq *) (* Goal: @reflexive Map Map_eq *) red in |- *. (* Goal: @partial_equivalence Map Map_eq *) (* Goal: forall x : Map, @app_rel Map Map_eq x x *) unfold Map_eq, app_rel in |- *; simpl in |- *; auto with algebra. (* Goal: @partial_equivalence Map Map_eq *) red in |- *. (* Goal: and (@transitive Map Map_eq) (@symmetric Map Map_eq) *) split; [ try assumption | idtac ]. (* Goal: @symmetric Map Map_eq *) (* Goal: @transitive Map Map_eq *) red in |- *. (* Goal: @symmetric Map Map_eq *) (* Goal: forall (x y z : Map) (_ : @app_rel Map Map_eq x y) (_ : @app_rel Map Map_eq y z), @app_rel Map Map_eq x z *) unfold Map_eq, app_rel in |- *; simpl in |- *; auto with algebra. (* Goal: @symmetric Map Map_eq *) (* Goal: forall (x y z : Map) (_ : forall x0 : Carrier A, @Equal B (Ap x x0) (Ap y x0)) (_ : forall x0 : Carrier A, @Equal B (Ap y x0) (Ap z x0)) (x0 : Carrier A), @Equal B (Ap x x0) (Ap z x0) *) intros x y z H' H'0 x0; try assumption. (* Goal: @symmetric Map Map_eq *) (* Goal: @Equal B (Ap x x0) (Ap z x0) *) apply Trans with (y x0); auto with algebra. (* Goal: @symmetric Map Map_eq *) red in |- *. (* Goal: forall (x y : Map) (_ : @app_rel Map Map_eq x y), @app_rel Map Map_eq y x *) unfold Map_eq, app_rel in |- *; simpl in |- *; auto with algebra. Qed. Definition MAP : Setoid := Build_Setoid Map_eq_equiv. Comments "We note" (MAP A B) "the set of maps between" A "and" B. End Maps1_1. Comments "Some immediate properties of maps:". Lemma Ap_comp : forall (A B : Setoid) (f g : MAP A B) (x y : A), Equal x y -> Equal f g -> Equal (f x) (g y). Proof. (* Goal: forall (A B : Setoid) (f g : Carrier (MAP A B)) (x y : Carrier A) (_ : @Equal A x y) (_ : @Equal (MAP A B) f g), @Equal B (@Ap A B f x) (@Ap A B g y) *) intros A B f g x y H' H'0; try assumption. (* Goal: @Equal B (@Ap A B f x) (@Ap A B g y) *) apply Trans with (f y). (* Goal: @Equal B (@Ap A B f y) (@Ap A B g y) *) (* Goal: @Equal B (@Ap A B f x) (@Ap A B f y) *) apply (Map_compatible_prf f); auto with algebra. (* Goal: @Equal B (@Ap A B f y) (@Ap A B g y) *) simpl in H'0. (* Goal: @Equal B (@Ap A B f y) (@Ap A B g y) *) unfold Map_eq in H'0. (* Goal: @Equal B (@Ap A B f y) (@Ap A B g y) *) auto with algebra. Qed. Hint Resolve Ap_comp: algebra. Lemma map_ext : forall (A B : Setoid) (f g : MAP A B), (forall x : A, Equal (f x) (g x)) -> Equal f g. Proof. (* Goal: forall (A B : Setoid) (f g : Carrier (MAP A B)) (_ : forall x : Carrier A, @Equal B (@Ap A B f x) (@Ap A B g x)), @Equal (MAP A B) f g *) simpl in |- *. (* Goal: forall (A B : Setoid) (f g : Map A B) (_ : forall x : Carrier A, @Equal B (@Ap A B f x) (@Ap A B g x)), @Map_eq A B f g *) unfold Map_eq in |- *. (* Goal: forall (A B : Setoid) (f g : Map A B) (_ : forall x : Carrier A, @Equal B (@Ap A B f x) (@Ap A B g x)) (x : Carrier A), @Equal B (@Ap A B f x) (@Ap A B g x) *) auto with algebra. Qed. Hint Resolve map_ext: algebra. Section Maps1_2. Comments "We define now injections, surjections and bijections.". Variable A B : Setoid. Definition injective (f : MAP A B) : Prop := forall x y : A, Equal (f x) (f y) -> Equal x y. Definition surjective (f : MAP A B) : Prop := forall y : B, exists x : A, Equal y (f x). Definition bijective (f : MAP A B) : Prop := injective f /\ surjective f. End Maps1_2. Comments "These definitions are coherent with equality of maps:". Lemma injective_comp : forall (A B : Setoid) (f f' : MAP A B), injective f -> Equal f f' -> injective f'. Proof. (* Goal: forall (A B : Setoid) (f f' : Carrier (MAP A B)) (_ : @injective A B f) (_ : @Equal (MAP A B) f f'), @injective A B f' *) unfold injective in |- *. (* Goal: forall (A B : Setoid) (f f' : Carrier (MAP A B)) (_ : forall (x y : Carrier A) (_ : @Equal B (@Ap A B f x) (@Ap A B f y)), @Equal A x y) (_ : @Equal (MAP A B) f f') (x y : Carrier A) (_ : @Equal B (@Ap A B f' x) (@Ap A B f' y)), @Equal A x y *) intros A B f f' H' H'0 x y H'1; try assumption. (* Goal: @Equal A x y *) apply H'. (* Goal: @Equal B (@Ap A B f x) (@Ap A B f y) *) apply Trans with (Ap f' x); auto with algebra. (* Goal: @Equal B (@Ap A B f' x) (@Ap A B f y) *) apply Trans with (Ap f' y); auto with algebra. Qed. Lemma surjective_comp : forall (A B : Setoid) (f f' : MAP A B), surjective f -> Equal f f' -> surjective f'. Proof. (* Goal: forall (A B : Setoid) (f f' : Carrier (MAP A B)) (_ : @surjective A B f) (_ : @Equal (MAP A B) f f'), @surjective A B f' *) unfold surjective in |- *. (* Goal: forall (A B : Setoid) (f f' : Carrier (MAP A B)) (_ : forall y : Carrier B, @ex (Carrier A) (fun x : Carrier A => @Equal B y (@Ap A B f x))) (_ : @Equal (MAP A B) f f') (y : Carrier B), @ex (Carrier A) (fun x : Carrier A => @Equal B y (@Ap A B f' x)) *) intros A B f f' H' H'0 y; try assumption. (* Goal: @ex (Carrier A) (fun x : Carrier A => @Equal B y (@Ap A B f' x)) *) elim (H' y); intros x E; try exact E. (* Goal: @ex (Carrier A) (fun x : Carrier A => @Equal B y (@Ap A B f' x)) *) exists x; try assumption. (* Goal: @Equal B y (@Ap A B f' x) *) apply Trans with (Ap f x); auto with algebra. Qed. Lemma bijective_comp : forall (A B : Setoid) (f f' : MAP A B), bijective f -> Equal f f' -> bijective f'. Proof. (* Goal: forall (A B : Setoid) (f f' : Carrier (MAP A B)) (_ : @bijective A B f) (_ : @Equal (MAP A B) f f'), @bijective A B f' *) unfold bijective in |- *. (* Goal: forall (A B : Setoid) (f f' : Carrier (MAP A B)) (_ : and (@injective A B f) (@surjective A B f)) (_ : @Equal (MAP A B) f f'), and (@injective A B f') (@surjective A B f') *) intros A B f f' H' H'0; try assumption. (* Goal: and (@injective A B f') (@surjective A B f') *) split; [ try assumption | idtac ]. (* Goal: @surjective A B f' *) (* Goal: @injective A B f' *) elim H'; intros H'1 H'2; try exact H'1; clear H'. (* Goal: @surjective A B f' *) (* Goal: @injective A B f' *) apply injective_comp with (f := f); auto with algebra. (* Goal: @surjective A B f' *) elim H'; intros H'1 H'2; try exact H'2; clear H'. (* Goal: @surjective A B f' *) apply surjective_comp with (f := f); auto with algebra. Qed. Comments "Trivialities:". Lemma bijective_injective : forall (A B : Setoid) (f : MAP A B), bijective f -> injective f. Proof. (* Goal: forall (A B : Setoid) (f : Carrier (MAP A B)) (_ : @bijective A B f), @injective A B f *) intros A B f H'; red in H'; auto with algebra. (* Goal: @injective A B f *) elim H'; auto with algebra. Qed. Hint Resolve bijective_injective: algebra. Lemma bijective_surjective : forall (A B : Setoid) (f : MAP A B), bijective f -> surjective f. Proof. (* Goal: forall (A B : Setoid) (f : Carrier (MAP A B)) (_ : @bijective A B f), @surjective A B f *) intros A B f H'; red in H'; auto with algebra. (* Goal: @surjective A B f *) elim H'; auto with algebra. Qed. Hint Resolve bijective_surjective: algebra. Set Strict Implicit. Unset Implicit Arguments. Definition surj_set_quo : forall (E : Setoid) (R : Relation E) (p : equivalence R), MAP E (quotient E R p). Proof. (* Goal: forall (E : Setoid) (R : Relation E) (p : @equivalence (Carrier E) (@Rel_fun E R)), Carrier (MAP E (quotient E R p)) *) intros E R p; try assumption. (* Goal: Carrier (MAP E (quotient E R p)) *) apply (Build_Map (A:=E) (B:=quotient E R p) (Ap:=fun x : E => x)). (* Goal: @fun_compatible E (quotient E R p) (fun x : Carrier E => x) *) generalize p; clear p. (* Goal: forall p : @equivalence (Carrier E) (@Rel_fun E R), @fun_compatible E (quotient E R p) (fun x : Carrier E => x) *) elim R. (* Goal: forall (Rel_fun0 : relation (Carrier E)) (Rel_compatible_prf : @rel_compatible E Rel_fun0) (p : @equivalence (Carrier E) (@Rel_fun E (@Build_Relation E Rel_fun0 Rel_compatible_prf))), @fun_compatible E (quotient E (@Build_Relation E Rel_fun0 Rel_compatible_prf) p) (fun x : Carrier E => x) *) intros Rel_fun' Rel_compatible_prf0 p; try assumption. (* Goal: @fun_compatible E (quotient E (@Build_Relation E Rel_fun' Rel_compatible_prf0) p) (fun x : Carrier E => x) *) red in |- *. (* Goal: forall (x y : Carrier E) (_ : @Equal E x y), @Equal (quotient E (@Build_Relation E Rel_fun' Rel_compatible_prf0) p) x y *) red in Rel_compatible_prf0. (* Goal: forall (x y : Carrier E) (_ : @Equal E x y), @Equal (quotient E (@Build_Relation E Rel_fun' Rel_compatible_prf0) p) x y *) intros x y H'; try assumption. (* Goal: @Equal (quotient E (@Build_Relation E Rel_fun' Rel_compatible_prf0) p) x y *) simpl in |- *. (* Goal: Rel_fun' x y *) unfold app_rel in Rel_compatible_prf0. (* Goal: Rel_fun' x y *) apply Rel_compatible_prf0 with (x := x) (y := x); auto with algebra. (* Goal: Rel_fun' x x *) elim p. (* Goal: forall (_ : @reflexive (Carrier E) (@Rel_fun E (@Build_Relation E Rel_fun' Rel_compatible_prf0))) (_ : @partial_equivalence (Carrier E) (@Rel_fun E (@Build_Relation E Rel_fun' Rel_compatible_prf0))), Rel_fun' x x *) intros H'0 H'1; try assumption. (* Goal: Rel_fun' x x *) simpl in H'0. (* Goal: Rel_fun' x x *) red in H'0. (* Goal: Rel_fun' x x *) unfold app_rel in H'0. (* Goal: Rel_fun' x x *) auto with algebra. Qed. Set Implicit Arguments. Unset Strict Implicit. Lemma surj_set_quo_surjective : forall (E : Setoid) (R : Relation E) (p : equivalence R), surjective (surj_set_quo E R p). Proof. (* Goal: forall (E : Setoid) (R : Relation E) (p : @equivalence (Carrier E) (@Rel_fun E R)), @surjective E (quotient E R p) (surj_set_quo E R p) *) intros E R p; try assumption. (* Goal: @surjective E (quotient E R p) (surj_set_quo E R p) *) red in |- *. (* Goal: forall y : Carrier (quotient E R p), @ex (Carrier E) (fun x : Carrier E => @Equal (quotient E R p) y (@Ap E (quotient E R p) (surj_set_quo E R p) x)) *) intros y; exists y; try assumption. (* Goal: @Equal (quotient E R p) y (@Ap E (quotient E R p) (surj_set_quo E R p) y) *) simpl in |- *. (* Goal: @Rel_fun E R y y *) elim p. (* Goal: forall (_ : @reflexive (Carrier E) (@Rel_fun E R)) (_ : @partial_equivalence (Carrier E) (@Rel_fun E R)), @Rel_fun E R y y *) intros H'; red in H'. (* Goal: forall _ : @partial_equivalence (Carrier E) (@Rel_fun E R), @Rel_fun E R y y *) unfold app_rel in H'. (* Goal: forall _ : @partial_equivalence (Carrier E) (@Rel_fun E R), @Rel_fun E R y y *) auto with algebra. Qed. Section Maps1_3. Comments "We define the composition of maps:". Variable E F G : Setoid. Variable g : MAP F G. Variable f : MAP E F. Comments "First, we define the composition of the functions associated to two maps:" f "and" g. Definition comp_map_fun (x : E) := g (f x). Comments "Then, we proof that the result is compatible with equality:". Lemma comp_map_fun_compatible : fun_compatible comp_map_fun. Proof. (* Goal: @fun_compatible E G comp_map_fun *) red in |- *. (* Goal: forall (x y : Carrier E) (_ : @Equal E x y), @Equal G (comp_map_fun x) (comp_map_fun y) *) unfold comp_map_fun in |- *. (* Goal: forall (x y : Carrier E) (_ : @Equal E x y), @Equal G (@Ap F G g (@Ap E F f x)) (@Ap F G g (@Ap E F f y)) *) auto with algebra. Qed. Comments "With this result, we can build the composed map:". Definition comp_map_map : MAP E G := Build_Map comp_map_fun_compatible. End Maps1_3. Comments "We note" (comp_map_map g f) "the composition of" g "and" f. Comments "Composition is compatible with equality of maps:". Lemma comp_map_comp : forall (A B C : Setoid) (f f' : MAP A B) (g g' : MAP B C), Equal f f' -> Equal g g' -> Equal (comp_map_map g f) (comp_map_map g' f'). Proof. (* Goal: forall (A B C : Setoid) (f f' : Carrier (MAP A B)) (g g' : Carrier (MAP B C)) (_ : @Equal (MAP A B) f f') (_ : @Equal (MAP B C) g g'), @Equal (MAP A C) (@comp_map_map A B C g f) (@comp_map_map A B C g' f') *) unfold comp_map_map in |- *; simpl in |- *. (* Goal: forall (A B C : Setoid) (f f' : Map A B) (g g' : Map B C) (_ : @Map_eq A B f f') (_ : @Map_eq B C g g'), @Map_eq A C (@Build_Map A C (@comp_map_fun A B C g f) (@comp_map_fun_compatible A B C g f)) (@Build_Map A C (@comp_map_fun A B C g' f') (@comp_map_fun_compatible A B C g' f')) *) unfold Map_eq in |- *; simpl in |- *; auto with algebra. (* Goal: forall (A B C : Setoid) (f f' : Map A B) (g g' : Map B C) (_ : forall x : Carrier A, @Equal B (@Ap A B f x) (@Ap A B f' x)) (_ : forall x : Carrier B, @Equal C (@Ap B C g x) (@Ap B C g' x)) (x : Carrier A), @Equal C (@comp_map_fun A B C g f x) (@comp_map_fun A B C g' f' x) *) unfold comp_map_fun in |- *. (* Goal: forall (A B C : Setoid) (f f' : Map A B) (g g' : Map B C) (_ : forall x : Carrier A, @Equal B (@Ap A B f x) (@Ap A B f' x)) (_ : forall x : Carrier B, @Equal C (@Ap B C g x) (@Ap B C g' x)) (x : Carrier A), @Equal C (@Ap B C g (@Ap A B f x)) (@Ap B C g' (@Ap A B f' x)) *) auto with algebra. Qed. Hint Resolve comp_map_comp: algebra. Comments "Composition is associative:". Lemma comp_map_assoc : forall (A B C D : Setoid) (f : MAP A B) (g : MAP B C) (h : MAP C D), Equal (comp_map_map h (comp_map_map g f)) (comp_map_map (comp_map_map h g) f). Proof. (* Goal: forall (A B C D : Setoid) (f : Carrier (MAP A B)) (g : Carrier (MAP B C)) (h : Carrier (MAP C D)), @Equal (MAP A D) (@comp_map_map A C D h (@comp_map_map A B C g f)) (@comp_map_map A B D (@comp_map_map B C D h g) f) *) unfold comp_map_map in |- *; simpl in |- *. (* Goal: forall (A B C D : Setoid) (f : Map A B) (g : Map B C) (h : Map C D), @Map_eq A D (@Build_Map A D (@comp_map_fun A C D h (@Build_Map A C (@comp_map_fun A B C g f) (@comp_map_fun_compatible A B C g f))) (@comp_map_fun_compatible A C D h (@Build_Map A C (@comp_map_fun A B C g f) (@comp_map_fun_compatible A B C g f)))) (@Build_Map A D (@comp_map_fun A B D (@Build_Map B D (@comp_map_fun B C D h g) (@comp_map_fun_compatible B C D h g)) f) (@comp_map_fun_compatible A B D (@Build_Map B D (@comp_map_fun B C D h g) (@comp_map_fun_compatible B C D h g)) f)) *) unfold Map_eq in |- *; simpl in |- *; auto with algebra. Qed. Hint Resolve comp_map_assoc: algebra. Comments "We define now the identity map:". Definition Id : forall A : Setoid, MAP A A. Proof. (* Goal: forall A : Setoid, Carrier (MAP A A) *) intros A; try assumption. (* Goal: Carrier (MAP A A) *) apply (Build_Map (A:=A) (B:=A) (Ap:=fun x : A => x)). (* Goal: @fun_compatible A A (fun x : Carrier A => x) *) red in |- *. (* Goal: forall (x y : Carrier A) (_ : @Equal A x y), @Equal A x y *) auto with algebra. Qed. Comments "Identity map is a unit element for composition:". Lemma Id_unit_r : forall (A B : Setoid) (f : MAP A B), Equal (comp_map_map f (Id A)) f. Proof. (* Goal: forall (A B : Setoid) (f : Carrier (MAP A B)), @Equal (MAP A B) (@comp_map_map A A B f (Id A)) f *) unfold comp_map_map in |- *; simpl in |- *. (* Goal: forall (A B : Setoid) (f : Map A B), @Map_eq A B (@Build_Map A B (@comp_map_fun A A B f (Id A)) (@comp_map_fun_compatible A A B f (Id A))) f *) unfold Map_eq in |- *; simpl in |- *; auto with algebra. Qed. Hint Resolve Id_unit_r: algebra. Lemma Id_unit_l : forall (A B : Setoid) (f : MAP A B), Equal (comp_map_map (Id B) f) f. Proof. (* Goal: forall (A B : Setoid) (f : Carrier (MAP A B)), @Equal (MAP A B) (@comp_map_map A B B (Id B) f) f *) unfold comp_map_map in |- *; simpl in |- *. (* Goal: forall (A B : Setoid) (f : Map A B), @Map_eq A B (@Build_Map A B (@comp_map_fun A B B (Id B) f) (@comp_map_fun_compatible A B B (Id B) f)) f *) unfold Map_eq in |- *; simpl in |- *; auto with algebra. Qed. Hint Resolve Id_unit_l: algebra. Lemma Id_is_bijective : forall A : Setoid, bijective (Id A). Proof. (* Goal: forall A : Setoid, @bijective A A (Id A) *) intros A; red in |- *. (* Goal: and (@injective A A (Id A)) (@surjective A A (Id A)) *) split; [ red in |- * | idtac ]. (* Goal: @surjective A A (Id A) *) (* Goal: forall (x y : Carrier A) (_ : @Equal A (@Ap A A (Id A) x) (@Ap A A (Id A) y)), @Equal A x y *) simpl in |- *; auto with algebra. (* Goal: @surjective A A (Id A) *) red in |- *. (* Goal: forall y : Carrier A, @ex (Carrier A) (fun x : Carrier A => @Equal A y (@Ap A A (Id A) x)) *) intros y; exists y; try assumption; auto with algebra. Qed. Hint Resolve Id_is_bijective: algebra. Comments "Some properties of composition:". Lemma comp_injective : forall (A B C : Setoid) (f : MAP A B) (g : MAP B C), injective (comp_map_map g f) -> injective f. Proof. (* Goal: forall (A B C : Setoid) (f : Carrier (MAP A B)) (g : Carrier (MAP B C)) (_ : @injective A C (@comp_map_map A B C g f)), @injective A B f *) unfold injective in |- *. (* Goal: forall (A B C : Setoid) (f : Carrier (MAP A B)) (g : Carrier (MAP B C)) (_ : forall (x y : Carrier A) (_ : @Equal C (@Ap A C (@comp_map_map A B C g f) x) (@Ap A C (@comp_map_map A B C g f) y)), @Equal A x y) (x y : Carrier A) (_ : @Equal B (@Ap A B f x) (@Ap A B f y)), @Equal A x y *) intros A B C f g H' x y H'0; try assumption. (* Goal: @Equal A x y *) apply H'. (* Goal: @Equal C (@Ap A C (@comp_map_map A B C g f) x) (@Ap A C (@comp_map_map A B C g f) y) *) unfold comp_map_map in |- *; simpl in |- *. (* Goal: @Equal C (@comp_map_fun A B C g f x) (@comp_map_fun A B C g f y) *) unfold comp_map_fun in |- *. (* Goal: @Equal C (@Ap B C g (@Ap A B f x)) (@Ap B C g (@Ap A B f y)) *) auto with algebra. Qed. Hint Resolve comp_injective: algebra. Lemma comp_surjective : forall (A B C : Setoid) (f : MAP A B) (g : MAP B C), surjective (comp_map_map g f) -> surjective g. Proof. (* Goal: forall (A B C : Setoid) (f : Carrier (MAP A B)) (g : Carrier (MAP B C)) (_ : @surjective A C (@comp_map_map A B C g f)), @surjective B C g *) unfold surjective in |- *. (* Goal: forall (A B C : Setoid) (f : Carrier (MAP A B)) (g : Carrier (MAP B C)) (_ : forall y : Carrier C, @ex (Carrier A) (fun x : Carrier A => @Equal C y (@Ap A C (@comp_map_map A B C g f) x))) (y : Carrier C), @ex (Carrier B) (fun x : Carrier B => @Equal C y (@Ap B C g x)) *) intros A B C f g H' y; try assumption. (* Goal: @ex (Carrier B) (fun x : Carrier B => @Equal C y (@Ap B C g x)) *) elim (H' y); intros x E; try exact E. (* Goal: @ex (Carrier B) (fun x : Carrier B => @Equal C y (@Ap B C g x)) *) simpl in E. (* Goal: @ex (Carrier B) (fun x : Carrier B => @Equal C y (@Ap B C g x)) *) unfold comp_map_fun in E. (* Goal: @ex (Carrier B) (fun x : Carrier B => @Equal C y (@Ap B C g x)) *) exists (Ap f x); try assumption; auto with algebra. Qed. Lemma comp_is_id_then_bijective : forall (A B : Setoid) (f : MAP A B) (g : MAP B A), Equal (comp_map_map g f) (Id A) -> Equal (comp_map_map f g) (Id B) -> bijective f. Proof. (* Goal: forall (A B : Setoid) (f : Carrier (MAP A B)) (g : Carrier (MAP B A)) (_ : @Equal (MAP A A) (@comp_map_map A B A g f) (Id A)) (_ : @Equal (MAP B B) (@comp_map_map B A B f g) (Id B)), @bijective A B f *) intros A B f g H' H'0; try assumption. (* Goal: @bijective A B f *) unfold bijective in |- *. (* Goal: and (@injective A B f) (@surjective A B f) *) split; [ try assumption | idtac ]. (* Goal: @surjective A B f *) (* Goal: @injective A B f *) apply comp_injective with A g; auto with algebra. (* Goal: @surjective A B f *) (* Goal: @injective A A (@comp_map_map A B A g f) *) apply injective_comp with (f := Id A); auto with algebra. (* Goal: @surjective A B f *) apply comp_surjective with B g; auto with algebra. (* Goal: @surjective B B (@comp_map_map B A B f g) *) apply surjective_comp with (f := Id B); auto with algebra. Qed. Lemma comp_is_id_then_injective : forall (A B : Setoid) (f : MAP A B) (g : MAP B A), Equal (comp_map_map g f) (Id A) -> injective f. Proof. (* Goal: forall (A B : Setoid) (f : Carrier (MAP A B)) (g : Carrier (MAP B A)) (_ : @Equal (MAP A A) (@comp_map_map A B A g f) (Id A)), @injective A B f *) intros A B f g H'; try assumption. (* Goal: @injective A B f *) apply comp_injective with A g; auto with algebra. (* Goal: @injective A A (@comp_map_map A B A g f) *) apply injective_comp with (f := Id A); auto with algebra. Qed. Lemma comp_is_id_then_surjective : forall (A B : Setoid) (f : MAP A B) (g : MAP B A), Equal (comp_map_map f g) (Id B) -> surjective f. Proof. (* Goal: forall (A B : Setoid) (f : Carrier (MAP A B)) (g : Carrier (MAP B A)) (_ : @Equal (MAP B B) (@comp_map_map B A B f g) (Id B)), @surjective A B f *) intros A B f g H'; try assumption. (* Goal: @surjective A B f *) apply comp_surjective with B g; auto with algebra. (* Goal: @surjective B B (@comp_map_map B A B f g) *) apply surjective_comp with (f := Id B); auto with algebra. Qed. End Maps1. End Sets1. Hint Immediate Sym: algebra. Hint Unfold reflexive transitive symmetric partial_equivalence equivalence: algebra. Hint Resolve equiv_refl equiv_sym equiv_trans Prf_equiv Refl Rel_comp Ap_comp map_ext bijective_injective bijective_surjective surj_set_quo_surjective comp_map_comp comp_map_assoc Id_unit_r Id_unit_l Id_is_bijective comp_injective: algebra.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrbool ssrfun eqtype ssrnat fintype bigop finset. From mathcomp Require Import fingroup morphism automorphism quotient gproduct. Import GroupScope. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Delimit Scope gFun_scope with gF. Module GFunctor. Definition object_map := forall gT : finGroupType, {set gT} -> {set gT}. Bind Scope gFun_scope with object_map. Section Definitions. Implicit Types gT hT : finGroupType. Variable F : object_map. Definition group_valued := forall gT (G : {group gT}), group_set (F G). Definition closed := forall gT (G : {group gT}), F G \subset G. Definition continuous := forall gT hT (G : {group gT}) (phi : {morphism G >-> hT}), phi @* F G \subset F (phi @* G). Definition iso_continuous := forall gT hT (G : {group gT}) (phi : {morphism G >-> hT}), 'injm phi -> phi @* F G \subset F (phi @* G). Lemma continuous_is_iso_continuous : continuous -> iso_continuous. Proof. (* Goal: forall _ : continuous, iso_continuous *) by move=> Fcont gT hT G phi inj_phi; apply: Fcont. Qed. Definition pcontinuous := forall gT hT (G D : {group gT}) (phi : {morphism D >-> hT}), phi @* F G \subset F (phi @* G). Lemma pcontinuous_is_continuous : pcontinuous -> continuous. Proof. (* Goal: forall _ : pcontinuous, continuous *) by move=> Fcont gT hT G; apply: Fcont. Qed. Definition hereditary := forall gT (H G : {group gT}), H \subset G -> F G :&: H \subset F H. Lemma pcontinuous_is_hereditary : pcontinuous -> hereditary. Proof. (* Goal: forall _ : pcontinuous, hereditary *) move=> Fcont gT H G sHG; rewrite -{2}(setIidPl sHG) setIC. (* 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) (@F 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)) (@F gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT G)))))) *) by do 2!rewrite -(morphim_idm (subsetIl H _)) morphimIdom ?Fcont. Qed. Definition monotonic := forall gT (H G : {group gT}), H \subset G -> F H \subset F G. Variables (k : unit) (F1 F2 : object_map). Definition comp_head : object_map := fun gT A => let: tt := k in F1 (F2 A). Definition modulo : object_map := fun gT A => coset (F2 A) @*^-1 (F1 (A / (F2 A))). End Definitions. Section ClassDefinitions. Structure iso_map := IsoMap { apply : object_map; _ : group_valued apply; _ : closed apply; _ : iso_continuous apply }. Local Coercion apply : iso_map >-> object_map. Structure map := Map { iso_of_map : iso_map; _ : continuous iso_of_map }. Local Coercion iso_of_map : map >-> iso_map. Structure pmap := Pmap { map_of_pmap : map; _ : hereditary map_of_pmap }. Local Coercion map_of_pmap : pmap >-> map. Structure mono_map := MonoMap { map_of_mono : map; _ : monotonic map_of_mono }. Local Coercion map_of_mono : mono_map >-> map. Definition pack_iso F Fcont Fgrp Fsub := @IsoMap F Fgrp Fsub Fcont. Definition clone_iso (F : object_map) := fun Fgrp Fsub Fcont (isoF := @IsoMap F Fgrp Fsub Fcont) => fun isoF0 & phant_id (apply isoF0) F & phant_id isoF isoF0 => isoF. Definition clone (F : object_map) := fun isoF & phant_id (apply isoF) F => fun (funF0 : map) & phant_id (apply funF0) F => fun Fcont (funF := @Map isoF Fcont) & phant_id funF0 funF => funF. Definition clone_pmap (F : object_map) := fun (funF : map) & phant_id (apply funF) F => fun (pfunF0 : pmap) & phant_id (apply pfunF0) F => fun Fher (pfunF := @Pmap funF Fher) & phant_id pfunF0 pfunF => pfunF. Definition clone_mono (F : object_map) := fun (funF : map) & phant_id (apply funF) F => fun (mfunF0 : mono_map) & phant_id (apply mfunF0) F => fun Fmon (mfunF := @MonoMap funF Fmon) & phant_id mfunF0 mfunF => mfunF. End ClassDefinitions. Canonical gFgroup := Group gFgroupset. End FunctorGroup. Canonical gFmod_group (F1 : GFunctor.iso_map) (F2 : GFunctor.object_map) (gT : finGroupType) (G : {group gT}) := [group of (F1 %% F2)%gF gT G]. Section IsoFunctorTheory. Implicit Types gT rT : finGroupType. Variable F : GFunctor.iso_map. Lemma gFsub gT (G : {group gT}) : F gT G \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)) (@GFunctor.apply F gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *) by case: F gT G. Qed. Lemma gFsub_trans gT (G : {group gT}) (A : pred_class) : G \subset A -> F gT G \subset A. Proof. (* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base 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)) (@GFunctor.apply F gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) A)) *) exact/subset_trans/gFsub. Qed. Lemma gFiso_cont : GFunctor.iso_continuous F. Proof. (* Goal: GFunctor.iso_continuous (@GFunctor.apply F) *) by case F. Qed. Lemma gFchar gT (G : {group gT}) : F gT G \char G. Proof. (* Goal: is_true (@characteristic gT (@GFunctor.apply F gT (@gval gT G)) (@gval gT G)) *) apply/andP; split => //; first by apply: gFsub. (* Goal: is_true (@FiniteQuant.quant0b (perm.perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) (fun f : Finite.sort (perm.perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) => @FiniteQuant.all_in (perm.perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (perm.perm_for_finType (FinGroup.arg_finType (FinGroup.base gT)))) f (@mem (Finite.sort (perm.perm_for_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (perm.perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (perm.perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT (@gval gT G))))) (FiniteQuant.Quantified (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_finType (FinGroup.base gT)) (@perm.PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) f) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@GFunctor.apply F 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)) (@GFunctor.apply F gT (@gval gT G)))))) f)) *) apply/forall_inP=> f Af; rewrite -{2}(im_autm Af) -(autmE Af). (* 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)) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_finType (FinGroup.base gT)) (@autm gT (@gval gT G) f Af) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@GFunctor.apply F 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)) (@GFunctor.apply F gT (@morphim gT gT (@gval gT G) (@autm_morphism gT (@gval gT G) f Af) (@MorPhantom gT gT (@autm gT (@gval gT G) f Af)) (@gval gT G)))))) *) by rewrite -morphimEsub ?gFsub ?gFiso_cont ?injm_autm. Qed. Lemma gFnorm gT (G : {group gT}) : G \subset 'N(F gT G). Proof. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@GFunctor.apply F gT (@gval gT G)))))) *) exact/char_norm/gFchar. Qed. Lemma gFnorms gT (G : {group gT}) : 'N(G) \subset 'N(F gT 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)) (@normaliser 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 (@GFunctor.apply F gT (@gval gT G)))))) *) exact/char_norms/gFchar. Qed. Lemma gFnormal gT (G : {group gT}) : F gT G <| G. Proof. (* Goal: is_true (@normal gT (@GFunctor.apply F gT (@gval gT G)) (@gval gT G)) *) exact/char_normal/gFchar. Qed. Lemma gFchar_trans gT (G H : {group gT}) : H \char G -> F gT H \char G. Proof. (* Goal: forall _ : is_true (@characteristic gT (@gval gT H) (@gval gT G)), is_true (@characteristic gT (@GFunctor.apply F gT (@gval gT H)) (@gval gT G)) *) exact/char_trans/gFchar. Qed. Lemma gFnormal_trans gT (G H : {group gT}) : H <| G -> F gT H <| G. Proof. (* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), is_true (@normal gT (@GFunctor.apply F gT (@gval gT H)) (@gval gT G)) *) exact/char_normal_trans/gFchar. Qed. Lemma gFnorm_trans gT (A : pred_class) (G : {group gT}) : A \subset 'N(G) -> A \subset 'N(F gT G). Proof. (* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) 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)))) 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 (@GFunctor.apply F gT (@gval gT G)))))) *) by move/subset_trans/(_ (gFnorms G)). Qed. Lemma injmF_sub gT rT (G D : {group gT}) (f : {morphism D >-> rT}) : 'injm f -> G \subset D -> f @* (F gT G) \subset F rT (f @* G). Proof. (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D))))), is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@GFunctor.apply F gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.apply F rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) *) move=> injf sGD; have:= gFiso_cont (injm_restrm sGD injf). (* Goal: forall _ : is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) (@restrm_morphism gT rT (@gval gT G) (@gval gT D) sGD f) (@MorPhantom gT rT (@mfun gT rT (@gval gT G) (@restrm_morphism gT rT (@gval gT G) (@gval gT D) sGD f))) (@GFunctor.apply F gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.apply F rT (@morphim gT rT (@gval gT G) (@restrm_morphism gT rT (@gval gT G) (@gval gT D) sGD f) (@MorPhantom gT rT (@mfun gT rT (@gval gT G) (@restrm_morphism gT rT (@gval gT G) (@gval gT D) sGD f))) (@gval gT G)))))), is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@GFunctor.apply F gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.apply F rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) *) by rewrite im_restrm morphim_restrm (setIidPr _) ?gFsub. Qed. Lemma injmF gT rT (G D : {group gT}) (f : {morphism D >-> rT}) : 'injm f -> G \subset D -> f @* (F gT G) = F rT (f @* G). Proof. (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D))))), @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@GFunctor.apply F gT (@gval gT G))) (@GFunctor.apply F rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) *) move=> injf sGD; have [sfGD injf'] := (morphimS f sGD, injm_invm injf). (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@GFunctor.apply F gT (@gval gT G))) (@GFunctor.apply F rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) *) apply/esym/eqP; rewrite eqEsubset -(injmSK injf') ?gFsub_trans //. (* Goal: is_true (andb (@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)) (@morphim rT gT (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) D)) (@invm_morphism gT rT D f injf) (@MorPhantom rT gT (@mfun rT gT (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) D)) (@invm_morphism gT rT D f injf))) (@GFunctor.apply F rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@morphim rT gT (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) D)) (@invm_morphism gT rT D f injf) (@MorPhantom rT gT (@mfun rT gT (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) D)) (@invm_morphism gT rT D f injf))) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@GFunctor.apply F gT (@gval gT G))))))) (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@GFunctor.apply F gT (@gval gT 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)) (@GFunctor.apply F rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) *) by rewrite !(subset_trans (injmF_sub _ _)) ?morphim_invm // gFsub_trans. Qed. Lemma gFisom gT rT (G D : {group gT}) R (f : {morphism D >-> rT}) : G \subset D -> isom G (gval R) f -> isom (F gT G) (F rT R) f. Proof. (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D))))) (_ : is_true (@isom gT rT (@gval gT G) (@gval rT R) (@mfun gT rT (@gval gT D) f))), is_true (@isom gT rT (@GFunctor.apply F gT (@gval gT G)) (@GFunctor.apply F rT (@gval rT R)) (@mfun gT rT (@gval gT D) f)) *) case/(restrmP f)=> g [gf _ _ _]; rewrite -{f}gf => /isomP[injg <-]. (* Goal: is_true (@isom gT rT (@GFunctor.apply F gT (@gval gT G)) (@GFunctor.apply F rT (@morphim gT rT (@gval gT G) g (@MorPhantom gT rT (@mfun gT rT (@gval gT G) g)) (@gval gT G))) (@mfun gT rT (@gval gT G) g)) *) by rewrite sub_isom ?gFsub ?injmF. Qed. Lemma gFisog gT rT (G : {group gT}) (R : {group rT}) : G \isog R -> F gT G \isog F rT R. Proof. (* Goal: forall _ : is_true (@isog gT rT (@gval gT G) (@gval rT R)), is_true (@isog gT rT (@GFunctor.apply F gT (@gval gT G)) (@GFunctor.apply F rT (@gval rT R))) *) by case/isogP=> f injf <-; rewrite -injmF // sub_isog ?gFsub. Qed. End IsoFunctorTheory. Section FunctorTheory. Implicit Types gT rT : finGroupType. Variable F : GFunctor.map. Lemma gFcont : GFunctor.continuous F. Proof. (* Goal: GFunctor.continuous (@GFunctor.apply (GFunctor.iso_of_map F)) *) by case F. Qed. Lemma morphimF gT rT (G D : {group gT}) (f : {morphism D >-> rT}) : G \subset D -> f @* (F gT G) \subset F rT (f @* G). Proof. (* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D)))), is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@GFunctor.apply (GFunctor.iso_of_map F) gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.apply (GFunctor.iso_of_map F) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) *) move=> sGD; rewrite -(setIidPr (gFsub F G)). (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@GFunctor.apply (GFunctor.iso_of_map F) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.apply (GFunctor.iso_of_map F) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) *) by rewrite -{3}(setIid G) -!(morphim_restrm sGD) gFcont. Qed. End FunctorTheory. Section PartialFunctorTheory. Implicit Types gT rT : finGroupType. Section BasicTheory. Variable F : GFunctor.pmap. Lemma gFhereditary : GFunctor.hereditary F. Proof. (* Goal: GFunctor.hereditary (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F))) *) by case F. Qed. Lemma gFunctorI gT (G H : {group gT}) : F gT G :&: H = F gT G :&: F gT (G :&: H). Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)) (@gval gT H)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H)))) *) rewrite -{1}(setIidPr (gFsub F G)) [G :&: _]setIC -setIA. (* 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)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H)))) *) rewrite -(setIidPr (gFhereditary (subsetIl G 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)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT (@setI_group gT G H))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)) (@gval gT (@setI_group gT G H)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H)))) *) by rewrite setIC -setIA (setIidPr (gFsub F (G :&: H))). Qed. Lemma pmorphimF : GFunctor.pcontinuous F. Lemma gFid gT (G : {group gT}) : F gT (F gT G) = F gT G. Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)) *) apply/eqP; rewrite eqEsubset gFsub. (* Goal: is_true (andb true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) 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)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))))) *) by move/gFhereditary: (gFsub F G); rewrite setIid /=. Qed. End BasicTheory. Section Modulo. Variables (F1 : GFunctor.pmap) (F2 : GFunctor.map). Lemma gFmod_closed : GFunctor.closed (F1 %% F2). Proof. (* Goal: GFunctor.closed (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2))) *) by move=> gT G; rewrite sub_cosetpre_quo ?gFsub ?gFnormal. Qed. Lemma gFmod_cont : GFunctor.continuous (F1 %% F2). Proof. (* Goal: GFunctor.continuous (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2))) *) move=> gT rT G f; have nF2 := gFnorm F2. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) *) have sDF: G \subset 'dom (coset (F2 _ G)) by rewrite nF2. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) *) have sDFf: G \subset 'dom (coset (F2 _ (f @* G)) \o f). (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@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)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f))))))) *) by rewrite -sub_morphim_pre ?subsetIl // nF2. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) *) pose K := 'ker (restrm sDFf (coset (F2 _ (f @* G)) \o f)). (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) *) have sFK: 'ker (restrm sDF (coset (F2 _ G))) \subset K. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@restrm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) 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)) K))) *) rewrite {}/K !ker_restrm ker_comp /= subsetI subsetIl !ker_coset /=. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))))) *) by rewrite -sub_morphim_pre ?subsetIl // morphimIdom ?morphimF. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) *) have sOF := gFsub F1 (G / F2 _ G); have sGG: G \subset G by []. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) *) rewrite -sub_quotient_pre; last first. (* Goal: is_true (@subset (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@mem (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G))))) (predPredType (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@SetDef.pred_of_set (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))) (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@mem (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G))))) (predPredType (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@SetDef.pred_of_set (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)) (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G))))))) *) by apply: subset_trans (nF2 _ _); rewrite morphimS ?gFmod_closed. (* Goal: is_true (@subset (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@mem (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G))))) (predPredType (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@SetDef.pred_of_set (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))) (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@mem (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G))))) (predPredType (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@SetDef.pred_of_set (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)) (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))))) *) suffices im_fact H : F2 _ G \subset gval H -> H \subset G -> factm sFK sGG @* (H / F2 _ G) = f @* H / F2 _ (f @* G). (* 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)) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq (@set_of (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))))))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))))) (@gval gT G)) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG)) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) *) (* Goal: is_true (@subset (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@mem (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G))))) (predPredType (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@SetDef.pred_of_set (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))) (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@mem (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G))))) (predPredType (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@SetDef.pred_of_set (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)) (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))))) *) - (* 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)) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq (@set_of (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))))))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))))) (@gval gT G)) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG)) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) *) (* Goal: is_true (@subset (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@mem (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G))))) (predPredType (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@SetDef.pred_of_set (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT (@gval gT G))) (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@mem (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G))))) (predPredType (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@SetDef.pred_of_set (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)) (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))))) *) rewrite -2?im_fact ?gFmod_closed ?gFsub //. (* 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)) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq (@set_of (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))))))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))))) (@gval gT G)) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG)) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@GFunctor.apply (GFunctor.iso_of_map F2) 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 (@gFmod_group (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT G))))) *) (* Goal: is_true (@subset (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@mem (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G))))) (predPredType (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@SetDef.pred_of_set (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))))) (@gval gT G)) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG)) (@quotient gT (@gval gT (@gFmod_group (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT G)) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))))) (@mem (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G))))) (predPredType (Finite.sort (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))))) (@SetDef.pred_of_set (@coset_finType rT (@gval rT (@gFgroup (GFunctor.iso_of_map F2) rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))))) (@gval gT G)) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG)) (@quotient gT (@gval gT G) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))))))) *) by rewrite cosetpreK morphimF /= ?morphim_restrm ?setIid. (* 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)) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq (@set_of (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))))))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))))) (@gval gT G)) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG)) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@GFunctor.apply (GFunctor.iso_of_map F2) 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 (@gFmod_group (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@GFunctor.apply (GFunctor.iso_of_map F2)) gT G))))) *) by rewrite -sub_quotient_pre ?normG //= trivg_quotient sub1G. (* 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)) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq (@set_of (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))))))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))))) (@gval gT G)) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG)) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) *) move=> sFH sHG; rewrite -(morphimIdom _ (H / _)) /= {2}morphim_restrm setIid. (* Goal: @eq (@set_of (FinGroup.finType (@coset_baseGroupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (Phant (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@restrm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) (@gval gT G)) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@normaliser rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G G (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@normaliser rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@gval gT G) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) sFK sGG)) (@setI (FinGroup.arg_finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) (@gval gT G)) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map F2) gT (@gval gT G))))) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) *) rewrite -morphimIG ?ker_coset // -(morphim_restrm sDF) morphim_factm. (* Goal: @eq (@set_of (FinGroup.finType (@coset_baseGroupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (Phant (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@morphim gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@normaliser rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@gval gT G) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@normaliser rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) (@mfun gT rT (@gval gT G) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) G (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))))))) (@gval gT H)) (@quotient rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map F2) rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)))) *) by rewrite morphim_restrm morphim_comp -quotientE morphimIdom. Qed. Canonical gFmod_igFun := [igFun by gFmod_closed & gFmod_cont]. Canonical gFmod_gFun := [gFun by gFmod_cont]. End Modulo. Variables F1 F2 : GFunctor.pmap. Lemma gFmod_hereditary : GFunctor.hereditary (F1 %% F2). Proof. (* Goal: GFunctor.hereditary (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)))) *) move=> gT H G sHG; set FGH := _ :&: H; have nF2H := gFnorm F2 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)) FGH)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@GFunctor.modulo (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2))) gT (@gval gT H))))) *) rewrite -sub_quotient_pre; last exact: subset_trans (subsetIr _ _) _. (* Goal: is_true (@subset (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@quotient gT FGH (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))))) *) pose rH := restrm nF2H (coset (F2 _ H)); pose rHM := [morphism of rH]. (* Goal: is_true (@subset (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@quotient gT FGH (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))))) *) have rnorm_simpl: rHM @* H = H / F2 _ H by rewrite morphim_restrm setIid. (* Goal: is_true (@subset (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@quotient gT FGH (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))))) *) have nF2G := subset_trans sHG (gFnorm F2 G). (* Goal: is_true (@subset (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@quotient gT FGH (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))))) *) pose rG := restrm nF2G (coset (F2 _ G)); pose rGM := [morphism of rG]. (* Goal: is_true (@subset (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@quotient gT FGH (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))))) *) have sqKfK: 'ker rGM \subset 'ker rHM. (* Goal: is_true (@subset (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@quotient gT FGH (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) 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)) (@ker gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@gval gT H) rGM (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@gval gT H) rGM))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@gval gT H) rHM (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@gval gT H) rHM)))))) *) rewrite !ker_restrm !ker_coset (setIidPr (gFsub F2 _)) setIC /=. (* Goal: is_true (@subset (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@quotient gT FGH (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)) (@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)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))) *) exact: gFhereditary. (* Goal: is_true (@subset (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@quotient gT FGH (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H)))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@gFgroup (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT H))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))))) *) have sHH := subxx H; rewrite -rnorm_simpl /= -(morphim_factm sqKfK sHH) /=. (* Goal: is_true (@subset (@coset_finType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@mem (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (predPredType (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@quotient gT FGH (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))) (@mem (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (predPredType (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@gval gT H) rGM (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) rG) (@gval gT H)) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) H H rHM rGM sqKfK sHH) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) H H rHM rGM sqKfK sHH)) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@gval gT H) rGM (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) rG) (@gval gT H))))))) *) apply: subset_trans (gFcont F1 _); rewrite /= {2}morphim_restrm setIid /=. (* Goal: is_true (@subset (FinGroup.finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@mem (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (predPredType (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@quotient gT FGH (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))) (@mem (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (predPredType (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@SetDef.pred_of_set (FinGroup.finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@gval gT H) rGM (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) rG) (@gval gT H)) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) H H rHM rGM sqKfK sHH) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) H H rHM rGM sqKfK sHH)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@gval gT H))))))) *) apply: subset_trans (morphimS _ (gFhereditary _ (quotientS _ sHG))) => /=. (* Goal: is_true (@subset (FinGroup.finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@mem (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (predPredType (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@quotient gT FGH (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))) (@mem (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (predPredType (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@SetDef.pred_of_set (FinGroup.finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@gval gT H) rGM (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) rG) (@gval gT H)) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) H H rHM rGM sqKfK sHH) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) H H rHM rGM sqKfK sHH)) (@setI (FinGroup.arg_finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@quotient gT (@gval gT G) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))))))) *) have ->: FGH / _ = restrm nF2H (coset _) @* FGH. (* Goal: is_true (@subset (FinGroup.finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@mem (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (predPredType (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@gval gT H) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@gval gT H) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) nF2H (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@restrm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@gval gT H) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) nF2H (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))) FGH))) (@mem (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (predPredType (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@SetDef.pred_of_set (FinGroup.finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@gval gT H) rGM (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) rG) (@gval gT H)) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) H H rHM rGM sqKfK sHH) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) H H rHM rGM sqKfK sHH)) (@setI (FinGroup.arg_finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@quotient gT (@gval gT G) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))))))) *) (* Goal: @eq (@set_of (@coset_finType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (Phant (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))) (@quotient gT FGH (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@gval gT H) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@gval gT H) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) nF2H (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@restrm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@gval gT H) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) nF2H (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))) FGH) *) by rewrite morphim_restrm setICA setIid. (* Goal: is_true (@subset (FinGroup.finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@mem (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (predPredType (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@gval gT H) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@gval gT H) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) nF2H (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@restrm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@gval gT H) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) nF2H (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))))) FGH))) (@mem (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (predPredType (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@SetDef.pred_of_set (FinGroup.finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H)))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@gval gT H) rGM (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) rG) (@gval gT H)) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) H H rHM rGM sqKfK sHH) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT H))) H H rHM rGM sqKfK sHH)) (@setI (FinGroup.arg_finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@quotient gT (@gval gT G) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))))))) *) rewrite -(morphim_factm sqKfK sHH) morphimS //= morphim_restrm -quotientE. (* Goal: is_true (@subset (FinGroup.arg_finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@mem (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (predPredType (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) FGH) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))))) (@mem (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (predPredType (@coset_of gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@setI (FinGroup.arg_finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F1)) (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))) (@quotient gT (@gval gT G) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G)))) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F2)) gT (@gval gT G))))))) *) by rewrite setICA setIid (subset_trans (quotientI _ _ _)) // cosetpreK. Qed. Canonical gFmod_pgFun := [pgFun by gFmod_hereditary]. End PartialFunctorTheory. Section MonotonicFunctorTheory. Implicit Types gT rT : finGroupType. Lemma gFunctorS (F : GFunctor.mono_map) : GFunctor.monotonic F. Proof. (* Goal: GFunctor.monotonic (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_mono F))) *) by case: F. Qed. Section Composition. Variables (F1 : GFunctor.mono_map) (F2 : GFunctor.map). Lemma gFcomp_closed : GFunctor.closed (F1 \o F2). Proof. (* Goal: GFunctor.closed (@GFunctor.comp_head tt (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_mono F1))) (@GFunctor.apply (GFunctor.iso_of_map F2))) *) by move=> gT G; rewrite !gFsub_trans. Qed. Lemma gFcomp_cont : GFunctor.continuous (F1 \o F2). Proof. (* Goal: GFunctor.continuous (@GFunctor.comp_head tt (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_mono F1))) (@GFunctor.apply (GFunctor.iso_of_map F2))) *) move=> gT rT G phi; rewrite (subset_trans (morphimF _ _ (gFsub _ _))) //. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_mono F1)) rT (@morphim gT rT (@gval gT G) phi (@MorPhantom gT rT (@mfun gT rT (@gval gT G) phi)) (@gval gT (@gFgroup (GFunctor.iso_of_map F2) gT G)))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@GFunctor.comp_head tt (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_mono F1))) (@GFunctor.apply (GFunctor.iso_of_map F2)) rT (@morphim gT rT (@gval gT G) phi (@MorPhantom gT rT (@mfun gT rT (@gval gT G) phi)) (@gval gT G)))))) *) by rewrite (subset_trans (gFunctorS F1 (gFcont F2 phi))). Qed. Canonical gFcomp_igFun := [igFun by gFcomp_closed & gFcomp_cont]. Canonical gFcomp_gFun :=[gFun by gFcomp_cont]. End Composition. Variables F1 F2 : GFunctor.mono_map. Lemma gFcompS : GFunctor.monotonic (F1 \o F2). Proof. (* Goal: GFunctor.monotonic (@GFunctor.comp_head tt (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_mono F1))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_mono F2)))) *) by move=> gT H G sHG; rewrite !gFunctorS. Qed. Canonical gFcomp_mgFun := [mgFun by gFcompS]. End MonotonicFunctorTheory. Section GFunctorExamples. Implicit Types gT : finGroupType. Definition idGfun gT := @id {set gT}. Lemma idGfun_cont : GFunctor.continuous idGfun. Proof. by []. Qed. Proof. (* Goal: GFunctor.continuous idGfun *) by []. Qed. Canonical bgFunc_id := [igFun by idGfun_closed & idGfun_cont]. Canonical gFunc_id := [gFun by idGfun_cont]. Canonical mgFunc_id := [mgFun by idGfun_monotonic]. Definition trivGfun gT of {set gT} := [1 gT]. Lemma trivGfun_cont : GFunctor.pcontinuous trivGfun. Proof. (* Goal: GFunctor.pcontinuous trivGfun *) by move=> gT rT D G f; rewrite morphim1. Qed. Canonical trivGfun_igFun := [igFun by sub1G & trivGfun_cont]. Canonical trivGfun_gFun := [gFun by trivGfun_cont]. Canonical trivGfun_pgFun := [pgFun by trivGfun_cont]. End GFunctorExamples.
Require Export GeoCoq.Elements.OriginalProofs.lemma_supplementsymmetric. Require Export GeoCoq.Elements.OriginalProofs.lemma_ABCequalsCBA. Require Export GeoCoq.Elements.OriginalProofs.lemma_equalanglestransitive. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma lemma_RTsymmetric : forall A B C D E F, RT A B C D E F -> RT D E F A B C. Proof. (* Goal: forall (A B C D E F : @Point Ax0) (_ : @RT Ax0 A B C D E F), @RT Ax0 D E F A B C *) intros. (* Goal: @RT Ax0 D E F A B C *) let Tf:=fresh in assert (Tf:exists a b c d e, (Supp a b c d e /\ CongA A B C a b c /\ CongA D E F d b e)) by (conclude_def RT );destruct Tf as [a[b[c[d[e]]]]];spliter. (* Goal: @RT Ax0 D E F A B C *) assert (Supp e b d c a) by (conclude lemma_supplementsymmetric). (* Goal: @RT Ax0 D E F A B C *) assert (nCol d b e) by (conclude lemma_equalanglesNC). (* Goal: @RT Ax0 D E F A B C *) assert (CongA d b e e b d) by (conclude lemma_ABCequalsCBA). (* Goal: @RT Ax0 D E F A B C *) assert (nCol a b c) by (conclude lemma_equalanglesNC). (* Goal: @RT Ax0 D E F A B C *) assert (CongA a b c c b a) by (conclude lemma_ABCequalsCBA). (* Goal: @RT Ax0 D E F A B C *) assert (CongA D E F e b d) by (conclude lemma_equalanglestransitive). (* Goal: @RT Ax0 D E F A B C *) assert (CongA A B C c b a) by (conclude lemma_equalanglestransitive). (* Goal: @RT Ax0 D E F A B C *) assert (RT D E F A B C) by (conclude_def RT ). (* Goal: @RT Ax0 D E F A B C *) close. Qed. End Euclid.
From mathcomp Require Import ssreflect ssrbool ssrnat seq eqtype. From LemmaOverloading Require Import prelude heaps terms prefix xfindCTC. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Definition invariant i j t h := [/\ interp j t = h, subctx i j & valid j t]. Theorem cancelR j k t1 t2 h1 h2 (f1 : Ast empc j t1 h1) (f2 : Ast j k t2 h2) : def h1 -> h1 = h2 -> eval k (cancel k t1 t2). Proof. (* Goal: forall (_ : is_true (def h1)) (_ : @eq heap h1 h2), eval k (cancel k t1 t2) *) case: f1 f2=>[[<- _ I]] [[<- S _]] D H. (* Goal: eval k (cancel k t1 t2) *) by apply: cancel_sound; rewrite -(interp_subctx I S). Qed.
Require Import Ensf_types. Require Import Ensf_dans. Fixpoint union (A : Ensf) : Ensf -> Ensf := fun B : Ensf => match A return Ensf with | empty => B | add x e => add x (union e B) end. Lemma union_a_empty : forall a : Ensf, a = union a empty :>Ensf. Proof. (* Goal: forall a : Ensf, @eq Ensf a (union a empty) *) simple induction a. (* Goal: forall (e : Elt) (e0 : Ensf) (_ : @eq Ensf e0 (union e0 empty)), @eq Ensf (add e e0) (union (add e e0) empty) *) (* Goal: @eq Ensf empty (union empty empty) *) apply refl_equal. (* Goal: forall (e : Elt) (e0 : Ensf) (_ : @eq Ensf e0 (union e0 empty)), @eq Ensf (add e e0) (union (add e e0) empty) *) intros a0 b H. (* Goal: @eq Ensf (add a0 b) (union (add a0 b) empty) *) simpl in |- *; auto. Qed. Hint Resolve union_a_empty. Lemma dans_union : forall (x : Elt) (a b : Ensf), dans x (union a b) -> dans x a \/ dans x b. Hint Resolve dans_union. Lemma union_g : forall (x : Elt) (a b : Ensf), dans x a -> dans x (union a b). Hint Resolve union_g. Lemma union_d : forall (x : Elt) (a b : Ensf), dans x b -> dans x (union a b). Proof. (* Goal: forall (x : Elt) (a b : Ensf) (_ : dans x b), dans x (union a b) *) intro x. (* Goal: forall (a b : Ensf) (_ : dans x b), dans x (union a b) *) simple induction a; simpl in |- *; auto. Qed. Hint Resolve union_d. Lemma dans_union_inv : forall (x : Elt) (a b : Ensf), dans x a \/ dans x b -> dans x (union a b). Proof. (* Goal: forall (x : Elt) (a b : Ensf) (_ : or (dans x a) (dans x b)), dans x (union a b) *) intros x a b H; elim H; auto. Qed.
Require Import String. Open Scope string_scope. Require Import Coq.FSets.FSets. Require Import Coq.Lists.List. Require Import Coq.Logic.Decidable. Require Import Metalib.CoqFSetDecide. Require Import Metalib.CoqListFacts. Open Scope coqeqdec_scope. Import KeySet. Module Import D := CoqFSetDecide.WDecide_fun X KeySet. Module KeySetProperties := FSetProperties.WProperties_fun X KeySet. Module KeySetFacts := FSetFacts.WFacts_fun X KeySet. Set Implicit Arguments. Definition one (C : Type) (item : C) : list C := cons item nil. Notation "x ~ a" := (one (x, a)) (at level 50) : list_scope. Arguments app _%type_scope _%list_scope _%list_scope. Open Scope list_scope. Fixpoint dom (C : Type) (E : list (X.t*C)) : KeySet.t := match E with | nil => empty | (x, _) :: E' => add x (dom E') end. Fixpoint get (C : Type) (x : X.t) (E : list (X.t*C)) : option C := match E with | nil => None | (y, c) :: F => if (x == y) then Some c else get x F end. Definition binds (A : Type) (x : X.t) (a : A) (E : list (X.t*A)) : Prop := List.In (x, a) E. Definition maps (A : Type) (x : X.t) (a : A) (E : list (X.t*A)) : Prop := get x E = Some a. Definition disjoint (A B : Type) (E : list (X.t*A)) (F : list (X.t*B)) : Prop := inter (dom E) (dom F) [<=] empty. Definition map (A B : Type) (f : A -> B) (E : list (X.t*A)) : list (X.t*B) := List.map (fun b => match b with (x, a) => (x, f a) end) E. Inductive uniq (A : Type) : list (X.t*A) -> Prop := | uniq_nil : uniq nil | uniq_push : forall x a E, uniq E -> ~ In x (dom E) -> uniq (x ~ a ++ E). Unset Implicit Arguments. Section ListProperties. Variable X : Type. Variables x y : X. Variables l l1 l2 l3 : list X. Lemma cons_app_one : cons x l = one x ++ l. Proof. (* Goal: @Logic.eq (list X) (@cons X x l) (@app X (@one X x) l) *) clear. (* Goal: @Logic.eq (list X) (@cons X x l) (@app X (@one X x) l) *) reflexivity. Qed. Lemma cons_app_assoc : (cons x l1) ++ l2 = cons x (l1 ++ l2). Proof. (* Goal: @Logic.eq (list X) (@app X (@cons X x l1) l2) (@cons X x (@app X l1 l2)) *) clear. (* Goal: @Logic.eq (list X) (@app X (@cons X x l1) l2) (@cons X x (@app X l1 l2)) *) reflexivity. Qed. Lemma app_assoc : (l1 ++ l2) ++ l3 = l1 ++ (l2 ++ l3). Proof. (* Goal: @Logic.eq (list X) (@app X (@app X l1 l2) l3) (@app X l1 (@app X l2 l3)) *) clear. (* Goal: @Logic.eq (list X) (@app X (@app X l1 l2) l3) (@app X l1 (@app X l2 l3)) *) auto with datatypes. Qed. Lemma app_nil_1 : nil ++ l = l. Proof. (* Goal: @Logic.eq (list X) (@app X (@nil X) l) l *) clear. (* Goal: @Logic.eq (list X) (@app X (@nil X) l) l *) reflexivity. Qed. Lemma app_nil_2 : l ++ nil = l. Proof. (* Goal: @Logic.eq (list X) (@app X l (@nil X)) l *) clear. (* Goal: @Logic.eq (list X) (@app X l (@nil X)) l *) auto with datatypes. Qed. Lemma in_nil_iff : List.In x nil <-> False. Proof. (* Goal: iff (@List.In X x (@nil X)) False *) clear. (* Goal: iff (@List.In X x (@nil X)) False *) split; inversion 1. Qed. Lemma in_one_iff : List.In x (one y) <-> x = y. Proof. (* Goal: iff (@List.In X x (@one X y)) (@Logic.eq X x y) *) clear. (* Goal: iff (@List.In X x (@one X y)) (@Logic.eq X x y) *) split. (* Goal: forall _ : @Logic.eq X x y, @List.In X x (@one X y) *) (* Goal: forall _ : @List.In X x (@one X y), @Logic.eq X x y *) inversion 1 as [ | HIn]; intuition. (* Goal: forall _ : @Logic.eq X x y, @List.In X x (@one X y) *) constructor; intuition. Qed. Lemma in_app_iff : List.In x (l1 ++ l2) <-> List.In x l1 \/ List.In x l2. Proof. (* Goal: iff (@List.In X x (@app X l1 l2)) (or (@List.In X x l1) (@List.In X x l2)) *) clear. (* Goal: iff (@List.In X x (@app X l1 l2)) (or (@List.In X x l1) (@List.In X x l2)) *) split; auto using List.in_or_app, List.in_app_or. Qed. End ListProperties. Section Properties. Variables A B key : Type. Variable f : A -> B. Variable x : X.t. Variable b : A. Variables E F G : list (X.t*A). Lemma map_nil : map f (@nil (X.t*A)) = nil. Proof. (* Goal: None *) clear. (* Goal: None *) reflexivity. Qed. Lemma map_one : map f (x ~ b) = (x ~ f b). Proof. (* Goal: None *) clear. (* Goal: None *) reflexivity. Qed. Lemma map_cons : map f ((x, b) :: E) = x ~ f b ++ map f E. Proof. (* Goal: None *) clear. (* Goal: None *) reflexivity. Qed. Lemma map_app : map f (E ++ F) = map f E ++ map f F. Proof. (* Goal: None *) clear. (* Goal: None *) unfold map. (* Goal: None *) rewrite List.map_app. (* Goal: None *) reflexivity. Qed. Lemma dom_nil : dom (@nil (X.t*A)) = empty. Proof. (* Goal: None *) clear. (* Goal: None *) reflexivity. Qed. Lemma dom_one : dom (x ~ b) [=] singleton x. Proof. (* Goal: None *) clear. (* Goal: None *) intros. (* Goal: None *) simpl. (* Goal: None *) fsetdec. Qed. Lemma dom_cons : dom ((x, b) :: E) [=] union (singleton x) (dom E). Proof. (* Goal: None *) clear. (* Goal: None *) intros. (* Goal: None *) simpl. (* Goal: None *) fsetdec. Qed. Lemma dom_app : dom (E ++ F) [=] union (dom E) (dom F). Proof. (* Goal: None *) clear. (* Goal: None *) intros. (* Goal: None *) induction E as [ | [? ?] ]; simpl; fsetdec. Qed. Lemma dom_map : dom (map f E) [=] dom E. Proof. (* Goal: None *) clear. (* Goal: None *) intros. (* Goal: None *) induction E as [ | [? ?] ]; simpl; fsetdec. Qed. End Properties. Hint Rewrite cons_app_one cons_app_assoc : rewr_list. Hint Rewrite app_assoc app_nil_1 app_nil_2 : rewr_list. Hint Rewrite in_nil_iff in_one_iff in_app_iff : rewr_list_in. Hint Rewrite map_nil map_one map_cons map_app : rewr_map. Hint Rewrite dom_nil dom_one dom_cons dom_app dom_map : rewr_dom. Ltac simpl_alist := autorewrite with rewr_list rewr_map rewr_dom. Tactic Notation "simpl_alist" "in" hyp(H) := autorewrite with rewr_list rewr_map rewr_dom in H. Tactic Notation "simpl_alist" "in" "*" := autorewrite with rewr_list rewr_map rewr_dom in *. Tactic Notation "rewrite_alist" constr(E) := match goal with | |- context[?x] => change x with E | |- context[?x] => replace x with E; [ | try reflexivity; simpl_alist; reflexivity ] end. Tactic Notation "rewrite_alist" constr(E) "in" hyp(H) := match type of H with | context[?x] => change x with E in H | context[?x] => replace x with E in H; [ | try reflexivity; simpl_alist; reflexivity ] end. Lemma alist_ind : forall (A : Type) (P : list (X.t * A) -> Type), Proof. (* Goal: None *) induction xs as [ | [x a] xs ]. (* Goal: None *) (* Goal: None *) auto. (* Goal: None *) change (P (x ~ a ++ xs)). (* Goal: None *) auto. Qed. Tactic Notation "alist" "induction" ident(E) := try (intros until E); let T := type of E in let T := eval compute in T in match T with | list (?key * ?A) => induction E using (alist_ind A) end. Tactic Notation "alist" "induction" ident(E) "as" simple_intropattern(P) := try (intros until E); let T := type of E in let T := eval compute in T in match T with | list (?key * ?A) => induction E as P using (alist_ind A) end. Section Disjoint. Implicit Types A B C : Type. Lemma disjoint_sym_1 : forall A B (E : list (X.t*A)) (F : list (X.t*B)), Proof. (* Goal: None *) unfold disjoint. (* Goal: None *) fsetdec. Qed. Lemma disjoint_sym : forall A B (E : list (X.t*A)) (F : list (X.t*B)), Proof. (* Goal: None *) intuition auto using disjoint_sym_1. Qed. Lemma disjoint_nil_1 : forall A B (E : list (X.t*B)), Proof. (* Goal: None *) unfold disjoint. (* Goal: None *) fsetdec. Qed. Lemma disjoint_one_1 : forall A B (x : X.t) (a : A) (F : list (X.t*B)), Proof. (* Goal: None *) unfold disjoint. (* Goal: None *) simpl. (* Goal: None *) fsetdec. Qed. Lemma disjoint_one_2 : forall A B (x : X.t) (a : A) (F : list (X.t*B)), Proof. (* Goal: None *) unfold disjoint. (* Goal: None *) simpl. (* Goal: None *) fsetdec. Qed. Lemma disjoint_one_l : forall A B (x : X.t) (a : A) (E : list (X.t*B)), Proof. (* Goal: None *) unfold disjoint. (* Goal: None *) simpl. (* Goal: None *) split; fsetdec. Qed. Lemma disjoint_one_r : forall A B (x : X.t) (a : A) (E : list (X.t*B)), Proof. (* Goal: None *) intros. (* Goal: None *) rewrite disjoint_sym. (* Goal: None *) apply disjoint_one_l. Qed. Lemma disjoint_cons_1 : forall A B x a (E : list (X.t*A)) (F : list (X.t*B)), Proof. (* Goal: None *) unfold disjoint. (* Goal: None *) simpl. (* Goal: None *) fsetdec. Qed. Lemma disjoint_cons_2 : forall A B x a (E : list (X.t*A)) (F : list (X.t*B)), Proof. (* Goal: None *) unfold disjoint. (* Goal: None *) simpl. (* Goal: None *) fsetdec. Qed. Lemma disjoint_cons_3 : forall A B x a (E : list (X.t*A)) (F : list (X.t*B)), Proof. (* Goal: None *) unfold disjoint. (* Goal: None *) simpl. (* Goal: None *) fsetdec. Qed. Lemma disjoint_cons_l : forall A B x a (E : list (X.t*A)) (F : list (X.t*B)), Proof. (* Goal: None *) split. (* Goal: None *) (* Goal: None *) eauto using disjoint_cons_1, disjoint_cons_2. (* Goal: None *) intros [? ?]. (* Goal: None *) auto using disjoint_cons_3. Qed. Lemma disjoint_cons_r : forall A B x a (E : list (X.t*A)) (F : list (X.t*B)), Proof. (* Goal: None *) intros. (* Goal: None *) rewrite disjoint_sym. (* Goal: None *) apply disjoint_cons_l. Qed. Lemma disjoint_app_1 : forall A B (E F : list (X.t*A)) (G : list (X.t*B)), Proof. (* Goal: None *) unfold disjoint. (* Goal: None *) intros. (* Goal: None *) rewrite dom_app in *. (* Goal: None *) fsetdec. Qed. Lemma disjoint_app_2 : forall A B (E F : list (X.t*A)) (G : list (X.t*B)), Proof. (* Goal: None *) unfold disjoint. (* Goal: None *) intros. (* Goal: None *) rewrite dom_app in *. (* Goal: None *) fsetdec. Qed. Lemma disjoint_app_3 : forall A B (E F : list (X.t*A)) (G : list (X.t*B)), Proof. (* Goal: None *) unfold disjoint. (* Goal: None *) intros. (* Goal: None *) rewrite dom_app in *. (* Goal: None *) fsetdec. Qed. Lemma disjoint_app_l : forall A B (E F : list (X.t*A)) (G : list (X.t*B)), Proof. (* Goal: None *) intuition eauto 2 using disjoint_app_1, disjoint_app_2, disjoint_app_3. Qed. Lemma disjoint_app_r : forall A B (E F : list (X.t*A)) (G : list (X.t*B)), Proof. (* Goal: None *) intros. (* Goal: None *) rewrite disjoint_sym. (* Goal: None *) apply disjoint_app_l. Qed. Lemma disjoint_map_1 : forall A B C (E : list (X.t*A)) (F : list (X.t*B)) (f:A->C), Proof. (* Goal: None *) unfold disjoint. (* Goal: None *) intros. (* Goal: None *) rewrite dom_map in *. (* Goal: None *) fsetdec. Qed. Lemma disjoint_map_2 : forall A B C (E : list (X.t*A)) (F : list (X.t*B)) (f:A->C), Proof. (* Goal: None *) unfold disjoint. (* Goal: None *) intros. (* Goal: None *) rewrite dom_map in *. (* Goal: None *) fsetdec. Qed. Lemma disjoint_map_l : forall A B C (E : list (X.t*A)) (F : list (X.t*B)) (f:A->C), Proof. (* Goal: None *) intuition eauto using disjoint_map_1, disjoint_map_2. Qed. Lemma disjoint_map_r : forall A B C (E : list (X.t*A)) (F : list (X.t*B)) (f:A->C), Proof. (* Goal: None *) intros. (* Goal: iff (@disjoint B C F (@map A C f E)) (@disjoint A B E F) *) rewrite disjoint_sym. (* Goal: iff (@disjoint C B (@map A C f E) F) (@disjoint A B E F) *) apply disjoint_map_l. Qed. End Disjoint. Section UniqProperties. Variables A B : Type. Variables f : A -> B. Variables x : X.t. Variables a b : A. Variables E F G : list (X.t*A). Lemma uniq_one_1 : uniq (x ~ b). Proof. (* Goal: None *) clear. (* Goal: None *) rewrite_alist ((x ~ b) ++ nil). (* Goal: None *) apply uniq_push. (* Goal: None *) (* Goal: None *) apply uniq_nil. (* Goal: None *) apply empty_1. Qed. Lemma uniq_cons_1 : uniq ((x, a) :: E) -> uniq E. Proof. (* Goal: None *) clear. (* Goal: None *) inversion 1. (* Goal: @uniq A E *) trivial. Qed. Lemma uniq_cons_2 : uniq ((x, a) :: E) -> ~ In x (dom E). Proof. (* Goal: None *) clear. (* Goal: None *) inversion 1. (* Goal: None *) trivial. Qed. Lemma uniq_cons_3 : uniq E -> ~ In x (dom E) -> uniq ((x, a) :: E). Proof. (* Goal: None *) clear. (* Goal: None *) intros. (* Goal: None *) change (uniq (x ~ a ++ E)). (* Goal: None *) apply uniq_push; trivial. Qed. Lemma uniq_cons_iff : uniq ((x, a) :: E) <-> uniq E /\ ~ In x (dom E). Proof. (* Goal: None *) clear. (* Goal: None *) split. (* Goal: None *) (* Goal: None *) eauto using uniq_cons_1, uniq_cons_2. (* Goal: None *) intros [? ?]. (* Goal: None *) auto using uniq_cons_3. Qed. Lemma uniq_app_1 : uniq (E ++ F) -> uniq E. Proof. (* Goal: None *) clear. (* Goal: None *) intros J. (* Goal: @uniq A E *) alist induction E. (* Goal: None *) (* Goal: None *) apply uniq_nil. (* Goal: None *) inversion J; subst. (* Goal: None *) rewrite dom_app in *. (* Goal: None *) apply uniq_push. (* Goal: None *) (* Goal: @uniq A l *) auto. (* Goal: None *) fsetdec. Qed. Lemma uniq_app_2 : uniq (E ++ F) -> uniq F. Proof. (* Goal: None *) clear. (* Goal: None *) intros J. (* Goal: @uniq A F *) alist induction E. (* Goal: @uniq A F *) (* Goal: @uniq A F *) auto. (* Goal: @uniq A F *) inversion J; subst. (* Goal: @uniq A F *) auto. Qed. Lemma uniq_app_3 : uniq (E ++ F) -> disjoint E F. Proof. (* Goal: None *) clear. (* Goal: None *) intros J. (* Goal: @disjoint A A E F *) unfold disjoint. (* Goal: None *) alist induction E as [ | ? ? ? IH ]. (* Goal: None *) (* Goal: None *) fsetdec. (* Goal: None *) inversion J; subst. (* Goal: None *) simpl_alist in *. (* Goal: None *) lapply IH. (* Goal: None *) (* Goal: None *) fsetdec. (* Goal: None *) auto. Qed. Lemma uniq_app_4 : uniq E -> uniq F -> disjoint E F -> uniq (E ++ F). Proof. (* Goal: None *) clear. (* Goal: None *) intros HE HF Hd. (* Goal: None *) alist induction E as [ | x1 a1 E' ]. (* Goal: None *) (* Goal: None *) auto. (* Goal: None *) inversion HE; subst. (* Goal: None *) rewrite app_assoc. (* Goal: None *) apply uniq_push. (* Goal: None *) (* Goal: None *) rewrite disjoint_app_l, disjoint_one_l in *. (* Goal: None *) (* Goal: None *) intuition. (* Goal: None *) rewrite disjoint_app_l, disjoint_one_l, dom_app in *. (* Goal: None *) fsetdec. Qed. Lemma uniq_app_iff : uniq (E ++ F) <-> uniq E /\ uniq F /\ disjoint E F. Proof. (* Goal: None *) clear; intuition auto using uniq_app_1, uniq_app_2, uniq_app_3, uniq_app_4. Qed. Lemma uniq_map_1 : uniq (map f E) -> uniq E. Proof. (* Goal: forall _ : @uniq B (@map A B f E), @uniq A E *) clear. (* Goal: forall _ : @uniq B (@map A B f E), @uniq A E *) intros J. (* Goal: @uniq A E *) alist induction E as [ | x1 a1 E' ]. (* Goal: None *) (* Goal: None *) apply uniq_nil. (* Goal: None *) inversion J; subst. (* Goal: None *) rewrite dom_map in *. (* Goal: None *) apply uniq_push; auto. Qed. Lemma uniq_map_2 : uniq E -> uniq (map f E). Proof. (* Goal: forall _ : @uniq A E, @uniq B (@map A B f E) *) clear. (* Goal: forall _ : @uniq A E, @uniq B (@map A B f E) *) intros J. (* Goal: @uniq B (@map A B f E) *) alist induction E as [ | x1 a1 E' ]. (* Goal: None *) (* Goal: None *) apply uniq_nil. (* Goal: None *) inversion J; subst. (* Goal: None *) simpl_alist. (* Goal: None *) apply uniq_push. (* Goal: None *) (* Goal: @uniq B (@map A B f E') *) auto. (* Goal: None *) rewrite dom_map. (* Goal: None *) trivial. Qed. Lemma uniq_map_iff : uniq (map f E) <-> uniq E. Proof. (* Goal: iff (@uniq B (@map A B f E)) (@uniq A E) *) clear. (* Goal: iff (@uniq B (@map A B f E)) (@uniq A E) *) intuition auto using uniq_map_1, uniq_map_2. Qed. End UniqProperties. Section BindsProperties. Variable A B : Type. Variables f : A -> B. Variables x y : X.t. Variables a b : A. Variables b0 : B. Variables E F G : list (X.t*A). Lemma binds_nil_iff : binds x a nil <-> False. Proof. (* Goal: None *) clear. (* Goal: None *) split. (* Goal: None *) (* Goal: None *) inversion 1. (* Goal: None *) intuition. Qed. Lemma binds_one_1 : binds x a (y ~ b) -> x = y. Proof. (* Goal: None *) clear. (* Goal: None *) intros H. (* Goal: None *) inversion H as [HEq | HIn]. (* Goal: None *) (* Goal: None *) inversion HEq; intuition. (* Goal: None *) inversion HIn. Qed. Lemma binds_one_2 : binds x a (y ~ b) -> a = b. Proof. (* Goal: None *) clear. (* Goal: None *) intros H. (* Goal: @Logic.eq A a b *) inversion H as [HEq | HIn]. (* Goal: @Logic.eq A a b *) (* Goal: @Logic.eq A a b *) inversion HEq; intuition. (* Goal: @Logic.eq A a b *) inversion HIn. Qed. Lemma binds_one_3 : x = y -> a = b -> binds x a (y ~ b). Proof. (* Goal: None *) clear. (* Goal: None *) unfold binds. (* Goal: None *) intros. (* Goal: None *) simpl. (* Goal: None *) left. (* Goal: None *) congruence. Qed. Lemma binds_one_iff : binds x a (y ~ b) <-> x = y /\ a = b. Proof. (* Goal: None *) clear. (* Goal: None *) intuition auto using binds_one_1, binds_one_2, binds_one_3. Qed. Lemma binds_cons_1 : binds x a ((y, b) :: E) -> (x = y /\ a = b) \/ binds x a E. Proof. (* Goal: None *) clear. (* Goal: None *) inversion 1 as [J | J]; try injection J; auto. Qed. Lemma binds_cons_2 : x = y -> a = b -> binds x a ((y, b) :: E). Proof. (* Goal: None *) clear. (* Goal: None *) unfold binds. (* Goal: None *) simpl. (* Goal: None *) left. (* Goal: None *) f_equal; auto. Qed. Lemma binds_cons_3 : binds x a E -> binds x a ((y, b) :: E). Proof. (* Goal: None *) clear. (* Goal: None *) unfold binds. (* Goal: None *) simpl. (* Goal: None *) right. (* Goal: None *) trivial. Qed. Lemma binds_cons_iff : binds x a ((y, b) :: E) <-> (x = y /\ a = b) \/ binds x a E. Proof. (* Goal: None *) clear. (* Goal: None *) intuition auto using binds_cons_1, binds_cons_2, binds_cons_3. Qed. Lemma binds_app_1 : binds x a (E ++ F) -> binds x a E \/ binds x a F. Proof. (* Goal: None *) clear. (* Goal: None *) unfold binds. (* Goal: None *) rewrite in_app_iff. (* Goal: None *) auto. Qed. Lemma binds_app_2 : binds x a E -> binds x a (E ++ F). Proof. (* Goal: None *) clear. (* Goal: None *) unfold binds. (* Goal: None *) rewrite in_app_iff. (* Goal: None *) auto. Qed. Lemma binds_app_3 : binds x a F -> binds x a (E ++ F). Proof. (* Goal: None *) clear. (* Goal: None *) unfold binds. (* Goal: None *) rewrite in_app_iff. (* Goal: None *) auto. Qed. Lemma binds_app_iff : binds x a (E ++ F) <-> binds x a E \/ binds x a F. Proof. (* Goal: None *) clear. (* Goal: None *) unfold binds. (* Goal: None *) rewrite in_app_iff. (* Goal: None *) split; auto. Qed. Lemma binds_map_1 : (forall a b, f a = f b -> a = b) -> binds x (f a) (map f E) -> binds x a E. Proof. (* Goal: forall (_ : forall (a b : A) (_ : @Logic.eq B (f a) (f b)), @Logic.eq A a b) (_ : @binds B x (f a) (@map A B f E)), @binds A x a E *) clear. (* Goal: forall (_ : forall (a b : A) (_ : @Logic.eq B (f a) (f b)), @Logic.eq A a b) (_ : @binds B x (f a) (@map A B f E)), @binds A x a E *) alist induction E; intros ?. (* Goal: None *) (* Goal: None *) inversion 1. (* Goal: None *) unfold binds in *. (* Goal: None *) simpl. (* Goal: None *) intros [K | K]. (* Goal: None *) (* Goal: None *) left. (* Goal: None *) (* Goal: None *) injection K. (* Goal: None *) (* Goal: None *) intros. (* Goal: None *) (* Goal: None *) f_equal; auto. (* Goal: None *) right. (* Goal: None *) auto. Qed. Lemma binds_map_2 : binds x a E -> binds x (f a) (map f E). Proof. (* Goal: forall _ : @binds A x a E, @binds B x (f a) (@map A B f E) *) clear. (* Goal: forall _ : @binds A x a E, @binds B x (f a) (@map A B f E) *) alist induction E. (* Goal: None *) (* Goal: None *) inversion 1. (* Goal: None *) unfold binds in *. (* Goal: None *) simpl. (* Goal: None *) intros [? | ?]. (* Goal: None *) (* Goal: None *) left. (* Goal: None *) (* Goal: None *) congruence. (* Goal: None *) right. (* Goal: None *) auto. Qed. Lemma binds_map_3 : binds x b0 (map f E) -> exists a, f a = b0 /\ binds x a E. Proof. (* Goal: forall _ : @binds B x b0 (@map A B f E), @ex A (fun a : A => and (@Logic.eq B (f a) b0) (@binds A x a E)) *) alist induction E. (* Goal: None *) (* Goal: None *) - (* Goal: None *) inversion 1. (* BG Goal: None *) - (* Goal: None *) unfold binds in *. (* Goal: None *) simpl. (* Goal: None *) intros [? | ?]. (* Goal: None *) (* Goal: None *) inversion H; subst. (* Goal: None *) (* Goal: None *) exists a0. (* Goal: None *) (* Goal: None *) auto. (* Goal: None *) destruct IHl as [a1 [EQ B0]]; auto. (* Goal: None *) exists a1. (* Goal: None *) auto. Qed. Lemma binds_dom_contradiction : forall (E : list (X.t*A)), Proof. (* Goal: None *) clear. (* Goal: None *) intros E H1 H2. (* Goal: False *) alist induction E as [ | ? ? ? IH ]. (* Goal: False *) (* Goal: False *) inversion H1. (* Goal: False *) unfold binds in *. (* Goal: False *) simpl in *. (* Goal: False *) destruct H1 as [J | J]. (* Goal: False *) (* Goal: False *) injection J. (* Goal: False *) (* Goal: None *) fsetdec. (* Goal: False *) eapply IH. (* Goal: None *) (* Goal: None *) auto. (* Goal: None *) fsetdec. Qed. Lemma binds_app_uniq_1 : uniq (E ++ F) -> binds x a (E ++ F) -> (binds x a E /\ ~ In x (dom F)) \/ (binds x a F /\ ~ In x (dom E)). Proof. (* Goal: None *) clear. (* Goal: None *) intros J1 J2. (* Goal: None *) rewrite uniq_app_iff in J1. (* Goal: None *) unfold disjoint in J1. (* Goal: None *) rewrite binds_app_iff in J2. (* Goal: None *) assert (~ In x (dom F) \/ ~ In x (dom E)) by fsetdec. (* Goal: None *) intuition eauto using binds_dom_contradiction. Qed. Lemma binds_app_uniq_iff : uniq (E ++ F) -> (binds x a (E ++ F) <-> (binds x a E /\ ~ In x (dom F)) \/ (binds x a F /\ ~ In x (dom E))). Proof. (* Goal: None *) clear. (* Goal: None *) intuition auto using binds_app_uniq_1, binds_app_2, binds_app_3. Qed. End BindsProperties. Section BindsProperties2. Variable A B : Type. Variables f : A -> B. Variables x y : X.t. Variables a b : A. Variables E F G : list (X.t*A). Lemma binds_cons_uniq_1 : uniq ((y, b) :: E) -> binds x a ((y, b) :: E) -> (x = y /\ a = b /\ ~ In x (dom E)) \/ (binds x a E /\ x <> y). Proof. (* Goal: None *) clear. (* Goal: None *) intros J1 J2. (* Goal: None *) change ((y, b) :: E) with (y ~ b ++ E) in J1. (* Goal: None *) change ((y, b) :: E) with (y ~ b ++ E) in J2. (* Goal: None *) eapply binds_app_uniq_1 in J1; [ | eassumption ]. (* Goal: None *) destruct J1 as [[J3 ?] | [? ?]]. (* Goal: None *) (* Goal: None *) unfold binds in J3. (* Goal: None *) (* Goal: None *) simpl in J3. (* Goal: None *) (* Goal: None *) destruct J3 as [J4 | ]. (* Goal: None *) (* Goal: None *) (* Goal: None *) injection J4. (* Goal: None *) (* Goal: None *) (* Goal: None *) intros. (* Goal: None *) (* Goal: None *) (* Goal: None *) subst. (* Goal: None *) (* Goal: None *) (* Goal: None *) auto. (* Goal: None *) (* Goal: None *) intuition. (* Goal: None *) simpl in *. (* Goal: None *) right. (* Goal: None *) split; [ trivial | fsetdec ]. Qed. Lemma binds_cons_uniq_iff : uniq ((y, b) :: E) -> (binds x a ((y, b) :: E) <-> (x = y /\ a = b /\ ~ In x (dom E)) \/ (binds x a E /\ x <> y)). Proof. (* Goal: None *) clear. (* Goal: None *) intuition auto using binds_cons_uniq_1, binds_cons_2, binds_cons_3. Qed. End BindsProperties2. Hint Resolve @app_assoc @app_nil_2 @map_app @dom_one @dom_cons @dom_app @dom_map. Hint Resolve @disjoint_sym_1 @disjoint_nil_1 @disjoint_one_2 @disjoint_cons_3 @disjoint_app_3 @disjoint_map_2 @uniq_nil @uniq_push @uniq_one_1 @uniq_cons_3 @uniq_app_4 @uniq_map_2. Hint Resolve @binds_one_3 @binds_cons_2 @binds_cons_3 @binds_app_2 @binds_app_3 @binds_map_2. Section AssortedListProperties. Variable X : Type. Variables x : X. Variables xs ys zs : list X. Lemma one_eq_app : one x ++ xs = ys ++ zs -> (exists qs, ys = x :: qs /\ xs = qs ++ zs) \/ (ys = nil /\ zs = x :: xs). Proof. (* Goal: forall _ : @Logic.eq (list X) (@app X (@one X x) xs) (@app X ys zs), or (@ex (list X) (fun qs : list X => and (@Logic.eq (list X) ys (@cons X x qs)) (@Logic.eq (list X) xs (@app X qs zs)))) (and (@Logic.eq (list X) ys (@nil X)) (@Logic.eq (list X) zs (@cons X x xs))) *) clear. (* Goal: forall _ : @Logic.eq (list X) (@app X (@one X x) xs) (@app X ys zs), or (@ex (list X) (fun qs : list X => and (@Logic.eq (list X) ys (@cons X x qs)) (@Logic.eq (list X) xs (@app X qs zs)))) (and (@Logic.eq (list X) ys (@nil X)) (@Logic.eq (list X) zs (@cons X x xs))) *) auto using CoqListFacts.cons_eq_app. Qed. Lemma app_eq_one : ys ++ zs = one x ++ xs -> (exists qs, ys = x :: qs /\ xs = qs ++ zs) \/ (ys = nil /\ zs = x :: xs). Proof. (* Goal: forall _ : @Logic.eq (list X) (@app X ys zs) (@app X (@one X x) xs), or (@ex (list X) (fun qs : list X => and (@Logic.eq (list X) ys (@cons X x qs)) (@Logic.eq (list X) xs (@app X qs zs)))) (and (@Logic.eq (list X) ys (@nil X)) (@Logic.eq (list X) zs (@cons X x xs))) *) clear. (* Goal: forall _ : @Logic.eq (list X) (@app X ys zs) (@app X (@one X x) xs), or (@ex (list X) (fun qs : list X => and (@Logic.eq (list X) ys (@cons X x qs)) (@Logic.eq (list X) xs (@app X qs zs)))) (and (@Logic.eq (list X) ys (@nil X)) (@Logic.eq (list X) zs (@cons X x xs))) *) auto using CoqListFacts.app_eq_cons. Qed. Lemma nil_neq_one_mid : nil <> xs ++ one x ++ ys. Proof. (* Goal: not (@Logic.eq (list X) (@nil X) (@app X xs (@app X (@one X x) ys))) *) clear. (* Goal: not (@Logic.eq (list X) (@nil X) (@app X xs (@app X (@one X x) ys))) *) induction xs; simpl_alist; intros J; inversion J. Qed. Lemma one_mid_neq_nil : xs ++ one x ++ ys <> nil. Proof. (* Goal: not (@Logic.eq (list X) (@app X xs (@app X (@one X x) ys)) (@nil X)) *) clear. (* Goal: not (@Logic.eq (list X) (@app X xs (@app X (@one X x) ys)) (@nil X)) *) intros H. (* Goal: False *) symmetry in H. (* Goal: False *) auto using nil_neq_one_mid. Qed. End AssortedListProperties. Ltac destruct_uniq := match goal with | H : uniq nil |- _ => clear H; destruct_uniq | H : uniq (?x ~ ?a) |- _ => clear H; destruct_uniq | H : uniq ((?x, ?a) :: ?E) |- _ => let J := fresh "UniqTac" in pose proof H as J; apply uniq_cons_1 in H; apply uniq_cons_2 in J; autorewrite with rewr_dom in J; destruct_uniq | H : uniq (?E ++ ?F) |- _ => let J1 := fresh "UniqTac" in let J2 := fresh "UniqTac" in pose proof H as J1; pose proof H as J2; apply uniq_app_1 in H; apply uniq_app_2 in J1; apply uniq_app_3 in J2; destruct_uniq | H : uniq (map ?f ?E) |- _ => apply uniq_map_1 in H; destruct_uniq | H : disjoint nil ?E |- _ => clear H; destruct_uniq | H : disjoint (?x ~ ?a) ?F |- _ => apply disjoint_one_1 in H; autorewrite with rewr_dom in H; destruct_uniq | H : disjoint ((?x, ?a) :: ?E) ?F |- _ => let J := fresh "UniqTac" in pose proof H as J; apply disjoint_cons_1 in H; apply disjoint_cons_2 in J; autorewrite with rewr_dom in H; destruct_uniq | H : disjoint (?E ++ ?F) ?G |- _ => let J := fresh "UniqTac" in pose proof H as J; apply disjoint_app_1 in H; apply disjoint_app_2 in J; destruct_uniq | H : disjoint (map ?f ?E) ?F |- _ => apply disjoint_map_1 in H; destruct_uniq | H : disjoint ?E nil |- _ => clear H; destruct_uniq | H : disjoint ?F (?x ~ ?a) |- _ => apply disjoint_sym_1 in H; destruct_uniq | H : disjoint ?F ((?x, ?a) :: ?E) |- _ => apply disjoint_sym_1 in H; destruct_uniq | H : disjoint ?G (?E ++ ?F) |- _ => apply disjoint_sym_1 in H; destruct_uniq | H : disjoint ?F (map ?f ?E) |- _ => apply disjoint_sym_1 in H; destruct_uniq | _ => idtac end. Ltac solve_uniq := intros; destruct_uniq; repeat first [ apply uniq_push | apply uniq_cons_3 | apply uniq_app_4 | apply uniq_one_1 | apply uniq_nil ]; auto; try tauto; unfold disjoint in *; try fsetdec; fail "Not solvable by [solve_uniq]; try [destruct_uniq]". Section UniqDerived. Variable A : Type. Variables x y : X.t. Variables a b : A. Variables E F G : list (X.t*A). Lemma uniq_insert_mid : uniq (G ++ E) -> ~ In x (dom G) -> ~ In x (dom E) -> uniq (G ++ (x ~ a) ++ E). Proof. (* Goal: None *) clear. (* Goal: None *) solve_uniq. Qed. Lemma uniq_remove_mid : uniq (E ++ F ++ G) -> uniq (E ++ G). Proof. (* Goal: None *) clear. (* Goal: None *) solve_uniq. Qed. Lemma uniq_reorder_1 : uniq (E ++ F) -> uniq (F ++ E). Proof. (* Goal: None *) clear. (* Goal: None *) solve_uniq. Qed. Lemma uniq_reorder_2 : uniq (E ++ F ++ G) -> uniq (F ++ E ++ G). Proof. (* Goal: None *) clear. (* Goal: None *) solve_uniq. Qed. Lemma uniq_map_app_l : forall (f : A -> A), uniq (F ++ E) -> uniq (map f F ++ E). Proof. (* Goal: None *) clear. (* Goal: None *) solve_uniq. Qed. Lemma fresh_mid_tail : uniq (F ++ (x ~ a) ++ E) -> ~ In x (dom E). Proof. (* Goal: None *) clear. (* Goal: None *) solve_uniq. Qed. Lemma fresh_mid_head : uniq (F ++ (x ~ a) ++ E) -> ~ In x (dom F). Proof. (* Goal: None *) clear. (* Goal: None *) solve_uniq. Qed. End UniqDerived. Ltac destruct_binds_hyp H := match type of H with | binds ?x ?a nil => inversion H | binds ?x ?a (?y ~ ?b) => let J1 := fresh "BindsTacKey" in let J2 := fresh "BindsTacVal" in rename H into J1; pose proof J1 as J2; apply binds_one_1 in J1; apply binds_one_2 in J2; try (subst x); try (subst a); try (subst y); try (subst b) | binds ?x ?a ((?y, ?b) :: ?E) => change (binds x a (y ~ b ++ E)) in H; destruct_binds_hyp H | binds ?x ?a (?E ++ ?F) => let J := fresh "BindsTac" in apply binds_app_1 in H; destruct H as [J | J]; destruct_binds_hyp J | _ => idtac end. Ltac destruct_binds_hyp_uniq H := match type of H with | binds ?x ?a nil => inversion H | binds ?x ?a (?y ~ ?b) => let J1 := fresh "BindsTacKey" in let J2 := fresh "BindsTacVal" in rename H into J1; pose proof J1 as J2; apply binds_one_1 in J1; apply binds_one_2 in J2; try (subst x); try (subst a); try (subst y); try (subst b) | binds ?x ?a ((?y, ?b) :: ?E) => change (binds x a (y ~ b ++ E)) in H; destruct_binds_hyp_uniq H | binds ?x ?a (?E ++ ?F) => let J1 := fresh "BindsTacSideCond" in assert (J1 : uniq (E ++ F)); [ destruct_uniq; auto | match type of J1 with | @uniq ?A _ => let J2 := fresh "BindsTac" in destruct (@binds_app_uniq_1 A x a E F J1 H) as [[J2 ?] | [J2 ?]]; clear H; destruct_binds_hyp_uniq J2 end ] | _ => idtac end. Ltac analyze_binds_cleanup := auto; try tauto; try discriminate; try match goal with | J : ~ In ?x ?E |- _ => match E with | context [x] => elim J; clear; simpl_alist; auto with set end end. Ltac analyze_binds H := destruct_binds_hyp H; analyze_binds_cleanup. Ltac analyze_binds_uniq H := destruct_binds_hyp_uniq H; analyze_binds_cleanup. Section BindsDerived. Variables A B : Type. Variables f : A -> B. Variables x y : X.t. Variables a b : A. Variables E F G : list (X.t*A). Lemma binds_dec : (forall a b : A, {a = b} + {a <> b}) -> {binds x a E} + {~ binds x a E}. Proof. (* Goal: forall _ : forall a b : A, sumbool (@Logic.eq A a b) (not (@Logic.eq A a b)), sumbool (@binds A x a E) (not (@binds A x a E)) *) clear. (* Goal: forall _ : forall a b : A, sumbool (@Logic.eq A a b) (not (@Logic.eq A a b)), sumbool (@binds A x a E) (not (@binds A x a E)) *) intros. (* Goal: sumbool (@binds A x a E) (not (@binds A x a E)) *) unfold binds. (* Goal: None *) apply List.In_dec. (* Goal: None *) decide equality. (* Goal: None *) apply X.eq_dec. Qed. Lemma binds_lookup : {a : A | binds x a E} + (forall a, ~ binds x a E). Lemma binds_lookup_dec : decidable (exists a, binds x a E). Lemma binds_weaken : binds x a (E ++ G) -> binds x a (E ++ F ++ G). Proof. (* Goal: None *) clear. (* Goal: None *) intros H. (* Goal: None *) analyze_binds H. Qed. Lemma binds_mid_eq : binds x a (F ++ (x ~ b) ++ E) -> uniq (F ++ (x ~ b) ++ E) -> a = b. Proof. (* Goal: None *) clear. (* Goal: None *) intros J ?. (* Goal: @Logic.eq A a b *) analyze_binds_uniq J. Qed. Lemma binds_remove_mid : binds x a (F ++ (y ~ b) ++ G) -> x <> y -> binds x a (F ++ G). Proof. (* Goal: None *) clear. (* Goal: None *) intros H. (* Goal: None *) analyze_binds H. Qed. Lemma binds_In : forall x a (E : list (X.t*A)), Proof. (* Goal: None *) clear. (* Goal: None *) alist induction E as [ | y ? F ]; intros J; simpl_alist. (* Goal: None *) (* Goal: None *) analyze_binds J. (* Goal: None *) analyze_binds J; subst; auto with set. Qed. Lemma binds_In_inv : forall x (E : list (X.t*A)), Proof. (* Goal: None *) clear. (* Goal: None *) alist induction E as [ | y b F IH ]; intros J. (* Goal: None *) (* Goal: None *) simpl_alist in J. (* Goal: None *) (* Goal: None *) fsetdec. (* Goal: None *) simpl_alist in J. (* Goal: None *) apply union_1 in J. (* Goal: None *) destruct J as [J | J]. (* Goal: None *) (* Goal: None *) exists b. (* Goal: None *) (* Goal: None *) apply singleton_1 in J. (* Goal: None *) (* Goal: None *) auto. (* Goal: None *) apply IH in J. (* Goal: None *) destruct J. (* Goal: None *) eauto. Qed. Lemma binds_unique : binds x a E -> binds x b E -> uniq E -> a = b. Lemma fresh_app_l : uniq (F ++ E) -> binds x a E -> ~ In x (dom F). Proof. (* Goal: None *) clear. (* Goal: None *) intros. (* Goal: None *) assert (In x (dom E)) by eauto using binds_In. (* Goal: None *) solve_uniq. Qed. Lemma fresh_app_r : uniq (F ++ E) -> binds x a F -> ~ In x (dom E). Proof. (* Goal: None *) clear. (* Goal: None *) intros. (* Goal: None *) assert (In x (dom F)) by eauto using binds_In. (* Goal: None *) solve_uniq. Qed. End BindsDerived. Hint Resolve @nil_neq_one_mid @one_mid_neq_nil. Hint Resolve @uniq_insert_mid @uniq_map_app_l. Hint Immediate @uniq_remove_mid. Hint Resolve @binds_weaken. Hint Immediate @binds_remove_mid @binds_In. End Make.
Require Export GeoCoq.Elements.OriginalProofs.proposition_28B. Require Export GeoCoq.Elements.OriginalProofs.lemma_collinearparallel. Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelsymmetric. Require Export GeoCoq.Elements.OriginalProofs.lemma_NCdistinct. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma proposition_28C : forall B D G H, RT B G H G H D -> OS B D G H -> Par G B H D. Proof. (* Goal: forall (B D G H : @Point Ax0) (_ : @RT Ax0 B G H G H D) (_ : @OS Ax0 B D G H), @Par Ax0 G B H D *) intros. (* Goal: @Par Ax0 G B H D *) assert (nCol G H B) by (conclude_def OS ). (* Goal: @Par Ax0 G B H D *) assert (nCol G H D) by (conclude_def OS ). (* Goal: @Par Ax0 G B H D *) assert (neq H D) by (forward_using lemma_NCdistinct). (* Goal: @Par Ax0 G B H D *) assert (neq D H) by (conclude lemma_inequalitysymmetric). (* Goal: @Par Ax0 G B H D *) assert (neq G B) by (forward_using lemma_NCdistinct). (* Goal: @Par Ax0 G B H D *) assert (neq B G) by (conclude lemma_inequalitysymmetric). (* Goal: @Par Ax0 G B H D *) let Tf:=fresh in assert (Tf:exists A, (BetS B G A /\ Cong G A G B)) by (conclude lemma_extension);destruct Tf as [A];spliter. (* Goal: @Par Ax0 G B H D *) assert (BetS A G B) by (conclude axiom_betweennesssymmetry). (* Goal: @Par Ax0 G B H D *) let Tf:=fresh in assert (Tf:exists C, (BetS D H C /\ Cong H C H D)) by (conclude lemma_extension);destruct Tf as [C];spliter. (* Goal: @Par Ax0 G B H D *) assert (BetS C H D) by (conclude axiom_betweennesssymmetry). (* Goal: @Par Ax0 G B H D *) assert (Par A B C D) by (conclude proposition_28B). (* Goal: @Par Ax0 G B H D *) assert (Col D H C) by (conclude_def Col ). (* Goal: @Par Ax0 G B H D *) assert (Col C D H) by (forward_using lemma_collinearorder). (* Goal: @Par Ax0 G B H D *) assert (neq H D) by (forward_using lemma_NCdistinct). (* Goal: @Par Ax0 G B H D *) assert (Par A B H D) by (conclude lemma_collinearparallel). (* Goal: @Par Ax0 G B H D *) assert (Par H D A B) by (conclude lemma_parallelsymmetric). (* Goal: @Par Ax0 G B H D *) assert (Col B G A) by (conclude_def Col ). (* Goal: @Par Ax0 G B H D *) assert (Col A B G) by (forward_using lemma_collinearorder). (* Goal: @Par Ax0 G B H D *) assert (Par H D G B) by (conclude lemma_collinearparallel). (* Goal: @Par Ax0 G B H D *) assert (Par G B H D) by (conclude lemma_parallelsymmetric). (* Goal: @Par Ax0 G B H D *) close. Qed. End Euclid.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrbool ssrfun eqtype ssrnat seq div. From mathcomp Require Import fintype bigop finset prime fingroup morphism. From mathcomp Require Import gfunctor automorphism quotient action gproduct cyclic. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Import GroupScope. Section PgroupDefs. Variable gT : finGroupType. Implicit Type (x : gT) (A B : {set gT}) (pi : nat_pred) (p n : nat). Definition pgroup pi A := pi.-nat #|A|. Definition psubgroup pi A B := (B \subset A) && pgroup pi B. Definition p_group A := pgroup (pdiv #|A|) A. Definition p_elt pi x := pi.-nat #[x]. Definition constt x pi := x ^+ (chinese #[x]`_pi #[x]`_pi^' 1 0). Definition Hall A B := (B \subset A) && coprime #|B| #|A : B|. Definition pHall pi A B := [&& B \subset A, pgroup pi B & pi^'.-nat #|A : B|]. Definition Syl p A := [set P : {group gT} | pHall p A P]. Definition Sylow A B := p_group B && Hall A B. End PgroupDefs. Arguments pgroup {gT} pi%N A%g. Arguments psubgroup {gT} pi%N A%g B%g. Arguments p_group {gT} A%g. Arguments p_elt {gT} pi%N x. Arguments constt {gT} x%g pi%N. Arguments Hall {gT} A%g B%g. Arguments pHall {gT} pi%N A%g B%g. Arguments Syl {gT} p%N A%g. Arguments Sylow {gT} A%g B%g. Notation "pi .-group" := (pgroup pi) (at level 2, format "pi .-group") : group_scope. Notation "pi .-subgroup ( A )" := (psubgroup pi A) (at level 8, format "pi .-subgroup ( A )") : group_scope. Notation "pi .-elt" := (p_elt pi) (at level 2, format "pi .-elt") : group_scope. Notation "x .`_ pi" := (constt x pi) (at level 3, format "x .`_ pi") : group_scope. Notation "pi .-Hall ( G )" := (pHall pi G) (at level 8, format "pi .-Hall ( G )") : group_scope. Notation "p .-Sylow ( G )" := (nat_pred_of_nat p).-Hall(G) (at level 8, format "p .-Sylow ( G )") : group_scope. Notation "''Syl_' p ( G )" := (Syl p G) (at level 8, p at level 2, format "''Syl_' p ( G )") : group_scope. Section PgroupProps. Variable gT : finGroupType. Implicit Types (pi rho : nat_pred) (p : nat). Implicit Types (x y z : gT) (A B C D : {set gT}) (G H K P Q R : {group gT}). Lemma trivgVpdiv G : G :=: 1 \/ (exists2 p, prime p & p %| #|G|). Proof. (* Goal: or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT G) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@ex2 nat (fun p : nat => is_true (prime p)) (fun p : nat => 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)) (@gval gT G))))))) *) have [leG1|lt1G] := leqP #|G| 1; first by left; apply: card_le1_trivg. (* Goal: or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT G) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@ex2 nat (fun p : nat => is_true (prime p)) (fun p : nat => 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)) (@gval gT G))))))) *) by right; exists (pdiv #|G|); rewrite ?pdiv_dvd ?pdiv_prime. Qed. Lemma prime_subgroupVti G H : prime #|G| -> G \subset H \/ H :&: G = 1. Proof. (* Goal: forall _ : is_true (prime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), or (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT G)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) *) move=> prG; have [|[p p_pr pG]] := trivgVpdiv (H :&: G); first by right. (* Goal: or (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT G)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) *) left; rewrite (sameP setIidPr eqP) eqEcard subsetIr. (* 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)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT G))))))) *) suffices <-: p = #|G| by rewrite dvdn_leq ?cardG_gt0. (* Goal: @eq nat 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 apply/eqP; rewrite -dvdn_prime2 // -(LagrangeI G H) setIC dvdn_mulr. Qed. Lemma sub_pgroup pi rho A : {subset pi <= rho} -> pi.-group A -> rho.-group A. Proof. (* Goal: forall (_ : @sub_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho)) (_ : is_true (@pgroup gT pi A)), is_true (@pgroup gT rho A) *) by move=> pi_sub_rho; apply: sub_in_pnat (in1W pi_sub_rho). Qed. Lemma eq_pgroup pi rho A : pi =i rho -> pi.-group A = rho.-group A. Proof. (* Goal: forall _ : @eq_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho), @eq bool (@pgroup gT pi A) (@pgroup gT rho A) *) exact: eq_pnat. Qed. Lemma eq_p'group pi rho A : pi =i rho -> pi^'.-group A = rho^'.-group A. Proof. (* Goal: forall _ : @eq_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho), @eq bool (@pgroup gT (negn pi) A) (@pgroup gT (negn rho) A) *) by move/eq_negn; apply: eq_pnat. Qed. Lemma pgroupNK pi A : pi^'^'.-group A = pi.-group A. Proof. (* Goal: @eq bool (@pgroup gT (negn (negn pi)) A) (@pgroup gT pi A) *) exact: pnatNK. Qed. Lemma pi_pgroup p pi A : p.-group A -> p \in pi -> pi.-group A. Proof. (* Goal: forall (_ : is_true (@pgroup gT (nat_pred_of_nat p) A)) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred pi))), is_true (@pgroup gT pi A) *) exact: pi_pnat. Qed. Lemma pi_p'group p pi A : pi.-group A -> p \in pi^' -> p^'.-group A. Proof. (* Goal: forall (_ : is_true (@pgroup gT pi A)) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred (negn pi)))), is_true (@pgroup gT (negn (nat_pred_of_nat p)) A) *) exact: pi_p'nat. Qed. Lemma pi'_p'group p pi A : pi^'.-group A -> p \in pi -> p^'.-group A. Proof. (* Goal: forall (_ : is_true (@pgroup gT (negn pi) A)) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred pi))), is_true (@pgroup gT (negn (nat_pred_of_nat p)) A) *) exact: pi'_p'nat. Qed. Lemma p'groupEpi p G : p^'.-group G = (p \notin \pi(G)). Proof. (* Goal: @eq bool (@pgroup gT (negn (nat_pred_of_nat p)) (@gval gT G)) (negb (@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)))))))) *) exact: p'natEpi (cardG_gt0 G). Qed. Lemma pgroup_pi G : \pi(G).-group G. Proof. (* Goal: is_true (@pgroup gT (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))))) (@gval gT G)) *) by rewrite /=; apply: pnat_pi. Qed. Lemma partG_eq1 pi G : (#|G|`_pi == 1%N) = pi^'.-group G. Proof. (* Goal: @eq bool (@eq_op nat_eqType (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)))) pi) (S O)) (@pgroup gT (negn pi) (@gval gT G)) *) exact: partn_eq1 (cardG_gt0 G). Qed. Lemma pgroupP pi G : reflect (forall p, prime p -> p %| #|G| -> p \in pi) (pi.-group G). Proof. (* Goal: Bool.reflect (forall (p : nat) (_ : is_true (prime p)) (_ : 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)) (@gval gT G)))))), is_true (@in_mem nat p (@mem nat nat_pred_pred pi))) (@pgroup gT pi (@gval gT G)) *) exact: pnatP. Qed. Arguments pgroupP {pi G}. Lemma pgroup1 pi : pi.-group [1 gT]. Proof. (* Goal: is_true (@pgroup gT pi (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) *) by rewrite /pgroup cards1. Qed. Lemma pgroupS pi G H : H \subset G -> pi.-group G -> pi.-group 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 (@pgroup gT pi (@gval gT G))), is_true (@pgroup gT pi (@gval gT H)) *) by move=> sHG; apply: pnat_dvd (cardSg sHG). Qed. Lemma oddSg G H : H \subset G -> odd #|G| -> odd #|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 (odd (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))), is_true (odd (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) *) by rewrite !odd_2'nat; apply: pgroupS. Qed. Lemma odd_pgroup_odd p G : odd p -> p.-group G -> odd #|G|. Proof. (* Goal: forall (_ : is_true (odd p)) (_ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT G))), is_true (odd (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *) move=> p_odd pG; rewrite odd_2'nat (pi_pnat pG) // !inE. (* Goal: is_true (negb (@eq_op nat_eqType p (S (S O)))) *) by case: eqP p_odd => // ->. Qed. Lemma card_pgroup p G : p.-group G -> #|G| = (p ^ logn p #|G|)%N. Proof. (* Goal: forall _ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT G)), @eq nat (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (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 move=> pG; rewrite -p_part part_pnat_id. Qed. Lemma properG_ltn_log p G H : p.-group G -> H \proper G -> logn p #|H| < logn p #|G|. Proof. (* Goal: forall (_ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT G))) (_ : is_true (@proper (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), is_true (leq (S (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 H)))))) (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)))))) *) move=> pG; rewrite properEneq eqEcard andbC ltnNge => /andP[sHG]. (* Goal: forall _ : is_true (negb (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 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)))) (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)) (@gval gT H))))))), is_true (negb (leq (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))))) (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 H))))))) *) rewrite sHG /= {1}(card_pgroup pG) {1}(card_pgroup (pgroupS sHG pG)). (* Goal: forall _ : is_true (negb (leq (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)))))) (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 H)))))))), is_true (negb (leq (logn 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)) (@gval gT G))))) (logn 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)) (@gval gT H))))))) *) by apply: contra; case: p {pG} => [|p] leHG; rewrite ?logn0 // leq_pexp2l. Qed. Lemma pgroupM pi G H : pi.-group (G * H) = pi.-group G && pi.-group H. Proof. (* Goal: @eq bool (@pgroup gT pi (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@gval gT H))) (andb (@pgroup gT pi (@gval gT G)) (@pgroup gT pi (@gval gT H))) *) have GH_gt0: 0 < #|G :&: H| := cardG_gt0 _. (* Goal: @eq bool (@pgroup gT pi (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@gval gT H))) (andb (@pgroup gT pi (@gval gT G)) (@pgroup gT pi (@gval gT H))) *) rewrite /pgroup -(mulnK #|_| GH_gt0) -mul_cardG -(LagrangeI G H) -mulnA. (* Goal: @eq bool (pnat pi (divn (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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H))))) (muln (@indexg gT (@gval 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 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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H))))))) (andb (pnat pi (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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H))))) (@indexg gT (@gval gT G) (@gval gT H)))) (pnat pi (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) *) by rewrite mulKn // -(LagrangeI H G) setIC !pnat_mul andbCA; case: (pnat _). Qed. Lemma pgroupJ pi G x : pi.-group (G :^ x) = pi.-group G. Proof. (* Goal: @eq bool (@pgroup gT pi (@conjugate gT (@gval gT G) x)) (@pgroup gT pi (@gval gT G)) *) by rewrite /pgroup cardJg. Qed. Lemma pgroup_p p P : p.-group P -> p_group P. Proof. (* Goal: forall _ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT P)), is_true (@p_group gT (@gval gT P)) *) case: (leqP #|P| 1); first by move=> /card_le1_trivg-> _; apply: pgroup1. (* Goal: forall (_ : 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 P)))))) (_ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT P))), is_true (@p_group gT (@gval gT P)) *) move/pdiv_prime=> pr_q pgP; have:= pgroupP pgP _ pr_q (pdiv_dvd _). (* Goal: forall _ : is_true (@in_mem 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 P))))) (@mem nat nat_pred_pred (nat_pred_of_nat p))), is_true (@p_group gT (@gval gT P)) *) by rewrite /p_group => /eqnP->. Qed. Lemma p_groupP P : p_group P -> exists2 p, prime p & p.-group P. Proof. (* Goal: forall _ : is_true (@p_group gT (@gval gT P)), @ex2 nat (fun p : nat => is_true (prime p)) (fun p : nat => is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT P))) *) case: (ltnP 1 #|P|); first by move/pdiv_prime; exists (pdiv #|P|). (* Goal: forall (_ : 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 P)))) (S O))) (_ : is_true (@p_group gT (@gval gT P))), @ex2 nat (fun p : nat => is_true (prime p)) (fun p : nat => is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT P))) *) by move/card_le1_trivg=> -> _; exists 2 => //; apply: pgroup1. Qed. Lemma pgroup_pdiv p G : p.-group G -> G :!=: 1 -> Proof. (* Goal: forall (_ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT G))) (_ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))))), and3 (is_true (prime p)) (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)) (@gval gT G)))))) (@ex nat (fun m : nat => @eq nat (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (expn p (S m)))) *) move=> pG; rewrite trivg_card1; case/p_groupP: (pgroup_p pG) => q q_pr qG. (* Goal: forall _ : is_true (negb (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S O))), and3 (is_true (prime p)) (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)) (@gval gT G)))))) (@ex nat (fun m : nat => @eq nat (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (expn p (S m)))) *) move/implyP: (pgroupP pG q q_pr); case/p_natP: qG => // [[|m] ->] //. (* Goal: forall (_ : is_true (implb (dvdn q (expn q (S m))) (@in_mem nat q (@mem nat nat_pred_pred (nat_pred_of_nat p))))) (_ : is_true (negb (@eq_op nat_eqType (expn q (S m)) (S O)))), and3 (is_true (prime p)) (is_true (dvdn p (expn q (S m)))) (@ex nat (fun m0 : nat => @eq nat (expn q (S m)) (expn p (S m0)))) *) by rewrite dvdn_exp // => /eqnP <- _; split; rewrite ?dvdn_exp //; exists m. Qed. Lemma coprime_p'group p K R : coprime #|K| #|R| -> p.-group R -> R :!=: 1 -> p^'.-group K. Proof. (* Goal: forall (_ : 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)))))) (_ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT R))) (_ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT R : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))))), is_true (@pgroup gT (negn (nat_pred_of_nat p)) (@gval gT K)) *) move=> coKR pR ntR; have [p_pr _ [e oK]] := pgroup_pdiv pR ntR. (* Goal: is_true (@pgroup gT (negn (nat_pred_of_nat p)) (@gval gT K)) *) by rewrite oK coprime_sym coprime_pexpl // prime_coprime // -p'natE in coKR. Qed. Lemma card_Hall pi G H : pi.-Hall(G) H -> #|H| = #|G|`_pi. Proof. (* Goal: forall _ : is_true (@pHall gT pi (@gval gT G) (@gval gT H)), @eq nat (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (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)))) pi) *) case/and3P=> sHG piH pi'H; rewrite -(Lagrange sHG). (* 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 H)))) (partn (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 H)))) (@indexg gT (@gval gT G) (@gval gT H))) pi) *) by rewrite partnM ?Lagrange // part_pnat_id ?part_p'nat ?muln1. Qed. Lemma pHall_sub pi A B : pi.-Hall(A) B -> B \subset A. Proof. (* Goal: forall _ : is_true (@pHall gT pi A 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)) 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)) A))) *) by case/andP. Qed. Lemma pHall_pgroup pi A B : pi.-Hall(A) B -> pi.-group B. Proof. (* Goal: forall _ : is_true (@pHall gT pi A B), is_true (@pgroup gT pi B) *) by case/and3P. Qed. Lemma pHallP pi G H : reflect (H \subset G /\ #|H| = #|G|`_pi) (pi.-Hall(G) H). Proof. (* Goal: Bool.reflect (and (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT 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 nat (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (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)))) pi))) (@pHall gT pi (@gval gT G) (@gval gT H)) *) apply: (iffP idP) => [piH | [sHG oH]]. (* Goal: is_true (@pHall gT pi (@gval gT G) (@gval gT H)) *) (* Goal: and (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (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)))) pi)) *) by split; [apply: pHall_sub piH | apply: card_Hall]. (* Goal: is_true (@pHall gT pi (@gval gT G) (@gval gT H)) *) rewrite /pHall sHG -divgS // /pgroup oH. (* Goal: is_true (andb true (andb (pnat 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 G)))) pi)) (pnat (negn pi) (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (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)))) pi))))) *) by rewrite -{2}(@partnC pi #|G|) ?mulKn ?part_pnat. Qed. Lemma pHallE pi G H : pi.-Hall(G) H = (H \subset G) && (#|H| == #|G|`_pi). Proof. (* Goal: @eq bool (@pHall gT pi (@gval gT G) (@gval gT H)) (andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (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)))) (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)))) pi))) *) by apply/pHallP/andP=> [] [->] /eqP. Qed. Lemma coprime_mulpG_Hall pi G K R : K * R = G -> pi.-group K -> pi^'.-group R -> Lemma coprime_mulGp_Hall pi G K R : K * R = G -> pi^'.-group K -> pi.-group R -> Lemma eq_in_pHall pi rho G H : {in \pi(G), pi =i rho} -> pi.-Hall(G) H = rho.-Hall(G) H. Proof. (* Goal: forall _ : @prop_in1 nat (@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)))))) (fun x : nat => @eq bool (@in_mem nat x (@mem nat nat_pred_pred pi)) (@in_mem nat x (@mem nat nat_pred_pred rho))) (inPhantom (@eq_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho))), @eq bool (@pHall gT pi (@gval gT G) (@gval gT H)) (@pHall gT rho (@gval gT G) (@gval gT H)) *) move=> eq_pi_rho; apply: andb_id2l => sHG. (* Goal: @eq bool (andb (@pgroup gT pi (@gval gT H)) (pnat (negn pi) (@indexg gT (@gval gT G) (@gval gT H)))) (andb (@pgroup gT rho (@gval gT H)) (pnat (negn rho) (@indexg gT (@gval gT G) (@gval gT H)))) *) congr (_ && _); apply: eq_in_pnat => p piHp. (* Goal: @eq bool (@in_mem nat p (@mem nat nat_pred_pred (negn pi))) (@in_mem nat p (@mem nat nat_pred_pred (negn rho))) *) (* Goal: @eq bool (@in_mem nat p (@mem nat nat_pred_pred pi)) (@in_mem nat p (@mem nat nat_pred_pred rho)) *) by apply: eq_pi_rho; apply: (piSg sHG). (* Goal: @eq bool (@in_mem nat p (@mem nat nat_pred_pred (negn pi))) (@in_mem nat p (@mem nat nat_pred_pred (negn rho))) *) by congr (~~ _); apply: eq_pi_rho; apply: (pi_of_dvd (dvdn_indexg G H)). Qed. Lemma eq_pHall pi rho G H : pi =i rho -> pi.-Hall(G) H = rho.-Hall(G) H. Proof. (* Goal: forall _ : @eq_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho), @eq bool (@pHall gT pi (@gval gT G) (@gval gT H)) (@pHall gT rho (@gval gT G) (@gval gT H)) *) by move=> eq_pi_rho; apply: eq_in_pHall (in1W eq_pi_rho). Qed. Lemma eq_p'Hall pi rho G H : pi =i rho -> pi^'.-Hall(G) H = rho^'.-Hall(G) H. Proof. (* Goal: forall _ : @eq_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho), @eq bool (@pHall gT (negn pi) (@gval gT G) (@gval gT H)) (@pHall gT (negn rho) (@gval gT G) (@gval gT H)) *) by move=> eq_pi_rho; apply: eq_pHall (eq_negn _). Qed. Lemma pHallNK pi G H : pi^'^'.-Hall(G) H = pi.-Hall(G) H. Proof. (* Goal: @eq bool (@pHall gT (negn (negn pi)) (@gval gT G) (@gval gT H)) (@pHall gT pi (@gval gT G) (@gval gT H)) *) exact: eq_pHall (negnK _). Qed. Lemma subHall_Hall pi rho G H K : rho.-Hall(G) H -> {subset pi <= rho} -> pi.-Hall(H) K -> pi.-Hall(G) K. Proof. (* Goal: forall (_ : is_true (@pHall gT rho (@gval gT G) (@gval gT H))) (_ : @sub_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho)) (_ : is_true (@pHall gT pi (@gval gT H) (@gval gT K))), is_true (@pHall gT pi (@gval gT G) (@gval gT K)) *) move=> hallH pi_sub_rho hallK. (* Goal: is_true (@pHall gT pi (@gval gT G) (@gval gT K)) *) rewrite pHallE (subset_trans (pHall_sub hallK) (pHall_sub hallH)) /=. (* Goal: is_true (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (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)) (@gval gT G)))) pi)) *) by rewrite (card_Hall hallK) (card_Hall hallH) partn_part. Qed. Lemma subHall_Sylow pi p G H P : pi.-Hall(G) H -> p \in pi -> p.-Sylow(H) P -> p.-Sylow(G) 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 (@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) (@gval gT P)) *) move=> hallH pi_p sylP; have [sHG piH _] := and3P hallH. (* Goal: is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P)) *) rewrite pHallE (subset_trans (pHall_sub sylP) sHG) /=. (* Goal: is_true (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT P)))) (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)) (@gval gT G)))) (nat_pred_of_nat p))) *) by rewrite (card_Hall sylP) (card_Hall hallH) partn_part // => q; move/eqnP->. Qed. Lemma pHall_Hall pi A B : pi.-Hall(A) B -> Hall A B. Proof. (* Goal: forall _ : is_true (@pHall gT pi A B), is_true (@Hall gT A B) *) by case/and3P=> sBA piB pi'B; rewrite /Hall sBA (pnat_coprime piB). Qed. Lemma Hall_pi G H : Hall G H -> \pi(H).-Hall(G) H. Proof. (* Goal: forall _ : is_true (@Hall gT (@gval gT G) (@gval gT H)), is_true (@pHall gT (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 H))))) (@gval gT G) (@gval gT H)) *) by case/andP=> sHG coHG /=; rewrite /pHall sHG /pgroup pnat_pi -?coprime_pi'. Qed. Lemma HallP G H : Hall G H -> exists pi, pi.-Hall(G) H. Proof. (* Goal: forall _ : is_true (@Hall gT (@gval gT G) (@gval gT H)), @ex nat_pred (fun pi : nat_pred => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) *) by exists \pi(H); apply: Hall_pi. Qed. Lemma sdprod_Hall G K H : K ><| H = G -> Hall G K = Hall G H. Proof. (* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G), @eq bool (@Hall gT (@gval gT G) (@gval gT K)) (@Hall gT (@gval gT G) (@gval gT H)) *) case/sdprod_context=> /andP[sKG _] sHG defG _ tiKH. (* Goal: @eq bool (@Hall gT (@gval gT G) (@gval gT K)) (@Hall gT (@gval gT G) (@gval gT H)) *) by rewrite /Hall sKG sHG -!divgS // -defG TI_cardMg // coprime_sym mulKn ?mulnK. Qed. Lemma coprime_sdprod_Hall_l G K H : K ><| H = G -> coprime #|K| #|H| = Hall G K. Proof. (* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G), @eq bool (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))))) (@Hall gT (@gval gT G) (@gval gT K)) *) case/sdprod_context=> /andP[sKG _] _ defG _ tiKH. (* Goal: @eq bool (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))))) (@Hall gT (@gval gT G) (@gval gT K)) *) by rewrite /Hall sKG -divgS // -defG TI_cardMg ?mulKn. Qed. Lemma coprime_sdprod_Hall_r G K H : K ><| H = G -> coprime #|K| #|H| = Hall G H. Proof. (* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G), @eq bool (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))))) (@Hall gT (@gval gT G) (@gval gT H)) *) by move=> defG; rewrite (coprime_sdprod_Hall_l defG) (sdprod_Hall defG). Qed. Lemma compl_pHall pi K H G : pi.-Hall(G) K -> (H \in [complements to K in G]) = pi^'.-Hall(G) H. Proof. (* Goal: forall _ : is_true (@pHall gT pi (@gval gT G) (@gval gT K)), @eq bool (@in_mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H (@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 K) (@gval gT G))))) (@pHall gT (negn pi) (@gval gT G) (@gval gT H)) *) move=> hallK; apply/complP/idP=> [[tiKH mulKH] | hallH]. (* Goal: and (@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 (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT H)) (@gval gT G)) *) (* Goal: is_true (@pHall gT (negn pi) (@gval gT G) (@gval gT H)) *) have [_] := andP hallK; rewrite /pHall pnatNK -{3}(invGid G) -mulKH mulG_subr. (* Goal: and (@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 (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT H)) (@gval gT G)) *) (* Goal: forall _ : is_true (andb (@pgroup gT pi (@gval gT K)) (pnat (negn pi) (@indexg gT (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT H)) (@gval gT K)))), is_true (andb true (andb (@pgroup gT (negn pi) (@gval gT H)) (pnat pi (@indexg gT (@invg (group_set_of_baseGroupType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT H))) (@gval gT H))))) *) by rewrite invMG !indexMg -indexgI andbC -indexgI setIC tiKH !indexg1. (* Goal: and (@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 (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT H)) (@gval gT G)) *) have [[sKG piK _] [sHG pi'H _]] := (and3P hallK, and3P hallH). (* Goal: and (@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 (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT H)) (@gval gT G)) *) have tiKH: K :&: H = 1 := coprime_TIg (pnat_coprime piK pi'H). (* Goal: and (@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 (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT H)) (@gval gT G)) *) split=> //; apply/eqP; rewrite eqEcard mul_subG //= TI_cardMg //. (* Goal: is_true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (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 K)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) *) by rewrite (card_Hall hallK) (card_Hall hallH) partnC. Qed. Lemma compl_p'Hall pi K H G : pi^'.-Hall(G) K -> (H \in [complements to K in G]) = pi.-Hall(G) H. Proof. (* Goal: forall _ : is_true (@pHall gT (negn pi) (@gval gT G) (@gval gT K)), @eq bool (@in_mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H (@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 K) (@gval gT G))))) (@pHall gT pi (@gval gT G) (@gval gT H)) *) by move/compl_pHall->; apply: eq_pHall (negnK pi). Qed. Lemma sdprod_normal_p'HallP pi K H G : K <| G -> pi^'.-Hall(G) H -> reflect (K ><| H = G) (pi.-Hall(G) K). Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT K) (@gval gT G))) (_ : is_true (@pHall gT (negn pi) (@gval gT G) (@gval gT H))), Bool.reflect (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (@pHall gT pi (@gval gT G) (@gval gT K)) *) move=> nsKG hallH; rewrite -(compl_p'Hall K hallH). (* Goal: Bool.reflect (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (@in_mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) K (@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 H) (@gval gT G))))) *) exact: sdprod_normal_complP. Qed. Lemma sdprod_normal_pHallP pi K H G : K <| G -> pi.-Hall(G) H -> reflect (K ><| H = G) (pi^'.-Hall(G) K). Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT K) (@gval gT G))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H))), Bool.reflect (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (@pHall gT (negn pi) (@gval gT G) (@gval gT K)) *) by move=> nsKG hallH; apply: sdprod_normal_p'HallP; rewrite ?pHallNK. Qed. Lemma pHallJ2 pi G H x : pi.-Hall(G :^ x) (H :^ x) = pi.-Hall(G) H. Proof. (* Goal: @eq bool (@pHall gT pi (@conjugate gT (@gval gT G) x) (@conjugate gT (@gval gT H) x)) (@pHall gT pi (@gval gT G) (@gval gT H)) *) by rewrite !pHallE conjSg !cardJg. Qed. Lemma pHallJnorm pi G H x : x \in 'N(G) -> pi.-Hall(G) (H :^ x) = pi.-Hall(G) H. Proof. (* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT G))))), @eq bool (@pHall gT pi (@gval gT G) (@conjugate gT (@gval gT H) x)) (@pHall gT pi (@gval gT G) (@gval gT H)) *) by move=> Nx; rewrite -{1}(normP Nx) pHallJ2. Qed. Lemma pHallJ pi G H x : x \in G -> pi.-Hall(G) (H :^ x) = pi.-Hall(G) H. Proof. (* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq bool (@pHall gT pi (@gval gT G) (@conjugate gT (@gval gT H) x)) (@pHall gT pi (@gval gT G) (@gval gT H)) *) by move=> Gx; rewrite -{1}(conjGid Gx) pHallJ2. Qed. Lemma HallJ G H x : x \in G -> Hall G (H :^ x) = Hall G H. Proof. (* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq bool (@Hall gT (@gval gT G) (@conjugate gT (@gval gT H) x)) (@Hall gT (@gval gT G) (@gval gT H)) *) by move=> Gx; rewrite /Hall -!divgI -{1 3}(conjGid Gx) conjSg -conjIg !cardJg. Qed. Lemma psubgroupJ pi G H x : x \in G -> pi.-subgroup(G) (H :^ x) = pi.-subgroup(G) H. Proof. (* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq bool (@psubgroup gT pi (@gval gT G) (@conjugate gT (@gval gT H) x)) (@psubgroup gT pi (@gval gT G) (@gval gT H)) *) by move=> Gx; rewrite /psubgroup pgroupJ -{1}(conjGid Gx) conjSg. Qed. Lemma p_groupJ P x : p_group (P :^ x) = p_group P. Proof. (* Goal: @eq bool (@p_group gT (@conjugate gT (@gval gT P) x)) (@p_group gT (@gval gT P)) *) by rewrite /p_group cardJg pgroupJ. Qed. Lemma SylowJ G P x : x \in G -> Sylow G (P :^ x) = Sylow G P. Proof. (* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq bool (@Sylow gT (@gval gT G) (@conjugate gT (@gval gT P) x)) (@Sylow gT (@gval gT G) (@gval gT P)) *) by move=> Gx; rewrite /Sylow p_groupJ HallJ. Qed. Lemma p_Sylow p G P : p.-Sylow(G) P -> Sylow G P. Proof. (* Goal: forall _ : is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P)), is_true (@Sylow gT (@gval gT G) (@gval gT P)) *) by move=> pP; rewrite /Sylow (pgroup_p (pHall_pgroup pP)) (pHall_Hall pP). Qed. Lemma pHall_subl pi G K H : H \subset K -> K \subset G -> pi.-Hall(G) H -> pi.-Hall(K) H. Proof. (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@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 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 (@pHall gT pi (@gval gT G) (@gval gT H))), is_true (@pHall gT pi (@gval gT K) (@gval gT H)) *) by move=> sHK sKG; rewrite /pHall sHK => /and3P[_ ->]; apply/pnat_dvd/indexSg. Qed. Lemma Hall1 G : Hall G 1. Proof. (* Goal: is_true (@Hall gT (@gval gT G) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) *) by rewrite /Hall sub1G cards1 coprime1n. Qed. Lemma p_group1 : @p_group gT 1. Proof. (* Goal: is_true (@p_group gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) *) by rewrite (@pgroup_p 2) ?pgroup1. Qed. Lemma Sylow1 G : Sylow G 1. Proof. (* Goal: is_true (@Sylow gT (@gval gT G) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) *) by rewrite /Sylow p_group1 Hall1. Qed. Lemma SylowP G P : reflect (exists2 p, prime p & p.-Sylow(G) P) (Sylow G P). Lemma p_elt_exp pi x m : pi.-elt (x ^+ m) = (#[x]`_pi^' %| m). Lemma mem_p_elt pi x G : pi.-group G -> x \in G -> pi.-elt x. Proof. (* Goal: forall (_ : is_true (@pgroup gT pi (@gval gT G))) (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), is_true (@p_elt gT pi x) *) by move=> piG Gx; apply: pgroupS piG; rewrite cycle_subG. Qed. Lemma p_eltM_norm pi x y : x \in 'N(<[y]>) -> pi.-elt x -> pi.-elt y -> pi.-elt (x * y). Lemma p_eltM pi x y : commute x y -> pi.-elt x -> pi.-elt y -> pi.-elt (x * y). Lemma p_elt1 pi : pi.-elt (1 : gT). Proof. (* Goal: is_true (@p_elt gT pi (oneg (FinGroup.base gT) : FinGroup.arg_sort (FinGroup.base gT))) *) by rewrite /p_elt order1. Qed. Lemma p_eltV pi x : pi.-elt x^-1 = pi.-elt x. Proof. (* Goal: @eq bool (@p_elt gT pi (@invg (FinGroup.base gT) x)) (@p_elt gT pi x) *) by rewrite /p_elt orderV. Qed. Lemma p_eltX pi x n : pi.-elt x -> pi.-elt (x ^+ n). Proof. (* Goal: forall _ : is_true (@p_elt gT pi x), is_true (@p_elt gT pi (@expgn (FinGroup.base gT) x n)) *) by rewrite -{1}[x]expg1 !p_elt_exp dvdn1 => /eqnP->. Qed. Lemma p_eltJ pi x y : pi.-elt (x ^ y) = pi.-elt x. Proof. (* Goal: @eq bool (@p_elt gT pi (@conjg gT x y)) (@p_elt gT pi x) *) by congr pnat; rewrite orderJ. Qed. Lemma sub_p_elt pi1 pi2 x : {subset pi1 <= pi2} -> pi1.-elt x -> pi2.-elt x. Proof. (* Goal: forall (_ : @sub_mem nat (@mem nat nat_pred_pred pi1) (@mem nat nat_pred_pred pi2)) (_ : is_true (@p_elt gT pi1 x)), is_true (@p_elt gT pi2 x) *) by move=> pi12; apply: sub_in_pnat => q _; apply: pi12. Qed. Lemma eq_p_elt pi1 pi2 x : pi1 =i pi2 -> pi1.-elt x = pi2.-elt x. Proof. (* Goal: forall _ : @eq_mem nat (@mem nat nat_pred_pred pi1) (@mem nat nat_pred_pred pi2), @eq bool (@p_elt gT pi1 x) (@p_elt gT pi2 x) *) by move=> pi12; apply: eq_pnat. Qed. Lemma p_eltNK pi x : pi^'^'.-elt x = pi.-elt x. Proof. (* Goal: @eq bool (@p_elt gT (negn (negn pi)) x) (@p_elt gT pi x) *) exact: pnatNK. Qed. Lemma eq_constt pi1 pi2 x : pi1 =i pi2 -> x.`_pi1 = x.`_pi2. Proof. (* Goal: forall _ : @eq_mem nat (@mem nat nat_pred_pred pi1) (@mem nat nat_pred_pred pi2), @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT x pi1) (@constt gT x pi2) *) move=> pi12; congr (x ^+ (chinese _ _ 1 0)); apply: eq_partn => // a. (* Goal: @eq bool (@in_mem nat a (@mem nat nat_pred_pred (negn pi1))) (@in_mem nat a (@mem nat nat_pred_pred (negn pi2))) *) by congr (~~ _); apply: pi12. Qed. Lemma consttNK pi x : x.`_pi^'^' = x.`_pi. Proof. (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT x (negn (negn pi))) (@constt gT x pi) *) by rewrite /constt !partnNK. Qed. Lemma cycle_constt pi x : x.`_pi \in <[x]>. Proof. (* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (@constt gT x pi) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cycle gT x)))) *) exact: mem_cycle. Qed. Lemma consttV pi x : (x^-1).`_pi = (x.`_pi)^-1. Proof. (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT (@invg (FinGroup.base gT) x) pi) (@invg (FinGroup.base gT) (@constt gT x pi)) *) by rewrite /constt expgVn orderV. Qed. Lemma constt1 pi : 1.`_pi = 1 :> gT. Proof. (* Goal: @eq (FinGroup.arg_sort (FinGroup.base gT)) (@constt gT (oneg (FinGroup.base gT)) pi) (oneg (FinGroup.base gT)) *) exact: expg1n. Qed. Lemma consttJ pi x y : (x ^ y).`_pi = x.`_pi ^ y. Proof. (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT (@conjg gT x y) pi) (@conjg gT (@constt gT x pi) y) *) by rewrite /constt orderJ conjXg. Qed. Lemma p_elt_constt pi x : pi.-elt x.`_pi. Proof. (* Goal: is_true (@p_elt gT pi (@constt gT x pi)) *) by rewrite p_elt_exp /chinese addn0 mul1n dvdn_mulr. Qed. Lemma consttC pi x : x.`_pi * x.`_pi^' = x. Proof. (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@constt gT x pi) (@constt gT x (negn pi))) x *) apply/eqP; rewrite -{3}[x]expg1 -expgD eq_expg_mod_order. (* Goal: is_true (@eq_op nat_eqType (modn (addn (chinese (partn (@order gT x) pi) (partn (@order gT x) (negn pi)) (S O) O) (chinese (partn (@order gT x) (negn pi)) (partn (@order gT x) (negn (negn pi))) (S O) O)) (@order gT x)) (modn (S O) (@order gT x))) *) rewrite partnNK -{5 6}(@partnC pi #[x]) // /chinese !addn0. (* Goal: is_true (@eq_op nat_eqType (modn (addn (muln (muln (S O) (partn (@order gT x) (negn pi))) (@fst nat nat (egcdn (partn (@order gT x) (negn pi)) (partn (@order gT x) pi)))) (muln (muln (S O) (partn (@order gT x) pi)) (@fst nat nat (egcdn (partn (@order gT x) pi) (partn (@order gT x) (negn pi)))))) (muln (partn (@order gT x) pi) (partn (@order gT x) (negn pi)))) (modn (S O) (muln (partn (@order gT x) pi) (partn (@order gT x) (negn pi))))) *) by rewrite chinese_remainder ?chinese_modl ?chinese_modr ?coprime_partC ?eqxx. Qed. Lemma p'_elt_constt pi x : pi^'.-elt (x * (x.`_pi)^-1). Proof. (* Goal: is_true (@p_elt gT (negn pi) (@mulg (FinGroup.base gT) x (@invg (FinGroup.base gT) (@constt gT x pi)))) *) by rewrite -{1}(consttC pi^' x) consttNK mulgK p_elt_constt. Qed. Lemma order_constt pi (x : gT) : #[x.`_pi] = #[x]`_pi. Proof. (* Goal: @eq nat (@order gT (@constt gT x pi)) (partn (@order gT x) pi) *) rewrite -{2}(consttC pi x) orderM; [|exact: commuteX2|]; last first. (* Goal: @eq nat (@order gT (@constt gT x pi)) (partn (muln (@order gT (@constt gT x pi)) (@order gT (@constt gT x (negn pi)))) pi) *) (* Goal: is_true (coprime (@order gT (@constt gT x pi)) (@order gT (@constt gT x (negn pi)))) *) by apply: (@pnat_coprime pi); apply: p_elt_constt. (* Goal: @eq nat (@order gT (@constt gT x pi)) (partn (muln (@order gT (@constt gT x pi)) (@order gT (@constt gT x (negn pi)))) pi) *) by rewrite partnM // part_pnat_id ?part_p'nat ?muln1 //; apply: p_elt_constt. Qed. Lemma consttM pi x y : commute x y -> (x * y).`_pi = x.`_pi * y.`_pi. Proof. (* Goal: forall _ : @commute (FinGroup.base gT) x y, @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT (@mulg (FinGroup.base gT) x y) pi) (@mulg (FinGroup.base gT) (@constt gT x pi) (@constt gT y pi)) *) move=> cxy; pose m := #|<<[set x; y]>>|; have m_gt0: 0 < m := cardG_gt0 _. (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT (@mulg (FinGroup.base gT) x y) pi) (@mulg (FinGroup.base gT) (@constt gT x pi) (@constt gT y pi)) *) pose k := chinese m`_pi m`_pi^' 1 0. (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT (@mulg (FinGroup.base gT) x y) pi) (@mulg (FinGroup.base gT) (@constt gT x pi) (@constt gT y pi)) *) suffices kXpi z: z \in <<[set x; y]>> -> z.`_pi = z ^+ k. (* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@generated gT (@setU (FinGroup.arg_finType (FinGroup.base gT)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y)))))), @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT z pi) (@expgn (FinGroup.base gT) z k) *) (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT (@mulg (FinGroup.base gT) x y) pi) (@mulg (FinGroup.base gT) (@constt gT x pi) (@constt gT y pi)) *) by rewrite !kXpi ?expgMn // ?groupM ?mem_gen // !inE eqxx ?orbT. (* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@generated gT (@setU (FinGroup.arg_finType (FinGroup.base gT)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y)))))), @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT z pi) (@expgn (FinGroup.base gT) z k) *) move=> xyz; have{xyz} zm: #[z] %| m by rewrite cardSg ?cycle_subG. (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT z pi) (@expgn (FinGroup.base gT) z k) *) apply/eqP; rewrite eq_expg_mod_order -{3 4}[#[z]](partnC pi) //. (* Goal: is_true (@eq_op nat_eqType (modn (chinese (partn (@order gT z) pi) (partn (@order gT z) (negn pi)) (S O) O) (muln (partn (@order gT z) pi) (partn (@order gT z) (negn pi)))) (modn k (muln (partn (@order gT z) pi) (partn (@order gT z) (negn pi))))) *) rewrite chinese_remainder ?chinese_modl ?chinese_modr ?coprime_partC //. (* Goal: is_true (andb (@eq_op nat_eqType (modn (S O) (partn (@order gT z) pi)) (modn k (partn (@order gT z) pi))) (@eq_op nat_eqType (modn O (partn (@order gT z) (negn pi))) (modn k (partn (@order gT z) (negn pi))))) *) rewrite -!(modn_dvdm k (partn_dvd _ m_gt0 zm)). (* Goal: is_true (andb (@eq_op nat_eqType (modn (S O) (partn (@order gT z) pi)) (modn (modn k (partn m pi)) (partn (@order gT z) pi))) (@eq_op nat_eqType (modn O (partn (@order gT z) (negn pi))) (modn (modn k (partn m (negn pi))) (partn (@order gT z) (negn pi))))) *) rewrite chinese_modl ?chinese_modr ?coprime_partC //. (* Goal: is_true (andb (@eq_op nat_eqType (modn (S O) (partn (@order gT z) pi)) (modn (modn (S O) (partn m pi)) (partn (@order gT z) pi))) (@eq_op nat_eqType (modn O (partn (@order gT z) (negn pi))) (modn (modn O (partn m (negn pi))) (partn (@order gT z) (negn pi))))) *) by rewrite !modn_dvdm ?partn_dvd ?eqxx. Qed. Lemma consttX pi x n : (x ^+ n).`_pi = x.`_pi ^+ n. Proof. (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT (@expgn (FinGroup.base gT) x n) pi) (@expgn (FinGroup.base gT) (@constt gT x pi) n) *) elim: n => [|n IHn]; first exact: constt1. (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT (@expgn (FinGroup.base gT) x (S n)) pi) (@expgn (FinGroup.base gT) (@constt gT x pi) (S n)) *) by rewrite !expgS consttM ?IHn //; apply: commuteX. Qed. Lemma constt1P pi x : reflect (x.`_pi = 1) (pi^'.-elt x). Proof. (* Goal: Bool.reflect (@eq (FinGroup.sort (FinGroup.base gT)) (@constt gT x pi) (oneg (FinGroup.base gT))) (@p_elt gT (negn pi) x) *) rewrite -{2}[x]expg1 p_elt_exp -order_constt consttNK order_dvdn expg1. (* Goal: Bool.reflect (@eq (FinGroup.sort (FinGroup.base gT)) (@constt gT x pi) (oneg (FinGroup.base gT))) (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@constt gT x pi) (oneg (FinGroup.base gT))) *) exact: eqP. Qed. Lemma constt_p_elt pi x : pi.-elt x -> x.`_pi = x. Proof. (* Goal: forall _ : is_true (@p_elt gT pi x), @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT x pi) x *) by rewrite -p_eltNK -{3}(consttC pi x) => /constt1P->; rewrite mulg1. Qed. Lemma sub_in_constt pi1 pi2 x : {in \pi(#[x]), {subset pi1 <= pi2}} -> x.`_pi2.`_pi1 = x.`_pi1. Proof. (* Goal: forall _ : @prop_in1 nat (@mem nat nat_pred_pred (pi_of (@order gT x))) (fun x : nat => forall _ : is_true (@in_mem nat x (@mem nat nat_pred_pred pi1)), is_true (@in_mem nat x (@mem nat nat_pred_pred pi2))) (inPhantom (@sub_mem nat (@mem nat nat_pred_pred pi1) (@mem nat nat_pred_pred pi2))), @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT (@constt gT x pi2) pi1) (@constt gT x pi1) *) move=> pi12; rewrite -{2}(consttC pi2 x) consttM; last exact: commuteX2. (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@constt gT (@constt gT x pi2) pi1) (@mulg (FinGroup.base gT) (@constt gT (@constt gT x pi2) pi1) (@constt gT (@constt gT x (negn pi2)) pi1)) *) rewrite (constt1P _ x.`_pi2^' _) ?mulg1 //. (* Goal: is_true (@p_elt gT (negn pi1) (@constt gT x (negn pi2))) *) apply: sub_in_pnat (p_elt_constt _ x) => p; rewrite order_constt => pi_p. (* Goal: forall _ : is_true (@in_mem nat p (@mem nat nat_pred_pred (negn pi2))), is_true (@in_mem nat p (@mem nat nat_pred_pred (negn pi1))) *) apply: contra; apply: pi12. (* Goal: is_true (@in_mem nat p (@mem nat nat_pred_pred (pi_of (@order gT x)))) *) by rewrite -[#[x]](partnC pi2^') // primes_mul // pi_p. Qed. Lemma prod_constt x : \prod_(0 <= p < #[x].+1) x.`_p = x. Lemma max_pgroupJ pi M G x : x \in G -> [max M | pi.-subgroup(G) M] -> Lemma comm_sub_max_pgroup pi H M G : [max M | pi.-subgroup(G) M] -> pi.-group H -> H \subset G -> Proof. (* Goal: forall (_ : is_true (@maxgroup gT (@gval gT M) (fun M : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @psubgroup gT pi (@gval gT G) (@gval gT M)))) (_ : is_true (@pgroup gT pi (@gval gT H))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : @commute (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT M)), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT M)))) *) case/maxgroupP=> /andP[sMG piM] maxM piH sHG cHM. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT M)))) *) rewrite -(maxM (H <*> M)%G) /= comm_joingE ?(mulG_subl, mulG_subr) //. (* Goal: is_true (@psubgroup gT pi (@gval gT G) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT M))) *) by rewrite /psubgroup pgroupM piM piH mul_subG. Qed. Lemma normal_sub_max_pgroup pi H M G : [max M | pi.-subgroup(G) M] -> pi.-group H -> H <| G -> H \subset M. Lemma norm_sub_max_pgroup pi H M G : [max M | pi.-subgroup(G) M] -> pi.-group H -> H \subset G -> Proof. (* Goal: forall (_ : is_true (@maxgroup gT (@gval gT M) (fun M : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @psubgroup gT pi (@gval gT G) (@gval gT M)))) (_ : is_true (@pgroup gT pi (@gval gT H))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT M)))))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT M)))) *) by move=> maxM piH sHG /normC; apply: comm_sub_max_pgroup piH sHG. Qed. Lemma sub_pHall pi H G K : pi.-Hall(G) H -> pi.-group K -> H \subset K -> K \subset G -> K :=: H. Proof. (* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (_ : is_true (@pgroup gT pi (@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 H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (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))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K) (@gval gT H) *) move=> hallH piK sHK sKG; apply/eqP; rewrite eq_sym eqEcard sHK. (* 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 K)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) *) by rewrite (card_Hall hallH) -(part_pnat_id piK) dvdn_leq ?partn_dvd ?cardSg. Qed. Lemma Hall_max pi H G : pi.-Hall(G) H -> [max H | pi.-subgroup(G) H]. Proof. (* Goal: forall _ : is_true (@pHall gT pi (@gval gT G) (@gval gT H)), is_true (@maxgroup gT (@gval gT H) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @psubgroup gT pi (@gval gT G) (@gval gT H))) *) move=> hallH; apply/maxgroupP; split=> [|K /andP[sKG piK] sHK]. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K) (@gval gT H) *) (* Goal: is_true (@psubgroup gT pi (@gval gT G) (@gval gT H)) *) by rewrite /psubgroup; case/and3P: hallH => ->. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K) (@gval gT H) *) exact: (sub_pHall hallH). Qed. Lemma pHall_id pi H G : pi.-Hall(G) H -> pi.-group G -> H :=: G. Proof. (* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (_ : is_true (@pgroup gT pi (@gval gT G))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT G) *) by move=> hallH piG; rewrite (sub_pHall hallH piG) ?(pHall_sub hallH). Qed. Lemma psubgroup1 pi G : pi.-subgroup(G) 1. Proof. (* Goal: is_true (@psubgroup gT pi (@gval gT G) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) *) by rewrite /psubgroup sub1G pgroup1. Qed. Lemma Cauchy p G : prime p -> p %| #|G| -> {x | x \in G & #[x] = p}. Proof. (* Goal: forall (_ : is_true (prime p)) (_ : 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)) (@gval gT G)))))), @sig2 (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 nat (@order gT x) p) *) move=> p_pr; elim: {G}_.+1 {-2}G (ltnSn #|G|) => // n IHn G. (* 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 G))))) (S n))) (_ : 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)) (@gval gT G)))))), @sig2 (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 nat (@order gT x) p) *) rewrite ltnS => leGn pG; pose xpG := [pred x in G | #[x] == p]. (* Goal: @sig2 (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 nat (@order gT x) p) *) have [x /andP[Gx /eqP] | no_x] := pickP xpG; first by exists x. (* Goal: @sig2 (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 nat (@order gT x) p) *) have{pG n leGn IHn} pZ: p %| #|'C_G(G)|. (* Goal: @sig2 (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 nat (@order gT x) p) *) (* 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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT G))))))) *) suffices /dvdn_addl <-: p %| #|G :\: 'C(G)| by rewrite cardsID. (* Goal: @sig2 (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 nat (@order gT x) p) *) (* 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)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT G))))))) *) have /acts_sum_card_orbit <-: [acts G, on G :\: 'C(G) | 'J]. (* Goal: @sig2 (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 nat (@order gT x) p) *) (* Goal: is_true (dvdn p (@BigOp.bigop nat (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) O (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun T : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @BigBody nat (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) T addn (@in_mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) T (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@orbit gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (conjg_action 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)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT G))))))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) T)))))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@astabs gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT G))) (conjg_action gT))))) *) by apply/actsP=> x Gx y; rewrite !inE -!mem_conjgV -centJ conjGid ?groupV. (* Goal: @sig2 (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 nat (@order gT x) p) *) (* Goal: is_true (dvdn p (@BigOp.bigop nat (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) O (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun T : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @BigBody nat (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) T addn (@in_mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) T (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@orbit gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (conjg_action 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)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT G))))))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) T)))))) *) elim/big_rec: _ => // _ _ /imsetP[x /setDP[Gx nCx] ->] /dvdn_addl->. (* Goal: @sig2 (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 nat (@order gT x) p) *) (* 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)) (@orbit gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (conjg_action gT) (@gval gT G) x))))) *) have ltCx: 'C_G[x] \proper G by rewrite properE subsetIl subsetIidl sub_cent1. (* Goal: @sig2 (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 nat (@order gT x) p) *) (* 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)) (@orbit gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (conjg_action gT) (@gval gT G) x))))) *) have /negP: ~ p %| #|'C_G[x]|. (* Goal: @sig2 (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 nat (@order gT x) p) *) (* Goal: forall _ : is_true (negb (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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))))))), 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)) (@orbit gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (conjg_action gT) (@gval gT G) x))))) *) (* Goal: not (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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))))))) *) case/(IHn _ (leq_trans (proper_card ltCx) leGn))=> y /setIP[Gy _] /eqP-oy. (* Goal: @sig2 (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 nat (@order gT x) p) *) (* Goal: forall _ : is_true (negb (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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))))))), 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)) (@orbit gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (conjg_action gT) (@gval gT G) x))))) *) (* Goal: False *) by have /andP[] := no_x y. (* Goal: @sig2 (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 nat (@order gT x) p) *) (* Goal: forall _ : is_true (negb (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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))))))), 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)) (@orbit gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (conjg_action gT) (@gval gT G) x))))) *) by apply/implyP; rewrite -index_cent1 indexgI implyNb -Euclid_dvdM ?LagrangeI. (* Goal: @sig2 (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 nat (@order gT x) p) *) have [Q maxQ _]: {Q | [max Q | p^'.-subgroup('C_G(G)) Q] & 1%G \subset Q}. (* Goal: @sig2 (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 nat (@order gT x) p) *) (* Goal: @sig2 (group_type gT) (fun Q : group_type gT => is_true (@maxgroup gT (@gval gT Q) (fun Q0 : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @psubgroup gT (negn (nat_pred_of_nat p)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT G))) (@gval gT Q0)))) (fun Q : group_type gT => is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (one_group gT)))) (@mem (Finite.sort (FinGroup.arg_finType (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))))) *) by apply: maxgroup_exists; apply: psubgroup1. (* Goal: @sig2 (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 nat (@order gT x) p) *) case/andP: (maxgroupp maxQ) => sQC; rewrite /pgroup p'natE // => /negP[]. (* 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)) (@gval gT Q))))) *) apply: dvdn_trans pZ (cardSg _); apply/subsetP=> x /setIP[Gx Cx]. (* 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)) (@gval gT Q)))) *) rewrite -sub1set -gen_subG (normal_sub_max_pgroup maxQ) //; last first. (* Goal: is_true (@pgroup gT (negn (nat_pred_of_nat p)) (@gval gT (@generated_group gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))) *) (* Goal: is_true (@normal gT (@gval gT (@generated_group gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@gval gT (@setI_group gT G (@centraliser_group gT (@gval gT G))))) *) rewrite /normal subsetI !cycle_subG ?Gx ?cents_norm ?subIset ?andbT //=. (* Goal: is_true (@pgroup gT (negn (nat_pred_of_nat p)) (@gval gT (@generated_group gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))) *) (* Goal: is_true (orb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@generated gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT G)))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@generated gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) *) by rewrite centsC cycle_subG Cx. (* Goal: is_true (@pgroup gT (negn (nat_pred_of_nat p)) (@gval gT (@generated_group gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))) *) rewrite /pgroup p'natE //= -[#|_|]/#[x]; apply/dvdnP=> [[m oxm]]. (* Goal: False *) have m_gt0: 0 < m by apply: dvdn_gt0 (order_gt0 x) _; rewrite oxm dvdn_mulr. (* Goal: False *) case/idP: (no_x (x ^+ m)); rewrite /= groupX //= orderXgcd //= oxm. (* Goal: is_true (@eq_op nat_eqType (divn (muln m p) (gcdn (muln m p) m)) p) *) by rewrite gcdnC gcdnMr mulKn. Qed. Lemma sub_normal_Hall pi G H K : pi.-Hall(G) H -> H <| G -> K \subset G -> (K \subset H) = pi.-group K. Proof. (* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT 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))))), @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@pgroup gT pi (@gval gT K)) *) move=> hallH nsHG sKG; apply/idP/idP=> [sKH | piK]. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *) (* Goal: is_true (@pgroup gT pi (@gval gT K)) *) by rewrite (pgroupS sKH) ?(pHall_pgroup hallH). (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *) apply: norm_sub_max_pgroup (Hall_max hallH) piK _ _ => //. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))) *) exact: subset_trans sKG (normal_norm nsHG). Qed. Lemma mem_normal_Hall pi H G x : pi.-Hall(G) H -> H <| G -> x \in G -> (x \in H) = pi.-elt x. Proof. (* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@p_elt gT pi x) *) by rewrite -!cycle_subG; apply: sub_normal_Hall. Qed. Lemma uniq_normal_Hall pi H G K : pi.-Hall(G) H -> H <| G -> [max K | pi.-subgroup(G) K] -> K :=: H. Proof. (* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@maxgroup gT (@gval gT K) (fun K : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @psubgroup gT pi (@gval gT G) (@gval gT K)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K) (@gval gT H) *) move=> hallH nHG /maxgroupP[/andP[sKG piK] /(_ 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 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)))) *) (* Goal: is_true (@psubgroup gT pi (@gval gT G) (@gval gT H)) *) exact: (maxgroupp (Hall_max hallH)). (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *) by rewrite (sub_normal_Hall hallH). Qed. End PgroupProps. Arguments pgroupP {gT pi G}. Arguments constt1P {gT pi x}. Section NormalHall. Variables (gT : finGroupType) (pi : nat_pred). Implicit Types G H K : {group gT}. Lemma normal_max_pgroup_Hall G H : [max H | pi.-subgroup(G) H] -> H <| G -> pi.-Hall(G) H. Proof. (* Goal: forall (_ : is_true (@maxgroup gT (@gval gT H) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @psubgroup gT pi (@gval gT G) (@gval gT H)))) (_ : is_true (@normal gT (@gval gT H) (@gval gT G))), is_true (@pHall gT pi (@gval gT G) (@gval gT H)) *) case/maxgroupP=> /andP[sHG piH] maxH nsHG; have [_ nHG] := andP nsHG. (* Goal: is_true (@pHall gT pi (@gval gT G) (@gval gT H)) *) rewrite /pHall sHG piH; apply/pnatP=> // p p_pr. (* Goal: forall _ : is_true (dvdn p (@indexg gT (@gval gT G) (@gval gT H))), is_true (@in_mem nat p (@mem nat nat_pred_pred (negn pi))) *) rewrite inE /= -pnatE // -card_quotient //. (* Goal: forall _ : is_true (dvdn p (@card (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))), is_true (negb (pnat pi p)) *) case/Cauchy=> //= Hx; rewrite -sub1set -gen_subG -/<[Hx]> /order. (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@cycle (@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 nat (@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)))) (@cycle (@coset_groupType gT (@gval gT H)) Hx)))) p), is_true (negb (pnat pi p)) *) case/inv_quotientS=> //= K -> sHK sKG {Hx}. (* Goal: forall _ : @eq nat (@card (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H))) (@mem (@coset_of gT (@gval gT H)) (predPredType (@coset_of gT (@gval gT H))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H))) (@quotient gT (@gval gT K) (@gval gT H))))) p, is_true (negb (pnat pi p)) *) rewrite card_quotient ?(subset_trans sKG) // => iKH; apply/negP=> pi_p. (* Goal: False *) rewrite -iKH -divgS // (maxH K) ?divnn ?cardG_gt0 // in p_pr. (* Goal: is_true (@psubgroup gT pi (@gval gT G) (@gval gT K)) *) by rewrite /psubgroup sKG /pgroup -(Lagrange sHK) mulnC pnat_mul iKH pi_p. Qed. Lemma setI_normal_Hall G H K : H <| G -> pi.-Hall(G) H -> K \subset G -> pi.-Hall(K) (H :&: K). End NormalHall. Section Morphim. Variables (aT rT : finGroupType) (D : {group aT}) (f : {morphism D >-> rT}). Implicit Types (pi : nat_pred) (G H P : {group aT}). Lemma morphim_pgroup pi G : pi.-group G -> pi.-group (f @* G). Proof. (* Goal: forall _ : is_true (@pgroup aT pi (@gval aT G)), is_true (@pgroup rT pi (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) *) by apply: pnat_dvd; apply: dvdn_morphim. Qed. Lemma morphim_odd G : odd #|G| -> odd #|f @* G|. Proof. (* Goal: forall _ : is_true (odd (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))), is_true (odd (@card (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))) *) by rewrite !odd_2'nat; apply: morphim_pgroup. Qed. Lemma pmorphim_pgroup pi G : pi.-group ('ker f) -> G \subset D -> pi.-group (f @* G) = pi.-group G. Lemma morphim_p_index pi G H : H \subset D -> pi.-nat #|G : H| -> pi.-nat #|f @* G : f @* H|. Proof. (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT 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))))) (_ : is_true (pnat pi (@indexg aT (@gval aT G) (@gval aT H)))), is_true (pnat pi (@indexg rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)))) *) by move=> sHD; apply: pnat_dvd; rewrite index_morphim ?subIset // sHD orbT. Qed. Lemma morphim_pHall pi G H : H \subset D -> pi.-Hall(G) H -> pi.-Hall(f @* G) (f @* H). Proof. (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT 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))))) (_ : is_true (@pHall aT pi (@gval aT G) (@gval aT H))), is_true (@pHall rT pi (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H))) *) move=> sHD /and3P[sHG piH pi'GH]. (* Goal: is_true (@pHall rT pi (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H))) *) by rewrite /pHall morphimS // morphim_pgroup // morphim_p_index. Qed. Lemma pmorphim_pHall pi G H : G \subset D -> H \subset D -> pi.-subgroup(H :&: G) ('ker f) -> Proof. (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@psubgroup aT pi (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H) (@gval aT G)) (@ker aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f))))), @eq bool (@pHall rT pi (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H))) (@pHall aT pi (@gval aT G) (@gval aT H)) *) move=> sGD sHD /andP[/subsetIP[sKH sKG] piK]; rewrite !pHallE morphimSGK //. (* Goal: @eq bool (andb (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@eq_op nat_eqType (@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 (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) H))))) (partn (@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 (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G))))) pi))) (andb (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@eq_op nat_eqType (@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 H)))) (partn (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) pi))) *) apply: andb_id2l => sHG; rewrite -(Lagrange sKH) -(Lagrange sKG) partnM //. (* Goal: @eq bool (@eq_op nat_eqType (@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 (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) H))))) (partn (@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 (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G))))) pi)) (@eq_op nat_eqType (muln (@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 (@ker_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f))))))) (@indexg aT (@gval aT H) (@gval aT (@ker_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)))))) (muln (partn (@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 (@ker_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f))))))) pi) (partn (@indexg aT (@gval aT G) (@gval aT (@ker_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f))))) pi))) *) by rewrite (part_pnat_id piK) !card_morphim !(setIidPr _) // eqn_pmul2l. Qed. Lemma morphim_Hall G H : H \subset D -> Hall G H -> Hall (f @* G) (f @* H). Proof. (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT 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))))) (_ : is_true (@Hall aT (@gval aT G) (@gval aT H))), is_true (@Hall rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H))) *) by move=> sHD /HallP[pi piH]; apply: (@pHall_Hall _ pi); apply: morphim_pHall. Qed. Lemma morphim_pSylow p G P : P \subset D -> p.-Sylow(G) P -> p.-Sylow(f @* G) (f @* P). Proof. (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT P))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@pHall aT (nat_pred_of_nat p) (@gval aT G) (@gval aT P))), is_true (@pHall rT (nat_pred_of_nat p) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT P))) *) exact: morphim_pHall. Qed. Lemma morphim_p_group P : p_group P -> p_group (f @* P). Proof. (* Goal: forall _ : is_true (@p_group aT (@gval aT P)), is_true (@p_group rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT P))) *) by move/morphim_pgroup; apply: pgroup_p. Qed. Lemma morphim_Sylow G P : P \subset D -> Sylow G P -> Sylow (f @* G) (f @* P). Proof. (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT P))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@Sylow aT (@gval aT G) (@gval aT P))), is_true (@Sylow rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT P))) *) by move=> sPD /andP[pP hallP]; rewrite /Sylow morphim_p_group // morphim_Hall. Qed. Lemma morph_p_elt pi x : x \in D -> pi.-elt x -> pi.-elt (f x). Proof. (* 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)) (@gval aT D))))) (_ : is_true (@p_elt aT pi x)), is_true (@p_elt rT pi (@mfun aT rT (@gval aT D) f x)) *) by move=> Dx; apply: pnat_dvd; apply: morph_order. Qed. Lemma morph_constt pi x : x \in D -> f x.`_pi = (f x).`_pi. Proof. (* 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)) (@gval aT D)))), @eq (FinGroup.sort (FinGroup.base rT)) (@mfun aT rT (@gval aT D) f (@constt aT x pi)) (@constt rT (@mfun aT rT (@gval aT D) f x) pi) *) move=> Dx; rewrite -{2}(consttC pi x) morphM ?groupX //. (* Goal: @eq (FinGroup.sort (FinGroup.base rT)) (@mfun aT rT (@gval aT D) f (@constt aT x pi)) (@constt rT (@mulg (FinGroup.base rT) (@mfun aT rT (@gval aT D) f (@constt aT x pi)) (@mfun aT rT (@gval aT D) f (@constt aT x (negn pi)))) pi) *) rewrite consttM; last by rewrite !morphX //; apply: commuteX2. (* Goal: @eq (FinGroup.sort (FinGroup.base rT)) (@mfun aT rT (@gval aT D) f (@constt aT x pi)) (@mulg (FinGroup.base rT) (@constt rT (@mfun aT rT (@gval aT D) f (@constt aT x pi)) pi) (@constt rT (@mfun aT rT (@gval aT D) f (@constt aT x (negn pi))) pi)) *) have: pi.-elt (f x.`_pi) by rewrite morph_p_elt ?groupX ?p_elt_constt //. (* Goal: forall _ : is_true (@p_elt rT pi (@mfun aT rT (@gval aT D) f (@constt aT x pi))), @eq (FinGroup.sort (FinGroup.base rT)) (@mfun aT rT (@gval aT D) f (@constt aT x pi)) (@mulg (FinGroup.base rT) (@constt rT (@mfun aT rT (@gval aT D) f (@constt aT x pi)) pi) (@constt rT (@mfun aT rT (@gval aT D) f (@constt aT x (negn pi))) pi)) *) have: pi^'.-elt (f x.`_pi^') by rewrite morph_p_elt ?groupX ?p_elt_constt //. (* Goal: forall (_ : is_true (@p_elt rT (negn pi) (@mfun aT rT (@gval aT D) f (@constt aT x (negn pi))))) (_ : is_true (@p_elt rT pi (@mfun aT rT (@gval aT D) f (@constt aT x pi)))), @eq (FinGroup.sort (FinGroup.base rT)) (@mfun aT rT (@gval aT D) f (@constt aT x pi)) (@mulg (FinGroup.base rT) (@constt rT (@mfun aT rT (@gval aT D) f (@constt aT x pi)) pi) (@constt rT (@mfun aT rT (@gval aT D) f (@constt aT x (negn pi))) pi)) *) by move/constt1P->; move/constt_p_elt->; rewrite mulg1. Qed. Lemma quotient_pHall : K \subset 'N(H) -> pi.-Hall(G) K -> pi.-Hall(G / H) (K / H). Proof. (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT 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 (@pHall gT pi (@gval gT G) (@gval gT K))), is_true (@pHall (@coset_groupType gT (@gval gT H)) pi (@quotient gT (@gval gT G) (@gval gT H)) (@quotient gT (@gval gT K) (@gval gT H))) *) exact: morphim_pHall. Qed. Lemma pquotient_pgroup : G \subset 'N(K) -> pi.-group (G / K) = pi.-group G. Proof. (* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT K))))), @eq bool (@pgroup (@coset_groupType gT (@gval gT K)) pi (@quotient gT (@gval gT G) (@gval gT K))) (@pgroup gT pi (@gval gT G)) *) by move=> nKG; rewrite pmorphim_pgroup ?ker_coset. Qed. Lemma pquotient_pHall : K <| G -> K <| H -> pi.-Hall(G / K) (H / K) = pi.-Hall(G) H. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT K) (@gval gT G))) (_ : is_true (@normal gT (@gval gT K) (@gval gT H))), @eq bool (@pHall (@coset_groupType gT (@gval gT K)) pi (@quotient gT (@gval gT G) (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K))) (@pHall gT pi (@gval gT G) (@gval gT H)) *) case/andP=> sKG nKG; case/andP=> sKH nKH. (* Goal: @eq bool (@pHall (@coset_groupType gT (@gval gT K)) pi (@quotient gT (@gval gT G) (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K))) (@pHall gT pi (@gval gT G) (@gval gT H)) *) by rewrite pmorphim_pHall // ker_coset /psubgroup subsetI sKH sKG. Qed. Lemma ltn_log_quotient : p.-group G -> H :!=: 1 -> H \subset G -> logn p #|G / H| < logn p #|G|. Proof. (* Goal: forall (_ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT G))) (_ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT 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 (leq (S (logn p (@card (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))))) (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)))))) *) move=> pG ntH sHG; apply: contraLR (ltn_quotient ntH sHG); rewrite -!leqNgt. (* Goal: forall _ : is_true (leq (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))))) (logn p (@card (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))))), 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 (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *) rewrite {2}(card_pgroup pG) {2}(card_pgroup (morphim_pgroup _ pG)). (* Goal: forall _ : is_true (leq (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))))) (logn p (@card (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))))), is_true (leq (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)))))) (expn p (logn p (@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)) (@morphim_group gT (@coset_groupType gT (@gval gT H)) (@normaliser_group gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) (@MorPhantom gT (@coset_groupType gT (@gval gT H)) (@mfun gT (@coset_groupType gT (@gval gT H)) (@gval gT (@normaliser_group gT (@gval gT H))) (@coset_morphism gT (@gval gT H)))) G)))))))) *) by case: (posnP p) => [-> //|]; apply: leq_pexp2l. Qed. End Pquotient. Section InnerAutCyclicPgroup. Variables (gT : finGroupType) (p : nat) (G C : {group gT}). Hypothesis nCG : G \subset 'N(C). Lemma logn_quotient_cent_cyclic_pgroup : p.-group C -> cyclic C -> logn p #|G / 'C_G(C)| <= (logn p #|C|).-1. Lemma p'group_quotient_cent_prime : prime p -> #|C| %| p -> p^'.-group (G / 'C_G(C)). Proof. (* Goal: forall (_ : is_true (prime p)) (_ : is_true (dvdn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT C)))) p)), is_true (@pgroup (@coset_groupType gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C)))) (negn (nat_pred_of_nat p)) (@quotient gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C))))) *) move=> p_pr pC; have pgC: p.-group C := pnat_dvd pC (pnat_id p_pr). (* Goal: is_true (@pgroup (@coset_groupType gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C)))) (negn (nat_pred_of_nat p)) (@quotient gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C))))) *) have [_ dv_p] := primeP p_pr; case/pred2P: {dv_p pC}(dv_p _ pC) => [|pC]. (* Goal: is_true (@pgroup (@coset_groupType gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C)))) (negn (nat_pred_of_nat p)) (@quotient gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C))))) *) (* Goal: forall _ : @eq (Equality.sort nat_eqType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT C)))) (S O), is_true (@pgroup (@coset_groupType gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C)))) (negn (nat_pred_of_nat p)) (@quotient gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C))))) *) by move/card1_trivg->; rewrite cent1T setIT trivg_quotient pgroup1. (* Goal: is_true (@pgroup (@coset_groupType gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C)))) (negn (nat_pred_of_nat p)) (@quotient gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C))))) *) have le_oGC := logn_quotient_cent_cyclic_pgroup pgC. (* Goal: is_true (@pgroup (@coset_groupType gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C)))) (negn (nat_pred_of_nat p)) (@quotient gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C))))) *) rewrite /pgroup -partn_eq1 ?cardG_gt0 // -dvdn1 p_part pfactor_dvdn // logn1. (* Goal: is_true (leq (logn p (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C)))))) (@quotient gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT C)))))))) O) *) by rewrite (leq_trans (le_oGC _)) ?prime_cyclic // pC ?(pfactorK 1). Qed. End InnerAutCyclicPgroup. Section PcoreDef. Variables (pi : nat_pred) (gT : finGroupType) (A : {set gT}). Definition pcore := \bigcap_(G | [max G | pi.-subgroup(A) G]) G. Canonical pcore_group : {group gT} := Eval hnf in [group of pcore]. End PcoreDef. Arguments pcore pi%N {gT} A%g. Arguments pcore_group pi%N {gT} A%G. Notation "''O_' pi ( G )" := (pcore pi G) (at level 8, pi at level 2, format "''O_' pi ( G )") : group_scope. Notation "''O_' pi ( G )" := (pcore_group pi G) : Group_scope. Section PseriesDefs. Variables (pis : seq nat_pred) (gT : finGroupType) (A : {set gT}). Definition pcore_mod pi B := coset B @*^-1 'O_pi(A / B). Canonical pcore_mod_group pi B : {group gT} := Eval hnf in [group of pcore_mod pi B]. Definition pseries := foldr pcore_mod 1 (rev pis). Lemma pseries_group_set : group_set pseries. Proof. (* Goal: is_true (@group_set gT pseries) *) by rewrite /pseries; case: rev => [|pi1 pi1']; apply: groupP. Qed. Canonical pseries_group : {group gT} := group pseries_group_set. End PseriesDefs. Arguments pseries pis%SEQ {gT} _%g. Local Notation ConsPred p := (@Cons nat_pred p%N) (only parsing). Notation "''O_{' p1 , .. , pn } ( A )" := (pseries (ConsPred p1 .. (ConsPred pn [::]) ..) A) (at level 8, format "''O_{' p1 , .. , pn } ( A )") : group_scope. Notation "''O_{' p1 , .. , pn } ( A )" := (pseries_group (ConsPred p1 .. (ConsPred pn [::]) ..) A) : Group_scope. Section PCoreProps. Variables (pi : nat_pred) (gT : finGroupType). Implicit Types (A : {set gT}) (G H M K : {group gT}). Lemma pcore_psubgroup G : pi.-subgroup(G) 'O_pi(G). Proof. (* Goal: is_true (@psubgroup gT pi (@gval gT G) (@pcore pi gT (@gval gT G))) *) have [M maxM _]: {M | [max M | pi.-subgroup(G) M] & 1%G \subset M}. (* Goal: is_true (@psubgroup gT pi (@gval gT G) (@pcore pi gT (@gval gT G))) *) (* Goal: @sig2 (group_type gT) (fun M : group_type gT => is_true (@maxgroup gT (@gval gT M) (fun M0 : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @psubgroup gT pi (@gval gT G) (@gval gT M0)))) (fun M : group_type gT => is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (one_group gT)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT M))))) *) by apply: maxgroup_exists; rewrite /psubgroup sub1G pgroup1. (* Goal: is_true (@psubgroup gT pi (@gval gT G) (@pcore pi gT (@gval gT G))) *) have sOM: 'O_pi(G) \subset M by apply: bigcap_inf. (* Goal: is_true (@psubgroup gT pi (@gval gT G) (@pcore pi gT (@gval gT G))) *) have /andP[piM sMG] := maxgroupp maxM. (* Goal: is_true (@psubgroup gT pi (@gval gT G) (@pcore pi gT (@gval gT G))) *) by rewrite /psubgroup (pgroupS sOM) // (subset_trans sOM). Qed. Lemma pcore_pgroup G : pi.-group 'O_pi(G). Proof. (* Goal: is_true (@pgroup gT pi (@pcore pi gT (@gval gT G))) *) by case/andP: (pcore_psubgroup G). Qed. Lemma pcore_sub G : 'O_pi(G) \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)) (@pcore 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)) (@gval gT G)))) *) by case/andP: (pcore_psubgroup G). Qed. Lemma pcore_sub_Hall G H : pi.-Hall(G) H -> 'O_pi(G) \subset H. Proof. (* Goal: forall _ : 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)) (@pcore 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)) (@gval gT H)))) *) by move/Hall_max=> maxH; apply: bigcap_inf. Qed. Lemma pcore_max G H : pi.-group H -> H <| G -> H \subset 'O_pi(G). Proof. (* Goal: forall (_ : is_true (@pgroup gT pi (@gval gT H))) (_ : is_true (@normal gT (@gval gT H) (@gval gT G))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@pcore pi gT (@gval gT G))))) *) move=> piH nHG; apply/bigcapsP=> M maxM. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT M)))) *) exact: normal_sub_max_pgroup piH nHG. Qed. Lemma pcore_pgroup_id G : pi.-group G -> 'O_pi(G) = G. Proof. (* Goal: forall _ : is_true (@pgroup gT pi (@gval gT G)), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@pcore pi gT (@gval gT G)) (@gval gT G) *) by move=> piG; apply/eqP; rewrite eqEsubset pcore_sub pcore_max. Qed. Lemma pcore_normal G : 'O_pi(G) <| G. Proof. (* Goal: is_true (@normal gT (@pcore pi gT (@gval gT G)) (@gval gT G)) *) rewrite /(_ <| G) pcore_sub; apply/subsetP=> x Gx. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@pcore pi gT (@gval gT G)))))) *) rewrite inE; apply/bigcapsP=> M maxM; rewrite sub_conjg. (* 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)) (@pcore pi gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT M) (@invg (FinGroup.base gT) x))))) *) by apply: bigcap_inf; apply: max_pgroupJ; rewrite ?groupV. Qed. Lemma normal_Hall_pcore H G : pi.-Hall(G) H -> H <| G -> 'O_pi(G) = H. Lemma eq_Hall_pcore G H : pi.-Hall(G) 'O_pi(G) -> pi.-Hall(G) H -> H :=: 'O_pi(G). Proof. (* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@pcore pi gT (@gval gT G)))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@pcore pi gT (@gval gT G)) *) move=> hallGpi hallH. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@pcore pi gT (@gval gT G)) *) exact: uniq_normal_Hall (pcore_normal G) (Hall_max hallH). Qed. Lemma sub_Hall_pcore G K : pi.-Hall(G) 'O_pi(G) -> K \subset G -> (K \subset 'O_pi(G)) = pi.-group K. Proof. (* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@pcore pi 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))))), @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@pcore pi gT (@gval gT G))))) (@pgroup gT pi (@gval gT K)) *) by move=> hallGpi; apply: sub_normal_Hall (pcore_normal G). Qed. Lemma mem_Hall_pcore G x : pi.-Hall(G) 'O_pi(G) -> x \in G -> (x \in 'O_pi(G)) = pi.-elt x. Proof. (* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@pcore pi gT (@gval gT G)))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@pcore pi gT (@gval gT G))))) (@p_elt gT pi x) *) by move=> hallGpi; apply: mem_normal_Hall (pcore_normal G). Qed. Lemma sdprod_Hall_pcoreP H G : pi.-Hall(G) 'O_pi(G) -> reflect ('O_pi(G) ><| H = G) (pi^'.-Hall(G) H). Proof. (* Goal: forall _ : is_true (@pHall gT pi (@gval gT G) (@pcore pi gT (@gval gT G))), Bool.reflect (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@pcore pi gT (@gval gT G)) (@gval gT H)) (@gval gT G)) (@pHall gT (negn pi) (@gval gT G) (@gval gT H)) *) move=> hallGpi; rewrite -(compl_pHall H hallGpi) complgC. (* Goal: Bool.reflect (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@pcore pi gT (@gval gT G)) (@gval gT H)) (@gval gT G)) (@in_mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@pcore_group pi gT (@gval gT G)) (@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 H) (@gval gT G))))) *) exact: sdprod_normal_complP (pcore_normal G). Qed. Lemma sdprod_pcore_HallP H G : pi^'.-Hall(G) H -> reflect ('O_pi(G) ><| H = G) (pi.-Hall(G) 'O_pi(G)). Proof. (* Goal: forall _ : is_true (@pHall gT (negn pi) (@gval gT G) (@gval gT H)), Bool.reflect (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@pcore pi gT (@gval gT G)) (@gval gT H)) (@gval gT G)) (@pHall gT pi (@gval gT G) (@pcore pi gT (@gval gT G))) *) exact: sdprod_normal_p'HallP (pcore_normal G). Qed. Lemma pcoreJ G x : 'O_pi(G :^ x) = 'O_pi(G) :^ x. Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@pcore pi gT (@conjugate gT (@gval gT G) x)) (@conjugate gT (@pcore pi gT (@gval gT G)) x) *) apply/eqP; rewrite eqEsubset -sub_conjgV. (* Goal: is_true (andb (@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 (@pcore pi gT (@conjugate gT (@gval gT G) x)) (@invg (FinGroup.base gT) x)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@pcore 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)) (@conjugate gT (@pcore pi gT (@gval gT 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)) (@pcore pi gT (@conjugate gT (@gval gT G) x)))))) *) rewrite !pcore_max ?pgroupJ ?pcore_pgroup ?normalJ ?pcore_normal //. (* Goal: is_true (@normal gT (@gval gT (@conjG_group gT (@pcore_group pi gT (@conjugate gT (@gval gT G) x)) (@invg (FinGroup.base gT) x))) (@gval gT G)) *) by rewrite -(normalJ _ _ x) conjsgKV pcore_normal. Qed. End PCoreProps. Section MorphPcore. Implicit Types (pi : nat_pred) (gT rT : finGroupType). Lemma morphim_pcore pi : GFunctor.pcontinuous (@pcore pi). Proof. (* Goal: GFunctor.pcontinuous (@pcore pi) *) move=> gT rT D G f; apply/bigcapsP=> M /normal_sub_max_pgroup; apply. (* Goal: is_true (@normal rT (@gval rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@pcore_group pi gT (@gval gT D)))) (@gval rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) D))) *) (* Goal: is_true (@pgroup rT pi (@gval rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@pcore_group pi gT (@gval gT D))))) *) by rewrite morphim_pgroup ?pcore_pgroup. (* Goal: is_true (@normal rT (@gval rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@pcore_group pi gT (@gval gT D)))) (@gval rT (@morphim_group gT rT G f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) D))) *) by apply: morphim_normal; apply: pcore_normal. Qed. Lemma pcoreS pi gT (G H : {group gT}) : H \subset G -> H :&: 'O_pi(G) \subset 'O_pi(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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@pcore 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)) (@pcore pi gT (@gval gT H))))) *) move=> sHG; rewrite -{2}(setIidPl sHG). (* 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) (@pcore 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)) (@pcore pi gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT G)))))) *) by do 2!rewrite -(morphim_idm (subsetIl H _)) morphimIdom; apply: morphim_pcore. Qed. Canonical pcore_igFun pi := [igFun by pcore_sub pi & morphim_pcore pi]. Canonical pcore_gFun pi := [gFun by morphim_pcore pi]. Canonical pcore_pgFun pi := [pgFun by morphim_pcore pi]. Lemma pcore_char pi gT (G : {group gT}) : 'O_pi(G) \char G. Proof. (* Goal: is_true (@characteristic gT (@pcore pi gT (@gval gT G)) (@gval gT G)) *) exact: gFchar. Qed. Section PcoreMod. Variable F : GFunctor.pmap. Lemma pcore_mod_sub pi gT (G : {group gT}) : pcore_mod G pi (F _ G) \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)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *) by rewrite sub_morphpre_im ?gFsub_trans ?morphimS ?gFnorm //= ker_coset gFsub. Qed. Lemma quotient_pcore_mod pi gT (G : {group gT}) (B : {set gT}) : pcore_mod G pi B / B = 'O_pi(G / B). Proof. (* Goal: @eq (@set_of (@coset_finType gT B) (Phant (@coset_of gT B))) (@quotient gT (@pcore_mod gT (@gval gT G) pi B) B) (@pcore pi (@coset_groupType gT B) (@quotient gT (@gval gT G) B)) *) exact/morphpreK/gFsub_trans/morphim_sub. Qed. Lemma morphim_pcore_mod pi gT rT (D G : {group gT}) (f : {morphism D >-> rT}) : f @* pcore_mod G pi (F _ G) \subset pcore_mod (f @* G) pi (F _ (f @* G)). Proof. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@pcore_mod rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) *) have sDF: D :&: G \subset 'dom (coset (F _ G)). (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@pcore_mod rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@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)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))))) *) by rewrite setIC subIset ?gFnorm. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@pcore_mod rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) *) have sDFf: D :&: G \subset 'dom (coset (F _ (f @* G)) \o f). (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@pcore_mod rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@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)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f))))))) *) by rewrite -sub_morphim_pre ?subsetIl // morphimIdom gFnorm. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@pcore_mod rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) *) pose K := 'ker (restrm sDFf (coset (F _ (f @* G)) \o f)). (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@pcore_mod rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) *) have sFK: 'ker (restrm sDF (coset (F _ G))) \subset K. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@pcore_mod rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@restrm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) 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)) K))) *) rewrite /K !ker_restrm ker_comp /= subsetI subsetIl /= -setIA. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@pcore_mod rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@ker gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))))))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@ker rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@normaliser rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@MorPhantom rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))))) *) rewrite -sub_morphim_pre ?subsetIl //. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@pcore_mod rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) *) (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@ker gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@ker rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@normaliser rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@MorPhantom rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))))) *) by rewrite morphimIdom !ker_coset (setIidPr _) ?pmorphimF ?gFsub. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@pcore_mod rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) *) have sOF := pcore_sub pi (G / F _ G); have sDD: D :&: G \subset D :&: G by []. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@pcore_mod rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) *) rewrite -sub_morphim_pre -?quotientE; last first. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@pcore pi (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) *) by apply: subset_trans (gFnorm F _); rewrite morphimS ?pcore_mod_sub. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@pcore pi (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) *) suffices im_fact (H : {group gT}) : F _ G \subset H -> H \subset G -> factm sFK sDD @* (H / F _ G) = f @* H / F _ (f @* G). (* 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)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq (@set_of (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@setI_group gT D G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@setI_group gT D G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@gval gT (@setI_group gT D G))) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD)) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) *) (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@pcore pi (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) *) - (* 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)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq (@set_of (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@setI_group gT D G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@setI_group gT D G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@gval gT (@setI_group gT D G))) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD)) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) *) (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@pcore pi (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) *) rewrite -2?im_fact ?pcore_mod_sub ?gFsub //; try by rewrite -{1}[F _ G]ker_coset morphpreS ?sub1G. (* 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)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq (@set_of (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@setI_group gT D G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@setI_group gT D G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@gval gT (@setI_group gT D G))) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD)) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) *) (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@setI_group gT D G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@setI_group gT D G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@gval gT (@setI_group gT D G))) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD)) (@quotient gT (@gval gT (@pcore_mod_group gT (@gval gT G) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@pcore pi (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@setI_group gT D G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@setI_group gT D G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@gval gT (@setI_group gT D G))) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD)) (@quotient gT (@gval gT G) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))))) *) by rewrite quotient_pcore_mod morphim_pcore. (* 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)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq (@set_of (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@setI_group gT D G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@setI_group gT D G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))))) (@gval gT (@setI_group gT D G))) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD)) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) *) move=> sFH sHG; rewrite -(morphimIdom _ (H / _)) /= {2}morphim_restrm setIid. (* Goal: @eq (@set_of (FinGroup.finType (@coset_baseGroupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (Phant (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@restrm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G))) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@normaliser rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@normaliser rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD)) (@setI (FinGroup.arg_finType (@coset_baseGroupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G))) (@quotient gT (@gval gT H) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) *) rewrite -morphimIG ?ker_coset //. (* Goal: @eq (@set_of (FinGroup.finType (@coset_baseGroupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (Phant (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@morphim (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@restrm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G))) (@factm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@normaliser rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD) (@MorPhantom (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@factm gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI_group gT D G) (@setI_group gT D G) (@restrm_morphism gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@normaliser rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) sDFf (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@restrm_morphism gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@dom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@normaliser gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@coset gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) sDF (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) sFK sDD)) (@morphim gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@normaliser_group gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@mfun gT (@coset_groupType gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))) (@gval gT (@normaliser_group gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G)))) (@coset_morphism gT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT G))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D) (@gval gT G)) (@gval gT H)))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) *) rewrite -(morphim_restrm sDF) morphim_factm morphim_restrm. (* Goal: @eq (@set_of (FinGroup.finType (@coset_baseGroupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (Phant (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))))) (@morphim gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@normaliser rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@dom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@normaliser rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))) (@MorPhantom gT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@funcomp (@coset_of rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base gT)) tt (@coset rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) (@mfun gT rT (@gval gT D) f)))) (@comp_morphism gT rT (@coset_groupType rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) D (@normaliser_group rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) f (@coset_morphism rT (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@setI_group gT D G)) (@gval gT H))) (@quotient rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H)) (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)))) *) by rewrite morphim_comp -quotientE -setIA morphimIdom (setIidPr _). Qed. Lemma pcore_mod_res pi gT rT (D : {group gT}) (f : {morphism D >-> rT}) : f @* pcore_mod D pi (F _ D) \subset pcore_mod (f @* D) pi (F _ (f @* D)). Proof. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@pcore_mod gT (@gval gT D) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) gT (@gval gT D)))))) (@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)) (@pcore_mod rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT D)) pi (@GFunctor.apply (GFunctor.iso_of_map (GFunctor.map_of_pmap F)) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT D))))))) *) exact: morphim_pcore_mod. Qed. Lemma pcore_mod1 pi gT (G : {group gT}) : pcore_mod G pi 1 = 'O_pi(G). Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@pcore_mod gT (@gval gT G) pi (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@pcore pi gT (@gval gT G)) *) rewrite /pcore_mod; have inj1 := coset1_injm gT; rewrite -injmF ?norms1 //. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@morphpre gT (@coset_groupType gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@normaliser gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@coset_morphism gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@MorPhantom gT (@coset_groupType gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@coset gT (oneg (group_set_of_baseGroupType (FinGroup.base gT))))) (@morphim gT (@coset_groupType gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@gval gT (@normaliser_group gT (oneg (group_set_of_baseGroupType (FinGroup.base gT))))) (@coset_morphism gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@MorPhantom gT (@coset_groupType gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@mfun gT (@coset_groupType gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@gval gT (@normaliser_group gT (oneg (group_set_of_baseGroupType (FinGroup.base gT))))) (@coset_morphism gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (@GFunctor.apply (pcore_igFun pi) gT (@gval gT G)))) (@pcore pi gT (@gval gT G)) *) by rewrite -(morphim_invmE inj1) morphim_invm ?norms1. Qed. End PcoreMod. Lemma pseries_rcons pi pis gT (A : {set gT}) : pseries (rcons pis pi) A = pcore_mod A pi (pseries pis A). Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@pseries (@rcons nat_pred pis pi) gT A) (@pcore_mod gT A pi (@pseries pis gT A)) *) by rewrite /pseries rev_rcons. Qed. Lemma pseries_subfun pis : GFunctor.closed (@pseries pis) /\ GFunctor.pcontinuous (@pseries pis). Proof. (* Goal: and (GFunctor.closed (@pseries pis)) (GFunctor.pcontinuous (@pseries pis)) *) elim/last_ind: pis => [|pis pi [sFpi fFpi]]. (* Goal: and (GFunctor.closed (@pseries (@rcons nat_pred pis pi))) (GFunctor.pcontinuous (@pseries (@rcons nat_pred pis pi))) *) (* Goal: and (GFunctor.closed (@pseries (@nil nat_pred))) (GFunctor.pcontinuous (@pseries (@nil nat_pred))) *) by split=> [gT G | gT rT D G f]; rewrite (sub1G, morphim1). (* Goal: and (GFunctor.closed (@pseries (@rcons nat_pred pis pi))) (GFunctor.pcontinuous (@pseries (@rcons nat_pred pis pi))) *) pose fF := [gFun by fFpi : GFunctor.continuous [igFun by sFpi & fFpi]]. (* Goal: and (GFunctor.closed (@pseries (@rcons nat_pred pis pi))) (GFunctor.pcontinuous (@pseries (@rcons nat_pred pis pi))) *) pose F := [pgFun by fFpi : GFunctor.hereditary fF]. (* Goal: and (GFunctor.closed (@pseries (@rcons nat_pred pis pi))) (GFunctor.pcontinuous (@pseries (@rcons nat_pred pis pi))) *) split=> [gT G | gT rT D G f]; rewrite !pseries_rcons ?(pcore_mod_sub F) //. (* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@pcore_mod gT (@gval gT D) pi (@pseries pis gT (@gval gT D)))))) (@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)) (@pcore_mod rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT D)) pi (@pseries pis rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT D))))))) *) exact: (morphim_pcore_mod F). Qed. Lemma pseries_sub pis : GFunctor.closed (@pseries pis). Proof. (* Goal: GFunctor.closed (@pseries pis) *) by case: (pseries_subfun pis). Qed. Lemma morphim_pseries pis : GFunctor.pcontinuous (@pseries pis). Proof. (* Goal: GFunctor.pcontinuous (@pseries pis) *) by case: (pseries_subfun pis). Qed. Lemma pseriesS pis : GFunctor.hereditary (@pseries pis). Proof. (* Goal: GFunctor.hereditary (@pseries pis) *) exact: (morphim_pseries pis). Qed. Canonical pseries_igFun pis := [igFun by pseries_sub pis & morphim_pseries pis]. Canonical pseries_gFun pis := [gFun by morphim_pseries pis]. Canonical pseries_pgFun pis := [pgFun by morphim_pseries pis]. Lemma pseries_char pis gT (G : {group gT}) : pseries pis G \char G. Proof. (* Goal: is_true (@characteristic gT (@pseries pis gT (@gval gT G)) (@gval gT G)) *) exact: gFchar. Qed. Lemma pseries_normal pis gT (G : {group gT}) : pseries pis G <| G. Proof. (* Goal: is_true (@normal gT (@pseries pis gT (@gval gT G)) (@gval gT G)) *) exact: gFnormal. Qed. Lemma pseriesJ pis gT (G : {group gT}) x : pseries pis (G :^ x) = pseries pis G :^ x. Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@pseries pis gT (@conjugate gT (@gval gT G) x)) (@conjugate gT (@pseries pis gT (@gval gT G)) x) *) rewrite -{1}(setIid G) -morphim_conj -(injmF _ (injm_conj G x)) //=. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@morphim gT gT (@gval gT G) (@conjgm_morphism gT (@gval gT G) x) (@MorPhantom gT gT (@conjgm gT (@gval gT G) x)) (@pseries pis gT (@gval gT G))) (@conjugate gT (@pseries pis gT (@gval gT G)) x) *) by rewrite morphim_conj (setIidPr (pseries_sub _ _)). Qed. Lemma pseries1 pi gT (G : {group gT}) : 'O_{pi}(G) = 'O_pi(G). Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@pseries (@cons nat_pred pi (@nil nat_pred)) gT (@gval gT G)) (@pcore pi gT (@gval gT G)) *) exact: pcore_mod1. Qed. Lemma pseries_pop pi pis gT (G : {group gT}) : 'O_pi(G) = 1 -> pseries (pi :: pis) G = pseries pis G. Proof. (* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@pcore pi gT (@gval gT G)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@pseries (@cons nat_pred pi pis) gT (@gval gT G)) (@pseries pis gT (@gval gT G)) *) by move=> OG1; rewrite /pseries rev_cons -cats1 foldr_cat /= pcore_mod1 OG1. Qed. Lemma pseries_pop2 pi1 pi2 gT (G : {group gT}) : 'O_pi1(G) = 1 -> 'O_{pi1, pi2}(G) = 'O_pi2(G). Proof. (* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@pcore pi1 gT (@gval gT G)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@pseries (@cons nat_pred pi1 (@cons nat_pred pi2 (@nil nat_pred))) gT (@gval gT G)) (@pcore pi2 gT (@gval gT G)) *) by move/pseries_pop->; apply: pseries1. Qed. Lemma pseries_sub_catl pi1s pi2s gT (G : {group gT}) : pseries pi1s G \subset pseries (pi1s ++ pi2s) 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)) (@pseries pi1s 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)) (@pseries (@cat nat_pred pi1s pi2s) gT (@gval gT G))))) *) elim/last_ind: pi2s => [|pi pis IHpi]; rewrite ?cats0 // -rcons_cat. (* 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)) (@pseries pi1s 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)) (@pseries (@rcons nat_pred (@cat nat_pred pi1s pi) pis) gT (@gval gT G))))) *) by rewrite pseries_rcons; apply: subset_trans IHpi _; rewrite sub_cosetpre. Qed. Lemma quotient_pseries pis pi gT (G : {group gT}) : pseries (rcons pis pi) G / pseries pis G = 'O_pi(G / pseries pis G). Proof. (* Goal: @eq (@set_of (@coset_finType gT (@pseries pis gT (@gval gT G))) (Phant (@coset_of gT (@pseries pis gT (@gval gT G))))) (@quotient gT (@pseries (@rcons nat_pred pis pi) gT (@gval gT G)) (@pseries pis gT (@gval gT G))) (@pcore pi (@coset_groupType gT (@pseries pis gT (@gval gT G))) (@quotient gT (@gval gT G) (@pseries pis gT (@gval gT G)))) *) by rewrite pseries_rcons quotient_pcore_mod. Qed. Lemma pseries_norm2 pi1s pi2s gT (G : {group gT}) : pseries pi2s G \subset 'N(pseries pi1s 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)) (@pseries pi2s 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 (@pseries pi1s gT (@gval gT G)))))) *) by rewrite gFsub_trans ?gFnorm. Qed. Lemma pseries_sub_catr pi1s pi2s gT (G : {group gT}) : pseries pi2s G \subset pseries (pi1s ++ pi2s) G. Lemma quotient_pseries2 pi1 pi2 gT (G : {group gT}) : 'O_{pi1, pi2}(G) / 'O_pi1(G) = 'O_pi2(G / 'O_pi1(G)). Proof. (* Goal: @eq (@set_of (@coset_finType gT (@pcore pi1 gT (@gval gT G))) (Phant (@coset_of gT (@pcore pi1 gT (@gval gT G))))) (@quotient gT (@pseries (@cons nat_pred pi1 (@cons nat_pred pi2 (@nil nat_pred))) gT (@gval gT G)) (@pcore pi1 gT (@gval gT G))) (@pcore pi2 (@coset_groupType gT (@pcore pi1 gT (@gval gT G))) (@quotient gT (@gval gT G) (@pcore pi1 gT (@gval gT G)))) *) by rewrite -pseries1 -quotient_pseries. Qed. Lemma quotient_pseries_cat pi1s pi2s gT (G : {group gT}) : pseries (pi1s ++ pi2s) G / pseries pi1s G = pseries pi2s (G / pseries pi1s G). Lemma pseries_catl_id pi1s pi2s gT (G : {group gT}) : pseries pi1s (pseries (pi1s ++ pi2s) G) = pseries pi1s G. Lemma pseries_char_catl pi1s pi2s gT (G : {group gT}) : pseries pi1s G \char pseries (pi1s ++ pi2s) G. Proof. (* Goal: is_true (@characteristic gT (@pseries pi1s gT (@gval gT G)) (@pseries (@cat nat_pred pi1s pi2s) gT (@gval gT G))) *) by rewrite -(pseries_catl_id pi1s pi2s G) pseries_char. Qed. Lemma pseries_catr_id pi1s pi2s gT (G : {group gT}) : pseries pi2s (pseries (pi1s ++ pi2s) G) = pseries pi2s G. Lemma pseries_char_catr pi1s pi2s gT (G : {group gT}) : pseries pi2s G \char pseries (pi1s ++ pi2s) G. Proof. (* Goal: is_true (@characteristic gT (@pseries pi2s gT (@gval gT G)) (@pseries (@cat nat_pred pi1s pi2s) gT (@gval gT G))) *) by rewrite -(pseries_catr_id pi1s pi2s G) pseries_char. Qed. Lemma pcore_modp pi gT (G H : {group gT}) : H <| G -> pi.-group H -> pcore_mod G pi H = 'O_pi(G). Lemma pquotient_pcore pi gT (G H : {group gT}) : H <| G -> pi.-group H -> 'O_pi(G / H) = 'O_pi(G) / H. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@pgroup gT pi (@gval gT H))), @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))))))) (@pcore pi (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@quotient gT (@pcore pi gT (@gval gT G)) (@gval gT H)) *) by move=> nsHG piH; rewrite -quotient_pcore_mod pcore_modp. Qed. Lemma trivg_pcore_quotient pi gT (G : {group gT}) : 'O_pi(G / 'O_pi(G)) = 1. Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@pcore pi gT (@gval gT G))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@pcore pi gT (@gval gT G)))))))) (@pcore pi (@coset_groupType gT (@pcore pi gT (@gval gT G))) (@quotient gT (@gval gT G) (@pcore pi gT (@gval gT G)))) (oneg (group_set_of_baseGroupType (FinGroup.base (@coset_groupType gT (@pcore pi gT (@gval gT G)))))) *) by rewrite pquotient_pcore ?gFnormal ?pcore_pgroup ?trivg_quotient. Qed. Lemma pseries_rcons_id pis pi gT (G : {group gT}) : pseries (rcons (rcons pis pi) pi) G = pseries (rcons pis pi) G. Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@pseries (@rcons nat_pred (@rcons nat_pred pis pi) pi) gT (@gval gT G)) (@pseries (@rcons nat_pred pis pi) gT (@gval gT G)) *) apply/eqP; rewrite -!cats1 eqEsubset pseries_sub_catl andbT -catA. (* 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)) (@pseries (@cat nat_pred pis (@cat nat_pred (@cons nat_pred pi (@nil nat_pred)) (@cons nat_pred pi (@nil nat_pred)))) 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)) (@pseries (@cat nat_pred pis (@cons nat_pred pi (@nil nat_pred))) gT (@gval gT G))))) *) rewrite -(quotientSGK _ (pseries_sub_catl _ _ _)) ?pseries_norm2 //. (* Goal: is_true (@subset (@coset_finType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@pseries_group pis gT (@gval gT G))))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@pseries_group pis gT (@gval gT G)))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@quotient gT (@pseries (@cat nat_pred pis (@cat nat_pred (@cons nat_pred pi (@nil nat_pred)) (@cons nat_pred pi (@nil nat_pred)))) gT (@gval gT G)) (@gval gT (@pseries_group pis gT (@gval gT G)))))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@pseries_group pis gT (@gval gT G))))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@pseries_group pis gT (@gval gT G)))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@quotient gT (@gval gT (@pseries_group (@cat nat_pred pis (@cons nat_pred pi (@nil nat_pred))) gT (@gval gT G))) (@gval gT (@pseries_group pis gT (@gval gT G))))))) *) rewrite !quotient_pseries_cat -quotient_sub1 ?pseries_norm2 //. (* Goal: is_true (@subset (@coset_finType (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@gval (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@pseries_group (@cons nat_pred pi (@nil nat_pred)) (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@quotient gT (@gval gT G) (@pseries pis gT (@gval gT G)))))) (@mem (Finite.sort (@coset_finType (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@gval (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@pseries_group (@cons nat_pred pi (@nil nat_pred)) (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@quotient gT (@gval gT G) (@pseries pis gT (@gval gT G))))))) (predPredType (Finite.sort (@coset_finType (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@gval (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@pseries_group (@cons nat_pred pi (@nil nat_pred)) (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@quotient gT (@gval gT G) (@pseries pis gT (@gval gT G)))))))) (@SetDef.pred_of_set (@coset_finType (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@gval (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@pseries_group (@cons nat_pred pi (@nil nat_pred)) (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@quotient gT (@gval gT G) (@pseries pis gT (@gval gT G)))))) (@quotient (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@pseries (@cat nat_pred (@cons nat_pred pi (@nil nat_pred)) (@cons nat_pred pi (@nil nat_pred))) (@coset_groupType gT (@pseries pis gT (@gval gT G))) (@quotient gT (@gval gT G) (@pseries pis gT (@gval gT G)))) (@gval (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@pseries_group (@cons nat_pred pi (@nil nat_pred)) (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@quotient gT (@gval gT G) (@pseries pis gT (@gval gT G)))))))) (@mem (Finite.sort (FinGroup.finType (@coset_baseGroupType (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@gval (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@pseries_group (@cons nat_pred pi (@nil nat_pred)) (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@quotient gT (@gval gT G) (@pseries pis gT (@gval gT G)))))))) (predPredType (Finite.sort (FinGroup.finType (@coset_baseGroupType (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@gval (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@pseries_group (@cons nat_pred pi (@nil nat_pred)) (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@quotient gT (@gval gT G) (@pseries pis gT (@gval gT G))))))))) (@SetDef.pred_of_set (FinGroup.finType (@coset_baseGroupType (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@gval (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@pseries_group (@cons nat_pred pi (@nil nat_pred)) (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@quotient gT (@gval gT G) (@pseries pis gT (@gval gT G))))))) (oneg (group_set_of_baseGroupType (@coset_baseGroupType (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@gval (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@pseries_group (@cons nat_pred pi (@nil nat_pred)) (@coset_groupType gT (@gval gT (@pseries_group pis gT (@gval gT G)))) (@quotient gT (@gval gT G) (@pseries pis gT (@gval gT G))))))))))) *) by rewrite quotient_pseries_cat /= !pseries1 trivg_pcore_quotient. Qed. End MorphPcore. Section EqPcore. Variables gT : finGroupType. Implicit Types (pi rho : nat_pred) (G H : {group gT}). Lemma sub_in_pcore pi rho G : {in \pi(G), {subset pi <= rho}} -> 'O_pi(G) \subset 'O_rho(G). Proof. (* Goal: forall _ : @prop_in1 nat (@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)))))) (fun x : nat => forall _ : is_true (@in_mem nat x (@mem nat nat_pred_pred pi)), is_true (@in_mem nat x (@mem nat nat_pred_pred rho))) (inPhantom (@sub_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@pcore 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)) (@pcore rho gT (@gval gT G))))) *) move=> pi_sub_rho; rewrite pcore_max ?pcore_normal //. (* Goal: is_true (@pgroup gT rho (@gval gT (@pcore_group pi gT (@gval gT G)))) *) apply: sub_in_pnat (pcore_pgroup _ _) => p. (* Goal: forall (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred (pi_of (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@pcore pi gT (@gval gT G))))))))) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred pi))), is_true (@in_mem nat p (@mem nat nat_pred_pred rho)) *) by move/(piSg (pcore_sub _ _)); apply: pi_sub_rho. Qed. Lemma sub_pcore pi rho G : {subset pi <= rho} -> 'O_pi(G) \subset 'O_rho(G). Proof. (* Goal: forall _ : @sub_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@pcore 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)) (@pcore rho gT (@gval gT G))))) *) by move=> pi_sub_rho; apply: sub_in_pcore (in1W pi_sub_rho). Qed. Lemma eq_in_pcore pi rho G : {in \pi(G), pi =i rho} -> 'O_pi(G) = 'O_rho(G). Proof. (* Goal: forall _ : @prop_in1 nat (@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)))))) (fun x : nat => @eq bool (@in_mem nat x (@mem nat nat_pred_pred pi)) (@in_mem nat x (@mem nat nat_pred_pred rho))) (inPhantom (@eq_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@pcore pi gT (@gval gT G)) (@pcore rho gT (@gval gT G)) *) move=> eq_pi_rho; apply/eqP; rewrite eqEsubset. (* 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)) (@pcore 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)) (@pcore rho 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)) (@pcore rho 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)) (@pcore pi gT (@gval gT G)))))) *) by rewrite !sub_in_pcore // => p /eq_pi_rho->. Qed. Lemma eq_pcore pi rho G : pi =i rho -> 'O_pi(G) = 'O_rho(G). Proof. (* Goal: forall _ : @eq_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@pcore pi gT (@gval gT G)) (@pcore rho gT (@gval gT G)) *) by move=> eq_pi_rho; apply: eq_in_pcore (in1W eq_pi_rho). Qed. Lemma pcoreNK pi G : 'O_pi^'^'(G) = 'O_pi(G). Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@pcore (negn (negn pi)) gT (@gval gT G)) (@pcore pi gT (@gval gT G)) *) by apply: eq_pcore; apply: negnK. Qed. Lemma eq_p'core pi rho G : pi =i rho -> 'O_pi^'(G) = 'O_rho^'(G). Proof. (* Goal: forall _ : @eq_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@pcore (negn pi) gT (@gval gT G)) (@pcore (negn rho) gT (@gval gT G)) *) by move/eq_negn; apply: eq_pcore. Qed. Lemma sdprod_Hall_p'coreP pi H G : pi^'.-Hall(G) 'O_pi^'(G) -> reflect ('O_pi^'(G) ><| H = G) (pi.-Hall(G) H). Proof. (* Goal: forall _ : is_true (@pHall gT (negn pi) (@gval gT G) (@pcore (negn pi) gT (@gval gT G))), Bool.reflect (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@pcore (negn pi) gT (@gval gT G)) (@gval gT H)) (@gval gT G)) (@pHall gT pi (@gval gT G) (@gval gT H)) *) by rewrite -(pHallNK pi G H); apply: sdprod_Hall_pcoreP. Qed. Lemma sdprod_p'core_HallP pi H G : pi.-Hall(G) H -> reflect ('O_pi^'(G) ><| H = G) (pi^'.-Hall(G) 'O_pi^'(G)). Proof. (* Goal: forall _ : is_true (@pHall gT pi (@gval gT G) (@gval gT H)), Bool.reflect (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@pcore (negn pi) gT (@gval gT G)) (@gval gT H)) (@gval gT G)) (@pHall gT (negn pi) (@gval gT G) (@pcore (negn pi) gT (@gval gT G))) *) by rewrite -(pHallNK pi G H); apply: sdprod_pcore_HallP. Qed. Lemma pcoreI pi rho G : 'O_[predI pi & rho](G) = 'O_pi('O_rho(G)). Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@pcore (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G)) (@pcore pi gT (@pcore rho gT (@gval gT G))) *) apply/eqP; rewrite eqEsubset !pcore_max //. (* Goal: is_true (@normal gT (@gval gT (@pcore_group (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G))) (@gval gT (@pcore_group rho gT (@gval gT G)))) *) (* Goal: is_true (@pgroup gT pi (@gval gT (@pcore_group (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G)))) *) (* Goal: is_true (@normal gT (@gval gT (@pcore_group pi gT (@pcore rho gT (@gval gT G)))) (@gval gT G)) *) (* Goal: is_true (@pgroup gT (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) (@gval gT (@pcore_group pi gT (@pcore rho gT (@gval gT G))))) *) - (* Goal: is_true (@normal gT (@gval gT (@pcore_group (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G))) (@gval gT (@pcore_group rho gT (@gval gT G)))) *) (* Goal: is_true (@pgroup gT pi (@gval gT (@pcore_group (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G)))) *) (* Goal: is_true (@normal gT (@gval gT (@pcore_group pi gT (@pcore rho gT (@gval gT G)))) (@gval gT G)) *) (* Goal: is_true (@pgroup gT (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) (@gval gT (@pcore_group pi gT (@pcore rho gT (@gval gT G))))) *) by rewrite /pgroup pnatI -!pgroupE !(pcore_pgroup, pgroupS (pcore_sub pi _)). (* Goal: is_true (@normal gT (@gval gT (@pcore_group (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G))) (@gval gT (@pcore_group rho gT (@gval gT G)))) *) (* Goal: is_true (@pgroup gT pi (@gval gT (@pcore_group (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G)))) *) (* Goal: is_true (@normal gT (@gval gT (@pcore_group pi gT (@pcore rho gT (@gval gT G)))) (@gval gT G)) *) - (* Goal: is_true (@normal gT (@gval gT (@pcore_group (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G))) (@gval gT (@pcore_group rho gT (@gval gT G)))) *) (* Goal: is_true (@pgroup gT pi (@gval gT (@pcore_group (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G)))) *) (* Goal: is_true (@normal gT (@gval gT (@pcore_group pi gT (@pcore rho gT (@gval gT G)))) (@gval gT G)) *) by rewrite !gFnormal_trans. (* Goal: is_true (@normal gT (@gval gT (@pcore_group (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G))) (@gval gT (@pcore_group rho gT (@gval gT G)))) *) (* Goal: is_true (@pgroup gT pi (@gval gT (@pcore_group (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G)))) *) - (* Goal: is_true (@normal gT (@gval gT (@pcore_group (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G))) (@gval gT (@pcore_group rho gT (@gval gT G)))) *) (* Goal: is_true (@pgroup gT pi (@gval gT (@pcore_group (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G)))) *) by apply: sub_pgroup (pcore_pgroup _ _) => p /andP[]. (* Goal: is_true (@normal gT (@gval gT (@pcore_group (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G))) (@gval gT (@pcore_group rho gT (@gval gT G)))) *) apply/andP; split; first by apply: sub_pcore => p /andP[]. (* 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 rho 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 (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) gT (@gval gT G))))))) *) by rewrite gFnorm_trans ?normsG ?gFsub. Qed. Lemma bigcap_p'core pi G : G :&: \bigcap_(p < #|G|.+1 | (p : nat) \in pi) 'O_p^'(G) = 'O_pi^'(G). Lemma coprime_pcoreC (rT : finGroupType) pi G (R : {group rT}) : coprime #|'O_pi(G)| #|'O_pi^'(R)|. Proof. (* Goal: is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@pcore pi gT (@gval gT 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)) (@pcore (negn pi) rT (@gval rT R)))))) *) exact: pnat_coprime (pcore_pgroup _ _) (pcore_pgroup _ _). Qed. Lemma TI_pcoreC pi G H : 'O_pi(G) :&: 'O_pi^'(H) = 1. Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@pcore pi gT (@gval gT G)) (@pcore (negn pi) gT (@gval gT H))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *) by rewrite coprime_TIg ?coprime_pcoreC. Qed. Lemma pcore_setI_normal pi G H : H <| G -> 'O_pi(G) :&: H = 'O_pi(H). Proof. (* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@pcore pi gT (@gval gT G)) (@gval gT H)) (@pcore pi gT (@gval gT H)) *) move=> nsHG; apply/eqP; rewrite eqEsubset subsetI pcore_sub setIC. (* 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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@pcore 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)) (@pcore pi gT (@gval gT H))))) (andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@pcore pi 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)) (@pcore pi gT (@gval gT G))))) true)) *) rewrite !pcore_max ?(pgroupS (subsetIr H _)) ?pcore_pgroup ?gFnormal_trans //=. (* Goal: is_true (@normal gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@pcore pi gT (@gval gT G))) (@gval gT H)) *) by rewrite norm_normalI ?gFnorm_trans ?normsG ?normal_sub. Qed. End EqPcore. Arguments sdprod_Hall_pcoreP {pi gT H G}. Arguments sdprod_Hall_p'coreP {gT pi H G}. Section Injm. Variables (aT rT : finGroupType) (D : {group aT}) (f : {morphism D >-> rT}). Hypothesis injf : 'injm f. Implicit Types (A : {set aT}) (G H : {group aT}). Lemma injm_pgroup pi A : A \subset D -> pi.-group (f @* A) = pi.-group A. Proof. (* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq bool (@pgroup rT pi (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) A)) (@pgroup aT pi A) *) by move=> sAD; rewrite /pgroup card_injm. Qed. Lemma injm_pelt pi x : x \in D -> pi.-elt (f x) = pi.-elt x. Proof. (* 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)) (@gval aT D)))), @eq bool (@p_elt rT pi (@mfun aT rT (@gval aT D) f x)) (@p_elt aT pi x) *) by move=> Dx; rewrite /p_elt order_injm. Qed. Lemma injm_pHall pi G H : G \subset D -> H \subset D -> pi.-Hall(f @* G) (f @* H) = pi.-Hall(G) H. Proof. (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))), @eq bool (@pHall rT pi (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H))) (@pHall aT pi (@gval aT G) (@gval aT H)) *) by move=> sGD sGH; rewrite !pHallE injmSK ?card_injm. Qed. Lemma injm_pcore pi G : G \subset D -> f @* 'O_pi(G) = 'O_pi(f @* G). Proof. (* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@pcore pi aT (@gval aT G))) (@pcore pi rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) *) exact: injmF. Qed. Lemma injm_pseries pis G : G \subset D -> f @* pseries pis G = pseries pis (f @* G). Proof. (* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@pseries pis aT (@gval aT G))) (@pseries pis rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) *) exact: injmF. Qed. End Injm. Section Isog. Variables (aT rT : finGroupType) (G : {group aT}) (H : {group rT}). Lemma isog_pgroup pi : G \isog H -> pi.-group G = pi.-group H. Proof. (* Goal: forall _ : is_true (@isog aT rT (@gval aT G) (@gval rT H)), @eq bool (@pgroup aT pi (@gval aT G)) (@pgroup rT pi (@gval rT H)) *) by move=> isoGH; rewrite /pgroup (card_isog isoGH). Qed. Lemma isog_pcore pi : G \isog H -> 'O_pi(G) \isog 'O_pi(H). Proof. (* Goal: forall _ : is_true (@isog aT rT (@gval aT G) (@gval rT H)), is_true (@isog aT rT (@pcore pi aT (@gval aT G)) (@pcore pi rT (@gval rT H))) *) exact: gFisog. Qed. Lemma isog_pseries pis : G \isog H -> pseries pis G \isog pseries pis H. Proof. (* Goal: forall _ : is_true (@isog aT rT (@gval aT G) (@gval rT H)), is_true (@isog aT rT (@pseries pis aT (@gval aT G)) (@pseries pis rT (@gval rT H))) *) exact: gFisog. Qed. End Isog.
Require Export GeoCoq.Elements.OriginalProofs.lemma_supplementsymmetric. Require Export GeoCoq.Elements.OriginalProofs.lemma_oppositesidesymmetric. Require Export GeoCoq.Elements.OriginalProofs.proposition_27. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma proposition_28B : forall A B C D G H, BetS A G B -> BetS C H D -> RT B G H G H D -> OS B D G H -> Par A B C D. Proof. (* Goal: forall (A B C D G H : @Point Ax0) (_ : @BetS Ax0 A G B) (_ : @BetS Ax0 C H D) (_ : @RT Ax0 B G H 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 *) let Tf:=fresh in assert (Tf:exists a b c d e, (Supp a b c e d /\ CongA B G H a b c /\ CongA G H D e b d)) by (conclude_def RT );destruct Tf as [a[b[c[d[e]]]]];spliter. (* Goal: @Par Ax0 A B C D *) assert (CongA a b c B G H) by (conclude lemma_equalanglessymmetric). (* Goal: @Par Ax0 A B C D *) assert (neq G H) by (forward_using lemma_angledistinct). (* Goal: @Par Ax0 A B C D *) assert (CongA e b d G H D) by (conclude lemma_equalanglessymmetric). (* Goal: @Par Ax0 A B C D *) assert (eq H H) by (conclude cn_equalityreflexive). (* Goal: @Par Ax0 A B C D *) assert (Out G H H) by (conclude lemma_ray4). (* Goal: @Par Ax0 A B C D *) assert (Supp A G H H B) by (conclude_def Supp ). (* Goal: @Par Ax0 A B C D *) assert (Supp B G H H A) by (conclude lemma_supplementsymmetric). (* Goal: @Par Ax0 A B C D *) assert (CongA e b d H G A) by (conclude lemma_supplements). (* Goal: @Par Ax0 A B C D *) assert (CongA G H D e b d) by (conclude lemma_equalanglessymmetric). (* Goal: @Par Ax0 A B C D *) assert (CongA G H D H G A) by (conclude lemma_equalanglestransitive). (* Goal: @Par Ax0 A B C D *) assert (nCol H G A) by (conclude lemma_equalanglesNC). (* Goal: @Par Ax0 A B C D *) assert (CongA H G A A G H) by (conclude lemma_ABCequalsCBA). (* Goal: @Par Ax0 A B C D *) assert (CongA G H D A G H) by (conclude lemma_equalanglestransitive). (* Goal: @Par Ax0 A B C D *) assert (CongA A G H G H D) by (conclude lemma_equalanglessymmetric). (* 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 (nCol A G H) by (conclude lemma_equalanglesNC). (* 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 A G H) 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 (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 TS. Require Import sur_les_relations. Require Import sigma_lift. Require Import determinePC_SL. Require Import resoudPC_SL. Definition e_local1 (b : wsort) (x y : TS b) := forall z : TS b, e_relSL _ x z -> exists u : TS b, e_relSLstar _ y u /\ e_relSLstar _ z u. Notation local1 := (e_local1 _) (only parsing). Goal forall x y : terms, reg_app x y -> e_local1 _ x y. simple induction 1; red in |- *; intros a b0 s z H0. pattern s, z in |- *; apply case_SL_reg_app with a b0; auto. exists (app (env a s) (env b0 s)); auto. Save local_app. Hint Resolve local_app. Goal forall x y : terms, reg_lambda x y -> e_local1 _ x y. simple induction 1; red in |- *; intros a s z H0. pattern s, z in |- *; apply case_SL_reg_lambda with a; auto. exists (lambda (env a (lift s))); auto. Save local_lambda. Hint Resolve local_lambda. Goal forall x y : terms, reg_clos x y -> e_local1 _ x y. simple induction 1; red in |- *; intros a s t z H0. pattern t, z in |- *; apply case_SL_clos with a s; auto. exists (env a (comp s t)); auto. Save local_clos. Hint Resolve local_clos. Goal forall x y : terms, reg_varshift1 x y -> e_local1 _ x y. simple induction 1; red in |- *; intros n z H0. pattern z in |- *; apply case_SL_varshift1 with n; auto. exists (var (S n)); auto. Save local_varshift1. Hint Resolve local_varshift1. Goal forall x y : terms, reg_varshift2 x y -> e_local1 _ x y. simple induction 1; red in |- *; intros n s z H0. pattern z in |- *; apply case_SL_varshift2 with n s; auto. exists (env (var (S n)) s); auto. Save local_varshift2. Hint Resolve local_varshift2. Goal forall x y : terms, reg_fvarcons x y -> e_local1 _ x y. simple induction 1; red in |- *; intros a s z H0. pattern z in |- *; apply case_SL_fvarcons with a s; intros. 3: assumption. exists a; auto. apply PC_fvarcons_ctxt_r with s; assumption. Save local_fvarcons. Hint Resolve local_fvarcons. Goal forall x y : terms, reg_fvarlift1 x y -> e_local1 _ x y. simple induction 1; red in |- *; intros s z H0. pattern z in |- *; apply case_SL_fvarlift1 with s; intros. 3: assumption. exists (var 0); auto. apply PC_fvarlift1_ctxt_r' with s; assumption. Save local_fvarlift1. Hint Resolve local_fvarlift1. Goal forall x y : terms, reg_fvarlift2 x y -> e_local1 _ x y. simple induction 1; red in |- *; intros s t z H0. pattern z in |- *; apply case_SL_fvarlift2 with s t; intros. 3: assumption. exists (env (var 0) t); auto. apply PC_fvarlift2_ctxt_r with s; assumption. Save local_fvarlift2. Hint Resolve local_fvarlift2. Goal forall x y : terms, reg_rvarcons x y -> e_local1 _ x y. simple induction 1; red in |- *; intros n a s z H0. pattern z in |- *; apply case_SL_rvarcons with n a s; intros. 3: assumption. exists (env (var n) s); auto. apply PC_rvarcons_ctxt_r with a; assumption. Save local_rvarcons. Hint Resolve local_rvarcons. Goal forall x y : terms, reg_rvarlift1 x y -> e_local1 _ x y. simple induction 1; red in |- *; intros n s z H0. pattern z in |- *; apply case_SL_rvarlift1 with n s; auto. exists (env (var n) (comp s shift)); auto. Save local_rvarlift1. Hint Resolve local_rvarlift1. Goal forall x y : terms, reg_rvarlift2 x y -> e_local1 _ x y. simple induction 1; red in |- *; intros n s t z H0. pattern z in |- *; apply case_SL_rvarlift2 with n s t; auto. exists (env (var n) (comp s (comp shift t))); auto. Save local_rvarlift2. Hint Resolve local_rvarlift2. Goal forall x y : sub_explicits, reg_assenv x y -> e_local1 _ x y. simple induction 1; red in |- *; intros s t u z H0. pattern u, z in |- *; apply case_SL_assenv with s t; auto. exists (comp s (comp t u)); auto. Save local_assenv. Hint Resolve local_assenv. Goal forall x y : sub_explicits, reg_mapenv x y -> e_local1 _ x y. simple induction 1; red in |- *; intros a s t z H0. pattern t, z in |- *; apply case_SL_mapenv with a s; auto. exists (cons (env a t) (comp s t)); auto. Save local_mapenv. Hint Resolve local_mapenv. Goal forall x y : sub_explicits, reg_shiftcons x y -> e_local1 _ x y. simple induction 1; red in |- *; intros a s z H0. pattern z in |- *; apply case_SL_shiftcons with a s; intros. 3: assumption. exists s; auto. apply PC_shiftcons_ctxt_r with a; assumption. Save local_shiftcons. Hint Resolve local_shiftcons. Goal forall x y : sub_explicits, reg_shiftlift1 x y -> e_local1 _ x y. simple induction 1; red in |- *; intros s z H0. pattern z in |- *; apply case_SL_shiflift1 with s; auto. exists (comp s shift); auto. Save local_shiftlift1. Hint Resolve local_shiftlift1. Goal forall x y : sub_explicits, reg_shiftlift2 x y -> e_local1 _ x y. simple induction 1; red in |- *; intros s t z H0. pattern z in |- *; apply case_SL_shiflift2 with s t; auto. exists (comp s (comp shift t)); auto. Save local_shiftlift2. Hint Resolve local_shiftlift2. Goal forall x y : sub_explicits, reg_lift1 x y -> e_local1 _ x y. simple induction 1; red in |- *; intros s t z H0. pattern z in |- *; apply case_SL_lift1 with s t; auto. exists (lift (comp s t)); auto. Save local_lift1. Hint Resolve local_lift1. Goal forall x y : sub_explicits, reg_lift2 x y -> e_local1 _ x y. simple induction 1; red in |- *; intros s t u z H0. pattern z in |- *; apply case_SL_lift2 with s t u; auto. exists (comp (lift (comp s t)) u); auto. Save local_lift2. Hint Resolve local_lift2. Goal forall x y : sub_explicits, reg_liftenv x y -> e_local1 _ x y. simple induction 1; red in |- *; intros a s t z H0. pattern z in |- *; apply case_SL_liftenv with a s t; auto. exists (cons a (comp s t)); auto. Save local_liftenv. Hint Resolve local_liftenv. Goal forall x y : sub_explicits, reg_idl x y -> e_local1 _ x y. simple induction 1; red in |- *; intros s z H0. pattern s, z in |- *; apply case_SL_idl; auto. exists s; auto. Save local_idl. Hint Resolve local_idl. Goal forall x y : sub_explicits, reg_idr x y -> e_local1 _ x y. simple induction 1; red in |- *; intros s z H0. apply Ex_PQ; pattern s, z in |- *; apply case_SL_idr; auto. exists s; auto. Save local_idr. Hint Resolve local_idr. Goal forall x y : sub_explicits, reg_liftid x y -> e_local1 _ x y. simple induction 1; red in |- *; intros z H0. pattern z in |- *; apply case_SL_liftid; auto. Save local_liftid. Hint Resolve local_liftid. Goal forall x y : terms, reg_id x y -> e_local1 _ x y. simple induction 1; red in |- *; intros a z H0. apply Ex_PQ; pattern a, z in |- *; apply case_SL_reg_id; auto. exists a; auto 6. Save local_id. Hint Resolve local_id. Goal forall (b : wsort) (x y : TS b), e_systemSL _ x y -> e_local1 _ x y. simple induction 1; auto. Save local_systemSL. Goal forall (b : wsort) (x y : TS b), e_relSL _ x y -> e_local1 _ x y. simple induction 1. intros; apply local_systemSL; assumption. red in |- *; intros a a' b0 H0 H1 z H2. pattern z in |- *; apply case_SLapp with a b0. 3: assumption. intros a'' H3; elim (H1 a'' H3); intros a_ H4. elim H4; intros H5 H6. exists (app a_ b0); auto. intros b0' H3; exists (app a' b0'); auto. red in |- *; intros a b0 b0' H0 H1 z H2. pattern z in |- *; apply case_SLapp with a b0. 3: assumption. intros a' H3; exists (app a' b0'); auto. intros b0'' H3; elim (H1 b0'' H3); intros b0_ H4. elim H4; intros H5 H6. exists (app a b0_); auto. red in |- *; intros a a' H0 H1 z H2. pattern z in |- *; apply case_SLlambda with a. 2: assumption. intros a'' H3; elim (H1 a'' H3); intros a_ H4; elim H4; intros H5 H6. exists (lambda a_); auto. red in |- *; intros a a' s H0 H1 z H2. apply Ex_PQ; generalize H0; pattern a, s, z in |- *; apply case_SLenv; auto. intros n H3; elim (case_SLvar n a' H3). intros n s1 H3; elim (case_SLvar n a' H3). intros a1 s1 H3; elim (case_SLvar 0 a' H3). intros s1 H3; elim (case_SLvar 0 a' H3). intros s1 s2 H3; elim (case_SLvar 0 a' H3). intros n a1 s1 H3; elim (case_SLvar (S n) a' H3). intros n s1 H3; elim (case_SLvar (S n) a' H3). intros n s1 s2 H3; elim (case_SLvar (S n) a' H3). intros a'' H3 H4; elim (H1 a'' H3); intros a_ H5; elim H5; intros H6 H7. exists (env a_ s); auto. intros s' H3 H4; exists (env a' s'); auto. red in |- *; intros a s s' H0 H1 z H2. apply Ex_PQ; generalize H0; pattern a, s, z in |- *; apply case_SLenv; auto. intros n H3; elim (case_SLshift s' H3). intros; apply PC_fvarcons_ctxt_r with s1; assumption. intros; apply PC_fvarlift1_ctxt_r' with s1; assumption. intros; apply PC_fvarlift2_ctxt_r with s1; assumption. intros; apply PC_rvarcons_ctxt_r with a1; assumption. intro H3; elim (case_SLid s' H3). intros a' H3 H4; exists (env a' s'); auto. intros s'' H3 H4; elim (H1 s'' H3); intros s_ H5; elim H5; intros H6 H7. exists (env a s_); auto. red in |- *; intros a a' s H0 H1 z H2. pattern z in |- *; apply case_SLcons with a s; auto. intros a'' H3; elim (H1 a'' H3); intros a_ H4; elim H4; intros H5 H6. exists (cons a_ s); auto. intros s' H3; exists (cons a' s'); auto. red in |- *; intros a s s' H0 H1 z H2. pattern z in |- *; apply case_SLcons with a s; auto. intros a' H3; exists (cons a' s'); auto. intros s'' H3; elim (H1 s'' H3); intros s_ H4; elim H4; intros H5 H6. exists (cons a s_); auto. red in |- *; intros s s' t H0 H1 z H2. apply Ex_PQ; generalize H0; pattern s, t, z in |- *; apply case_SLcomp; auto. intros a t1 H3; elim (case_SLshift s' H3). intros t1 H3; elim (case_SLshift s' H3). intros t1 t2 H3; elim (case_SLshift s' H3). intro H3; elim (case_SLid s' H3). intros s'' H3; elim (H1 s'' H3); intros s_ H4; elim H4; intros H5 H6. exists (comp s_ t); auto. intros t' H3; exists (comp s' t'); auto. red in |- *; intros s t t' H0 H1 z H2. apply Ex_PQ; generalize H0; pattern s, t, z in |- *; apply case_SLcomp; auto. intros; apply PC_shiftcons_ctxt_r with a; assumption. intro H3; elim (case_SLid t' H3). intros s' H3; exists (comp s' t'); auto. intros t'' H3; elim (H1 t'' H3); intros t_ H4; elim H4; intros H5 H6. exists (comp s t_); auto. red in |- *; intros s s' H0 H1 z H2. generalize H0; pattern s, z in |- *; apply case_SLlift. 3: assumption. intro H3; elim (case_SLid s' H3). intros s'' H3; elim (H1 s'' H3); intros s_ H4; elim H4; intros H5 H6. exists (lift s_); auto. Save local_relSL. Theorem conf_local_SL : forall b : wsort, explicit_local_confluence _ (e_relSL b). Proof. (* Goal: forall b : wsort, explicit_local_confluence (TS b) (e_relSL b) *) red in |- *; red in |- *; intros b x y z H H0. (* Goal: @ex (TS b) (fun u : TS b => and (explicit_star (TS b) (e_relSL b) y u) (explicit_star (TS b) (e_relSL b) z u)) *) generalize z H0. (* Goal: forall (z : TS b) (_ : e_relSL b x z), @ex (TS b) (fun u : TS b => and (explicit_star (TS b) (e_relSL b) y u) (explicit_star (TS b) (e_relSL b) z u)) *) change (e_local1 _ x y) in |- *; apply local_relSL; assumption. Qed.
Require Import securite. Lemma POinv1rel5 : 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) -> rel5 (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)) (_ : rel5 (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)) (_ : rel5 (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 inv1, rel5 in |- *. (* Goal: forall (_ : inv0 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : and (not (known_in (B2C (K2B (KeyX Aid))) (@app C l rngDDKKeyAB))) (not (known_in (B2C (K2B (KeyX Bid))) (@app C l rngDDKKeyAB)))) (_ : and (@eq (list C) l0 (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l)) (and (@eq AState (MBNaKab d7 d8 d9 k0) (MBNaKab d18 d19 d20 k2)) (and (@eq BState (MANbKabCaCb d4 d5 d6 k c c0) (MANbKabCaCb d15 d16 d17 k1 c1 c2)) (@eq SState (MABNaNbKeyK d d0 d1 d2 d3) (MABNaNbKeyK d10 d11 d12 d13 d14))))), and (not (known_in (B2C (K2B (KeyX Aid))) (@app C l0 rngDDKKeyAB))) (not (known_in (B2C (K2B (KeyX Bid))) (@app C l0 rngDDKKeyAB))) *) intros Inv0 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_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 Inv0 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 (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB))) (not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB))) *) split. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (known_in (B2C (K2B (KeyX Aid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) apply D2. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB) *) unfold triple in |- *. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@app C (@cons C (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) l) rngDDKKeyAB) *) simpl in |- *. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@cons C (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) (@app C l rngDDKKeyAB)) *) repeat apply C2 || apply C3 || apply C4. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@cons C (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)) (@app C l rngDDKKeyAB))) *) apply equivncomp with (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1) :: B2C (K2B (KeyAB d0 d1)) :: l ++ rngDDKKeyAB). (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@cons C (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB))) *) (* Goal: equivS (@cons C (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@cons C (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)) (@app C l rngDDKKeyAB))) *) auto with otway_rees. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@cons C (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB))) *) repeat apply C2 || apply C3 || apply C4. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB))) *) apply equivncomp with (B2C (K2B (KeyAB d0 d1)) :: l ++ rngDDKKeyAB). (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) *) (* Goal: equivS (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) (@cons C (B2C (K2B (KeyAB d0 d1))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB))) *) apply AlreadyIn1. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) *) (* Goal: @In C (B2C (K2B (KeyAB d0 d1))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) *) unfold In in |- *; left; auto with otway_rees. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) *) apply equivncomp with (l ++ rngDDKKeyAB). (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@app C l rngDDKKeyAB) *) (* Goal: equivS (@app C l rngDDKKeyAB) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) *) apply equivS3. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@app C l rngDDKKeyAB) *) (* Goal: equivS (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) (@app C l rngDDKKeyAB) *) apply AlreadyIn1b. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@app C l rngDDKKeyAB) *) (* Goal: @In C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB) *) apply in_or_app; right; apply rngDDKKeyAB1. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d3))) *) (* 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 (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d3))) *) discriminate. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) discriminate. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) discriminate. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d2))) *) discriminate. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) discriminate. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) discriminate. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) discriminate. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d))) *) discriminate. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) (* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) discriminate. (* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB)) *) apply D2. (* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@app C (@cons C (triple (B2C (D2B d)) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) l) rngDDKKeyAB) *) unfold triple in |- *. (* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@app C (@cons C (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) l) rngDDKKeyAB) *) simpl in |- *. (* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@cons C (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) (@app C l rngDDKKeyAB)) *) repeat apply C2 || apply C3 || apply C4. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@cons C (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)) (@app C l rngDDKKeyAB))) *) apply equivncomp with (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1) :: B2C (K2B (KeyAB d0 d1)) :: l ++ rngDDKKeyAB). (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@cons C (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB))) *) (* Goal: equivS (@cons C (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@cons C (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)) (@app C l rngDDKKeyAB))) *) auto with otway_rees. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@cons C (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB))) *) repeat apply C2 || apply C3 || apply C4. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB))) *) apply equivncomp with (B2C (K2B (KeyAB d0 d1)) :: l ++ rngDDKKeyAB). (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) *) (* Goal: equivS (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) (@cons C (B2C (K2B (KeyAB d0 d1))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB))) *) apply AlreadyIn1. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) *) (* Goal: @In C (B2C (K2B (KeyAB d0 d1))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) *) unfold In in |- *; left; auto with otway_rees. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) *) apply equivncomp with (l ++ rngDDKKeyAB). (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@app C l rngDDKKeyAB) *) (* Goal: equivS (@app C l rngDDKKeyAB) (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) *) apply equivS3. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@app C l rngDDKKeyAB) *) (* Goal: equivS (@cons C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB)) (@app C l rngDDKKeyAB) *) apply AlreadyIn1b. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d3))) *) (* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@app C l rngDDKKeyAB) *) (* Goal: @In C (B2C (K2B (KeyAB d0 d1))) (@app C l rngDDKKeyAB) *) apply in_or_app; right; apply rngDDKKeyAB1. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d3))) *) (* 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 d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d3))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1))))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d2))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1))))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1)))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d)) (Pair (Encrypt (Pair (B2C (D2B d2)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d0)) (Encrypt (Pair (B2C (D2B d3)) (B2C (K2B (KeyAB d0 d1)))) (KeyX d1))))) *) discriminate. Qed.
Section Rels. Variable A : Set. Inductive explicit_star (R : A -> A -> Prop) : A -> A -> Prop := | star_refl : forall x : A, explicit_star R x x | star_trans1 : forall x y z : A, R x y -> explicit_star R y z -> explicit_star R x z. Inductive explicit_comp_rel (R1 R2 : A -> A -> Prop) : A -> A -> Prop := comp_2rel : forall x y z : A, R1 x y -> R2 y z -> explicit_comp_rel R1 R2 x z. Inductive explicit_rel_plus (R : A -> A -> Prop) : A -> A -> Prop := | relplus_1step : forall x y : A, R x y -> explicit_rel_plus R x y | relplus_trans1 : forall x y z : A, R x y -> explicit_rel_plus R y z -> explicit_rel_plus R x z. End Rels. Hint Resolve star_refl. Hint Resolve relplus_1step. Notation star := (explicit_star _) (only parsing). Notation comp_rel := (explicit_comp_rel _) (only parsing). Notation rel_plus := (explicit_rel_plus _) (only parsing). Section rels_prop. Variable A : Set. Variable R : A -> A -> Prop. Definition confluence_en (x : A) := forall y z : A, explicit_star _ R x y -> explicit_star _ R x z -> exists u : A, explicit_star _ R y u /\ explicit_star _ R z u. Definition explicit_confluence := forall x : A, confluence_en x. Definition local_confluence_en (x : A) := forall y z : A, R x y -> R x z -> exists u : A, explicit_star _ R y u /\ explicit_star _ R z u. Definition explicit_local_confluence := forall x : A, local_confluence_en x. Definition strong_confluence_en (x : A) := forall y z : A, R x y -> R x z -> exists u : A, R y u /\ R z u. Definition explicit_strong_confluence := forall x : A, strong_confluence_en x. End rels_prop. Notation confluence := (explicit_confluence _) (only parsing). Notation local_confluence := (explicit_local_confluence _) (only parsing). Notation strong_confluence := (explicit_strong_confluence _) (only parsing). Definition explicit_inclus (A : Set) (R1 R2 : A -> A -> Prop) := forall x y : A, R1 x y -> R2 x y. Notation inclus := (explicit_inclus _) (only parsing). Section relations_noetherian. Variable U : Set. Variable R : U -> U -> Prop. Definition a_set := U -> Prop. Definition sub (A B : a_set) := forall x : U, A x -> B x. Definition universal (A : a_set) := forall x : U, A x. Definition adjoint (A : a_set) : a_set := fun x : U => sub (R x) A. Definition hereditary (A : a_set) := sub (adjoint A) A. Definition explicit_noetherian := forall A : a_set, hereditary A -> universal A. End relations_noetherian. Notation noetherian := (explicit_noetherian _) (only parsing). Goal forall (A : Set) (P Q : A -> Prop), (exists u : A, P u /\ Q u) -> exists u : A, Q u /\ P u. simple induction 1; intros u1 H1. elim H1; intros H2 H3. exists u1; split; assumption. Save Ex_PQ. Hint Resolve Ex_PQ. Lemma star_trans : forall (A : Set) (R : A -> A -> Prop) (x y z : A), explicit_star _ R x y -> explicit_star _ R y z -> explicit_star _ R x z. Proof. (* Goal: forall (A : Set) (R : forall (_ : A) (_ : A), Prop) (x y z : A) (_ : explicit_star A R x y) (_ : explicit_star A R y z), explicit_star A R x z *) intros A R x y z H; elim H. (* Goal: forall (x y z0 : A) (_ : R x y) (_ : explicit_star A R y z0) (_ : forall _ : explicit_star A R z0 z, explicit_star A R y z) (_ : explicit_star A R z0 z), explicit_star A R x z *) (* Goal: forall (x : A) (_ : explicit_star A R x z), explicit_star A R x z *) intros x0 H1; assumption. (* Goal: forall (x y z0 : A) (_ : R x y) (_ : explicit_star A R y z0) (_ : forall _ : explicit_star A R z0 z, explicit_star A R y z) (_ : explicit_star A R z0 z), explicit_star A R x z *) intros x0 y0 z0 H1 H2 H3 H4; apply star_trans1 with y0. (* Goal: explicit_star A R y0 z *) (* Goal: R x0 y0 *) assumption. (* Goal: explicit_star A R y0 z *) exact (H3 H4). Qed. Goal forall (A : Set) (R : A -> A -> Prop) (x y : A), R x y -> explicit_star _ R x y. intros; apply star_trans1 with y. assumption. apply star_refl. Save star_step1. Hint Resolve star_step1. Goal forall (A : Set) (R1 R2 : A -> A -> Prop) (M N : A), explicit_comp_rel _ R1 R2 M N -> exists u : A, R1 M u /\ R2 u N. intros A R1 R2 M N H; elim H. intros x y z H1 H2; exists y; split; assumption. Save comp_case. Goal forall (A : Set) (R : A -> A -> Prop) (x y : A), explicit_comp_rel _ R (explicit_star _ R) x y -> explicit_rel_plus _ R x y. intros A R x y H; elim H. intros a b c H1 H2; generalize H1; generalize a. elim H2. intros; apply relplus_1step; assumption. intros x0 y0 z H3 H4 H5 a0 H6; apply relplus_trans1 with x0. assumption. apply H5; assumption. Save comp_relplus. Goal forall (A : Set) (R : A -> A -> Prop) (M N : A), explicit_star _ R M N -> M = N \/ (exists u : A, R M u /\ explicit_star _ R u N). intros A R M N H; elim H. intros x; left; trivial. intros x y z H1 H2 H3; right; exists y; split; trivial. Save star_case. Goal forall (A : Set) (R : A -> A -> Prop) (x y z : A), explicit_rel_plus _ R x y -> explicit_rel_plus _ R y z -> explicit_rel_plus _ R x z. simple induction 1. intros; apply relplus_trans1 with y0; trivial. intros; apply relplus_trans1 with y0; auto. Save Rplus_transitive. Goal forall (A : Set) (R : A -> A -> Prop) (x y : A), explicit_rel_plus _ R x y -> explicit_star _ R x y. simple induction 1; intros. auto. apply star_trans1 with y0; auto. Save Rplus_Rstar. Hint Resolve Rplus_Rstar. Goal forall (A : Set) (R : A -> A -> Prop) (x y z : A), explicit_star _ R x y -> explicit_rel_plus _ R y z -> exists u : A, R x u /\ explicit_star _ R u z. simple induction 1; intros. elim H0; intros. exists y0; auto. exists y0; auto. exists y0; split; trivial. apply star_trans with z0; auto. Save Rstar_Rplus_R. Goal forall (A : Set) (R : A -> A -> Prop), explicit_noetherian _ R -> forall A1 : a_set A, hereditary A (explicit_rel_plus _ R) A1 -> universal A (adjoint A (explicit_star _ R) A1). unfold explicit_noetherian in |- *; unfold hereditary in |- *; unfold universal in |- *; unfold sub in |- *; intros A R N A1 H x. apply (N (adjoint A (explicit_star _ R) A1)). unfold adjoint in |- *; unfold sub in |- *; intros. apply H; unfold adjoint in |- *; unfold sub in |- *; intros. elim Rstar_Rplus_R with A R x0 x1 x2; trivial. intro z; simple induction 1; intros C1 C2; apply H0 with z; trivial. Save noetherian_course_of_values. Lemma plus_preserves_noetherian : forall (A : Set) (R : A -> A -> Prop), explicit_noetherian _ R -> explicit_noetherian _ (explicit_rel_plus _ R). Proof. (* Goal: forall (A : Set) (R : forall (_ : A) (_ : A), Prop) (_ : explicit_noetherian A R), explicit_noetherian A (explicit_rel_plus A R) *) generalize noetherian_course_of_values. (* Goal: forall (_ : forall (A : Set) (R : forall (_ : A) (_ : A), Prop) (_ : explicit_noetherian A R) (A1 : a_set A) (_ : hereditary A (explicit_rel_plus A R) A1), universal A (adjoint A (explicit_star A R) A1)) (A : Set) (R : forall (_ : A) (_ : A), Prop) (_ : explicit_noetherian A R), explicit_noetherian A (explicit_rel_plus A R) *) unfold adjoint in |- *; unfold universal in |- *; unfold sub in |- *; intros. (* Goal: explicit_noetherian A (explicit_rel_plus A R) *) unfold explicit_noetherian in |- *; unfold universal in |- *; unfold sub in |- *; intros. (* Goal: A0 x *) apply (H A R H0 A0 H1 x x). (* Goal: explicit_star A R x x *) auto. Qed. Lemma noetherian_induction1 : forall (A : Set) (R : A -> A -> Prop), explicit_noetherian _ R -> forall (x : A) (P : A -> Prop), (forall y : A, (forall z : A, R y z -> P z) -> P y) -> P x. Proof. (* Goal: forall (A : Set) (R : forall (_ : A) (_ : A), Prop) (_ : explicit_noetherian A R) (x : A) (P : forall _ : A, Prop) (_ : forall (y : A) (_ : forall (z : A) (_ : R y z), P z), P y), P x *) unfold explicit_noetherian in |- *; unfold universal in |- *; unfold hereditary in |- *; unfold adjoint in |- *; unfold sub in |- *; unfold a_set in |- *; intros. (* Goal: P x *) pattern x in |- *; apply H; exact H0. Qed. Lemma noetherian_induction : forall (A : Set) (R : A -> A -> Prop), explicit_noetherian _ R -> forall (x : A) (P : A -> Prop), (forall y : A, (forall z : A, explicit_rel_plus _ R y z -> P z) -> P y) -> P x. Proof. (* Goal: forall (A : Set) (R : forall (_ : A) (_ : A), Prop) (_ : explicit_noetherian A R) (x : A) (P : forall _ : A, Prop) (_ : forall (y : A) (_ : forall (z : A) (_ : explicit_rel_plus A R y z), P z), P y), P x *) intros; pattern x in |- *; apply noetherian_induction1 with A (explicit_rel_plus _ R). (* Goal: forall (y : A) (_ : forall (z : A) (_ : explicit_rel_plus A R y z), P z), P y *) (* Goal: explicit_noetherian A (explicit_rel_plus A R) *) apply plus_preserves_noetherian; assumption. (* Goal: forall (y : A) (_ : forall (z : A) (_ : explicit_rel_plus A R y z), P z), P y *) exact H0. Qed. Lemma noether_inclus : forall (A : Set) (R R' : A -> A -> Prop), explicit_noetherian _ R -> (forall x y : A, R' x y -> R x y) -> explicit_noetherian _ R'. Proof. (* Goal: forall (A : Set) (R R' : forall (_ : A) (_ : A), Prop) (_ : explicit_noetherian A R) (_ : forall (x y : A) (_ : R' x y), R x y), explicit_noetherian A R' *) intros; unfold explicit_noetherian in |- *; unfold universal in |- *; unfold hereditary in |- *; unfold adjoint in |- *; unfold sub in |- *; unfold a_set in |- *; intros. (* Goal: A0 x *) pattern x in |- *; apply (noetherian_induction1 A R H); auto. Qed. Goal forall (A : Set) (R S : A -> A -> Prop), explicit_inclus _ R (explicit_star _ S) -> explicit_inclus _ (explicit_star _ R) (explicit_star _ S). intros A R S H; red in |- *; simple induction 1. auto. intros x0 y0 z H1 H2 H3; apply star_trans with y0; auto. Save inclus_star. Goal forall (A : Set) (R S : A -> A -> Prop), explicit_inclus _ R S -> explicit_inclus _ (explicit_star _ R) (explicit_star _ S). unfold explicit_inclus in |- *; simple induction 2. auto. intros x0 y0 z H1 H2 H3; apply star_trans1 with y0. apply (H x0 y0 H1). assumption. Save inclus_reg_star. Hint Resolve inclus_reg_star. Goal forall (A : Set) (R1 R2 S : A -> A -> Prop), explicit_inclus _ R1 S -> explicit_inclus _ R2 S -> (forall x y z : A, S x y -> S y z -> S x z) -> explicit_inclus _ (explicit_comp_rel _ R1 R2) S. intros A R1 R2 S H H0 H1; red in |- *; simple induction 1. intros x0 y0 z H3 H4; apply H1 with y0; auto. Save inclus_comp. Hint Resolve inclus_comp. Goal forall (A : Set) (R : A -> A -> Prop), explicit_strong_confluence _ R -> explicit_confluence _ R. intros A R H; red in |- *; red in |- *. intros x y z H1; generalize z; elim H1. intros x0 z0 H2; exists z0; split; auto. intros x0 y0 y1 H2 H3 H4 z0 H5. cut (exists u : A, explicit_star _ R y0 u /\ R z0 u). intro H6; elim H6; intros z1 H7; elim H7; intros H8 H9. elim (H4 z1 H8); intros u H10; elim H10; intros H11 H12. exists u; split. assumption. apply star_trans1 with z1; assumption. generalize H2; generalize y0; elim H5. intros x1 y2 H6; exists y2; split; auto. intros x1 y2 z1 H6 H7 H8 y3 H9; elim (H x1 y3 y2). intros x2 H10; elim H10; intros H11 H12. elim (H8 x2 H12); intros u H13; elim H13; intros H14 H15. exists u; split; [ apply star_trans1 with x2; assumption | assumption ]; trivial. assumption. assumption. Save strong_conf_conf. Goal forall (A : Set) (R S : A -> A -> Prop), explicit_inclus _ R S -> explicit_inclus _ S (explicit_star _ R) -> explicit_confluence _ S -> explicit_confluence _ R. red in |- *; red in |- *; intros A R S H H0 H1 x y z H2 H3. cut (explicit_inclus _ (explicit_star _ R) (explicit_star _ S)). 2: auto. intro H4; elim (H1 x y z (H4 x y H2) (H4 x z H3)). intros x' H5; elim H5; intros H6 H7. exists x'; split. exact (inclus_star A S R H0 y x' H6). exact (inclus_star A S R H0 z x' H7). Save inclus_conf.
Require Import securite. Lemma POinv1rel4 : 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) -> rel4 (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)) (_ : rel4 (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)) (_ : rel4 (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 rel4 in |- *; intros Inv0 know_Kas_Kbs 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 t4 eq_l0. (* 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.
Set Implicit Arguments. Unset Strict Implicit. Require Export List. Section Listes. Variable A : Set. Let List := list A. Inductive item (x : A) : List -> nat -> Prop := | item_hd : forall l : List, item x (x :: l) 0 | item_tl : forall (l : List) (n : nat) (y : A), item x l n -> item x (y :: l) (S n). Lemma fun_item : forall (u v : A) (e : List) (n : nat), item u e n -> item v e n -> u = v. Proof. (* Goal: forall (u v : A) (e : List) (n : nat) (_ : item u e n) (_ : item v e n), @eq A u v *) simple induction 1; intros. (* Goal: @eq A u v *) (* Goal: @eq A u v *) inversion_clear H0; auto. (* Goal: @eq A u v *) inversion_clear H2; auto. Qed. Lemma list_item : forall e n, {t : _ | item t e n} + {(forall t, ~ item t e n)}. Proof. (* Goal: forall (e : List) (n : nat), sumor (@sig A (fun t : A => item t e n)) (forall t : A, not (item t e n)) *) fix item_rec 1. (* Goal: forall (e : List) (n : nat), sumor (@sig A (fun t : A => item t e n)) (forall t : A, not (item t e n)) *) intros [| h l]. (* Goal: forall n : nat, sumor (@sig A (fun t : A => item t (@cons A h l) n)) (forall t : A, not (item t (@cons A h l) n)) *) (* Goal: forall n : nat, sumor (@sig A (fun t : A => item t (@nil A) n)) (forall t : A, not (item t (@nil A) n)) *) right; red in |- *; intros t in_nil; inversion in_nil. (* Goal: forall n : nat, sumor (@sig A (fun t : A => item t (@cons A h l) n)) (forall t : A, not (item t (@cons A h l) n)) *) intros [| k]. (* Goal: sumor (@sig A (fun t : A => item t (@cons A h l) (S k))) (forall t : A, not (item t (@cons A h l) (S k))) *) (* Goal: sumor (@sig A (fun t : A => item t (@cons A h l) O)) (forall t : A, not (item t (@cons A h l) O)) *) left; exists h; constructor. (* Goal: sumor (@sig A (fun t : A => item t (@cons A h l) (S k))) (forall t : A, not (item t (@cons A h l) (S k))) *) case (item_rec l k). (* Goal: forall _ : forall t : A, not (item t l k), sumor (@sig A (fun t : A => item t (@cons A h l) (S k))) (forall t : A, not (item t (@cons A h l) (S k))) *) (* Goal: forall _ : @sig A (fun t : A => item t l k), sumor (@sig A (fun t : A => item t (@cons A h l) (S k))) (forall t : A, not (item t (@cons A h l) (S k))) *) intros (y, in_tl); left; exists y; constructor; trivial. (* Goal: forall _ : forall t : A, not (item t l k), sumor (@sig A (fun t : A => item t (@cons A h l) (S k))) (forall t : A, not (item t (@cons A h l) (S k))) *) intros not_in_tl; right; intros t in_tl_l; inversion_clear in_tl_l; red in not_in_tl; eauto. Qed. Inductive trunc : nat -> List -> List -> Prop := | trunc_O : forall e : List, trunc 0 e e | trunc_S : forall (k : nat) (e f : List) (x : A), trunc k e f -> trunc (S k) (x :: e) f. Lemma item_trunc : forall (n : nat) (e : List) (t : A), item t e n -> exists f : List, trunc (S n) e f. Proof. (* Goal: forall (n : nat) (e : List) (t : A) (_ : item t e n), @ex List (fun f : List => trunc (S n) e f) *) simple induction n; intros. (* Goal: @ex List (fun f : List => trunc (S (S n0)) e f) *) (* Goal: @ex List (fun f : List => trunc (S O) e f) *) inversion_clear H. (* Goal: @ex List (fun f : List => trunc (S (S n0)) e f) *) (* Goal: @ex List (fun f : List => trunc (S O) (@cons A t l) f) *) exists l. (* Goal: @ex List (fun f : List => trunc (S (S n0)) e f) *) (* Goal: trunc (S O) (@cons A t l) l *) apply trunc_S. (* Goal: @ex List (fun f : List => trunc (S (S n0)) e f) *) (* Goal: trunc O l l *) apply trunc_O. (* Goal: @ex List (fun f : List => trunc (S (S n0)) e f) *) inversion_clear H0. (* Goal: @ex List (fun f : List => trunc (S (S n0)) (@cons A y l) f) *) elim H with l t; intros. (* Goal: item t l n0 *) (* Goal: @ex List (fun f : List => trunc (S (S n0)) (@cons A y l) f) *) exists x. (* Goal: item t l n0 *) (* Goal: trunc (S (S n0)) (@cons A y l) x *) apply trunc_S. (* Goal: item t l n0 *) (* Goal: trunc (S n0) l x *) trivial. (* Goal: item t l n0 *) trivial. Qed. End Listes. Hint Resolve item_hd item_tl trunc_O trunc_S: core.
Require Import Arith. Require Import Terms. Require Import Reduction. Require Import Redexes. Require Import Test. Require Import Marks. Require Import Substitution. Require Import Residuals. Require Import Simulation. Require Import Cube. Definition confluence (A : Set) (R : A -> A -> Prop) := forall x y : A, R x y -> forall z : A, R x z -> exists u : A, R y u /\ R z u. Lemma lemma1 : confluence lambda par_red -> confluence lambda red. Proof. (* Goal: forall _ : confluence lambda par_red, confluence lambda red *) unfold all, confluence in |- *; intros. (* Goal: @ex lambda (fun u : lambda => and (red y u) (red z u)) *) cut (exists u : lambda, par_red y u /\ par_red z u). (* Goal: @ex lambda (fun u : lambda => and (par_red y u) (par_red z u)) *) (* Goal: forall _ : @ex lambda (fun u : lambda => and (par_red y u) (par_red z u)), @ex lambda (fun u : lambda => and (red y u) (red z u)) *) simple induction 1. (* Goal: @ex lambda (fun u : lambda => and (par_red y u) (par_red z u)) *) (* Goal: forall (x : lambda) (_ : and (par_red y x) (par_red z x)), @ex lambda (fun u : lambda => and (red y u) (red z u)) *) intros u C; exists u; elim C; intros; split; apply par_red_red; trivial with arith. (* Goal: @ex lambda (fun u : lambda => and (par_red y u) (par_red z u)) *) apply H with x; apply red_par_red; trivial with arith. Qed. Definition strip := forall x y : lambda, par_red x y -> forall z : lambda, par_red1 x z -> exists u : lambda, par_red1 y u /\ par_red z u. Lemma strip_lemma_r : confluence lambda par_red1 -> strip. Proof. (* Goal: forall _ : confluence lambda par_red1, strip *) unfold strip in |- *; simple induction 2; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red1 P u) (par_red z u)) *) (* Goal: @ex lambda (fun u : lambda => and (par_red1 N u) (par_red z u)) *) elim H with M N z; trivial with arith. (* Goal: @ex lambda (fun u : lambda => and (par_red1 P u) (par_red z u)) *) (* Goal: forall (x : lambda) (_ : and (par_red1 N x) (par_red1 z x)), @ex lambda (fun u : lambda => and (par_red1 N u) (par_red z u)) *) intros u C; exists u; elim C; intros; split; trivial with arith. (* Goal: @ex lambda (fun u : lambda => and (par_red1 P u) (par_red z u)) *) (* Goal: par_red z u *) apply one_step_par_red; trivial with arith. (* Goal: @ex lambda (fun u : lambda => and (par_red1 P u) (par_red z u)) *) elim (H2 z H5); intros. (* Goal: @ex lambda (fun u : lambda => and (par_red1 P u) (par_red z u)) *) elim H6; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red1 P u) (par_red z u)) *) elim (H4 x0 H7); intros. (* Goal: @ex lambda (fun u : lambda => and (par_red1 P u) (par_red z u)) *) elim H9; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red1 P u) (par_red z u)) *) exists x1; split; trivial with arith. (* Goal: par_red z x1 *) apply trans_par_red with x0; trivial with arith. Qed. Lemma strip_lemma_l : strip -> confluence lambda par_red. Proof. (* Goal: forall _ : strip, confluence lambda par_red *) unfold confluence in |- *; simple induction 2; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) (* Goal: @ex lambda (fun u : lambda => and (par_red N u) (par_red z u)) *) elim (H M z H2 N H1). (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) (* Goal: forall (x : lambda) (_ : and (par_red1 z x) (par_red N x)), @ex lambda (fun u : lambda => and (par_red N u) (par_red z u)) *) intros u C; exists u; elim C; intros; split; trivial with arith. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) (* Goal: par_red z u *) apply one_step_par_red; trivial with arith. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) elim (H2 z H5); intros. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) elim H6; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) elim (H4 x0 H7); intros. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) elim H9; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) exists x1; split; trivial with arith. (* Goal: par_red z x1 *) apply trans_par_red with x0; trivial with arith. Qed. Lemma lemma2 : confluence lambda par_red1 -> confluence lambda par_red. Proof. (* Goal: forall _ : confluence lambda par_red1, confluence lambda par_red *) intro C; unfold confluence in |- *; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red y u) (par_red z u)) *) apply (strip_lemma_l (strip_lemma_r C) x); trivial with arith. Qed. Lemma parallel_moves : confluence lambda par_red1. Proof. (* Goal: confluence lambda par_red1 *) red in |- *; intros M N R1 P R2. (* Goal: @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) elim (simulation M N); trivial with arith. (* Goal: forall (x : redexes) (_ : residuals (mark M) x (mark N)), @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) elim (simulation M P); trivial with arith. (* Goal: forall (x : redexes) (_ : residuals (mark M) x (mark P)) (x0 : redexes) (_ : residuals (mark M) x0 (mark N)), @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) intros V RV U RU. (* Goal: @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) elim (paving U V (mark M) (mark N) (mark P)); trivial with arith. (* Goal: forall (x : redexes) (_ : @ex redexes (fun VU : redexes => @ex redexes (fun WUV : redexes => and (residuals (mark N) VU WUV) (residuals (mark P) x WUV)))), @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) intros UV C1; elim C1. (* Goal: forall (x : redexes) (_ : @ex redexes (fun WUV : redexes => and (residuals (mark N) x WUV) (residuals (mark P) UV WUV))), @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) intros VU C2; elim C2. (* Goal: forall (x : redexes) (_ : and (residuals (mark N) VU x) (residuals (mark P) UV x)), @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) intros UVW C3; elim C3; intros P1 P2. (* Goal: @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) exists (unmark UVW); split. (* Goal: par_red1 P (unmark UVW) *) (* Goal: par_red1 N (unmark UVW) *) rewrite (inverse N). (* Goal: par_red1 P (unmark UVW) *) (* Goal: par_red1 (unmark (mark N)) (unmark UVW) *) apply Simulation.completeness with VU; trivial with arith. (* Goal: par_red1 P (unmark UVW) *) rewrite (inverse P). (* Goal: par_red1 (unmark (mark P)) (unmark UVW) *) apply Simulation.completeness with UV; trivial with arith. Qed. Lemma confluence_parallel_reduction : confluence lambda par_red. Proof. (* Goal: confluence lambda par_red *) apply lemma2; exact parallel_moves. Qed. Theorem confluence_beta_reduction : confluence lambda red. Proof. (* Goal: confluence lambda red *) apply lemma1; exact confluence_parallel_reduction. Qed.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrbool ssrfun eqtype ssrnat seq div fintype bigop. From mathcomp Require Import prime finset fingroup morphism perm automorphism quotient. From mathcomp Require Import gproduct ssralg finalg zmodp poly. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Import GroupScope GRing.Theory. Section Cyclic. Variable gT : finGroupType. Implicit Types (a x y : gT) (A B : {set gT}) (G K H : {group gT}). Definition cyclic A := [exists x, A == <[x]>]. Lemma cyclicP A : reflect (exists x, A = <[x]>) (cyclic A). Proof. (* Goal: Bool.reflect (@ex (FinGroup.arg_sort (FinGroup.base gT)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) A (@cycle gT x))) (cyclic A) *) exact: exists_eqP. Qed. Lemma cycle_cyclic x : cyclic <[x]>. Proof. (* Goal: is_true (cyclic (@cycle gT x)) *) by apply/cyclicP; exists x. Qed. Lemma cyclic1 : cyclic [1 gT]. Proof. (* Goal: is_true (cyclic (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) *) by rewrite -cycle1 cycle_cyclic. Qed. Section Zpm. Variable a : gT. Definition Zpm (i : 'Z_#[a]) := a ^+ i. Lemma ZpmM : {in Zp #[a] &, {morph Zpm : x y / x * y}}. Proof. (* Goal: @prop_in2 (Finite.sort (ordinal_finType (S (S (Zp_trunc (@order gT a)))))) (@mem (Finite.sort (ordinal_finType (S (S (Zp_trunc (@order gT a)))))) (predPredType (Finite.sort (ordinal_finType (S (S (Zp_trunc (@order gT a))))))) (@SetDef.pred_of_set (ordinal_finType (S (S (Zp_trunc (@order gT a))))) (Zp (@order gT a)))) (fun x y : ordinal (S (S (Zp_trunc (@order gT a)))) => @eq (FinGroup.sort (FinGroup.base gT)) (Zpm ((fun x0 y0 : ordinal (S (S (Zp_trunc (@order gT a)))) => @mulg (Zp_baseFinGroupType (S (Zp_trunc (@order gT a)))) x0 y0) x y)) ((fun x0 y0 : FinGroup.sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x0 y0) (Zpm x) (Zpm y))) (inPhantom (@morphism_2 (ordinal (S (S (Zp_trunc (@order gT a))))) (FinGroup.sort (FinGroup.base gT)) Zpm (fun x y : ordinal (S (S (Zp_trunc (@order gT a)))) => @mulg (Zp_baseFinGroupType (S (Zp_trunc (@order gT a)))) x y) (fun x y : FinGroup.sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x y))) *) rewrite /Zpm; case: (eqVneq a 1) => [-> | nta] i j _ _. (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) a (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) (@mulg (Zp_baseFinGroupType (S (Zp_trunc (@order gT a)))) i j))) (@mulg (FinGroup.base gT) (@expgn (FinGroup.base gT) a (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) i)) (@expgn (FinGroup.base gT) a (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) j))) *) (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) (oneg (FinGroup.base gT)) (@nat_of_ord (S (S (Zp_trunc (@order gT (oneg (FinGroup.base gT)))))) (@mulg (Zp_baseFinGroupType (S (Zp_trunc (@order gT (oneg (FinGroup.base gT)))))) i j))) (@mulg (FinGroup.base gT) (@expgn (FinGroup.base gT) (oneg (FinGroup.base gT)) (@nat_of_ord (S (S (Zp_trunc (@order gT (oneg (FinGroup.base gT)))))) i)) (@expgn (FinGroup.base gT) (oneg (FinGroup.base gT)) (@nat_of_ord (S (S (Zp_trunc (@order gT (oneg (FinGroup.base gT)))))) j))) *) by rewrite !expg1n ?mulg1. (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) a (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) (@mulg (Zp_baseFinGroupType (S (Zp_trunc (@order gT a)))) i j))) (@mulg (FinGroup.base gT) (@expgn (FinGroup.base gT) a (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) i)) (@expgn (FinGroup.base gT) a (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) j))) *) by rewrite /= {3}Zp_cast ?order_gt1 // expg_mod_order expgD. Qed. Canonical Zpm_morphism := Morphism ZpmM. Lemma im_Zpm : Zpm @* Zp #[a] = <[a]>. Proof. (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (Zp (@order gT a)) Zpm_morphism (@MorPhantom (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT Zpm) (Zp (@order gT a))) (@cycle gT a) *) apply/eqP; rewrite eq_sym eqEcard cycle_subG /= andbC morphimEdom. (* Goal: is_true (andb (leq (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@Imset.imset (FinGroup.arg_finType (FinGroup.base (Zp_finGroupType (S (Zp_trunc (@order gT a)))))) (FinGroup.finType (FinGroup.base gT)) (@mfun (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (@gval (Zp_finGroupType (S (Zp_trunc (@order gT a)))) (Zp_group (@order gT a))) Zpm_morphism) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (Zp_finGroupType (S (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (Zp_finGroupType (S (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (Zp_finGroupType (S (Zp_trunc (@order gT a)))))) (@gval (Zp_finGroupType (S (Zp_trunc (@order gT a)))) (Zp_group (@order gT a))))))))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@cycle gT a))))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) a (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@Imset.imset (FinGroup.arg_finType (FinGroup.base (Zp_finGroupType (S (Zp_trunc (@order gT a)))))) (FinGroup.finType (FinGroup.base gT)) (@mfun (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (@gval (Zp_finGroupType (S (Zp_trunc (@order gT a)))) (Zp_group (@order gT a))) Zpm_morphism) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (Zp_finGroupType (S (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (Zp_finGroupType (S (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (Zp_finGroupType (S (Zp_trunc (@order gT a)))))) (@gval (Zp_finGroupType (S (Zp_trunc (@order gT a)))) (Zp_group (@order gT a)))))))))) *) rewrite (leq_trans (leq_imset_card _ _)) ?card_Zp //= /Zp order_gt1. (* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) a (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@Imset.imset (FinGroup.arg_finType (Zp_baseFinGroupType (S (Zp_trunc (@order gT a))))) (FinGroup.finType (FinGroup.base gT)) Zpm (@mem (ordinal (S (S (Zp_trunc (@order gT a))))) (predPredType (ordinal (S (S (Zp_trunc (@order gT a)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (Zp_baseFinGroupType (S (Zp_trunc (@order gT a))))) (if negb (@eq_op (FinGroup.arg_eqType (FinGroup.base gT)) a (oneg (FinGroup.base gT))) then @setTfor (ordinal_finType (S (S (Zp_trunc (@order gT a))))) (Phant (ordinal (S (S (Zp_trunc (@order gT a)))))) else oneg (group_set_of_baseGroupType (Zp_baseFinGroupType (S (Zp_trunc (@order gT a)))))))))))) *) case: eqP => /= [a1 | _]; first by rewrite imset_set1 morph1 a1 set11. (* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) a (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@Imset.imset (FinGroup.arg_finType (Zp_baseFinGroupType (S (Zp_trunc (@order gT a))))) (FinGroup.finType (FinGroup.base gT)) Zpm (@mem (ordinal (S (S (Zp_trunc (@order gT a))))) (predPredType (ordinal (S (S (Zp_trunc (@order gT a)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (Zp_baseFinGroupType (S (Zp_trunc (@order gT a))))) (@setTfor (ordinal_finType (S (S (Zp_trunc (@order gT a))))) (Phant (ordinal (S (S (Zp_trunc (@order gT a))))))))))))) *) by apply/imsetP; exists 1%R; rewrite ?expg1 ?inE. Qed. Lemma injm_Zpm : 'injm Zpm. Lemma eq_expg_mod_order m n : (a ^+ m == a ^+ n) = (m == n %[mod #[a]]). Proof. (* Goal: @eq bool (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@expgn (FinGroup.base gT) a m) (@expgn (FinGroup.base gT) a n)) (@eq_op nat_eqType (modn m (@order gT a)) (modn n (@order gT a))) *) have [->|] := eqVneq a 1; first by rewrite order1 !modn1 !expg1n eqxx. (* Goal: forall _ : is_true (negb (@eq_op (FinGroup.arg_eqType (FinGroup.base gT)) a (oneg (FinGroup.base gT)))), @eq bool (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@expgn (FinGroup.base gT) a m) (@expgn (FinGroup.base gT) a n)) (@eq_op nat_eqType (modn m (@order gT a)) (modn n (@order gT a))) *) rewrite -order_gt1 => lt1a; have ZpT: Zp #[a] = setT by rewrite /Zp lt1a. (* Goal: @eq bool (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@expgn (FinGroup.base gT) a m) (@expgn (FinGroup.base gT) a n)) (@eq_op nat_eqType (modn m (@order gT a)) (modn n (@order gT a))) *) have: injective Zpm by move=> i j; apply (injmP injm_Zpm); rewrite /= ZpT inE. (* Goal: forall _ : @injective (FinGroup.sort (FinGroup.base gT)) (ordinal (S (S (Zp_trunc (@order gT a))))) Zpm, @eq bool (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@expgn (FinGroup.base gT) a m) (@expgn (FinGroup.base gT) a n)) (@eq_op nat_eqType (modn m (@order gT a)) (modn n (@order gT a))) *) move/inj_eq=> eqZ; symmetry; rewrite -(Zp_cast lt1a). (* Goal: @eq bool (@eq_op nat_eqType (modn m (S (S (Zp_trunc (@order gT a))))) (modn n (S (S (Zp_trunc (@order gT a)))))) (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@expgn (FinGroup.base gT) a m) (@expgn (FinGroup.base gT) a n)) *) by rewrite -[_ == _](eqZ (inZp m) (inZp n)) /Zpm /= Zp_cast ?expg_mod_order. Qed. Lemma Zp_isom : isom (Zp #[a]) <[a]> Zpm. Proof. (* Goal: is_true (@isom (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (Zp (@order gT a)) (@cycle gT a) Zpm) *) by apply/isomP; rewrite injm_Zpm im_Zpm. Qed. Lemma Zp_isog : isog (Zp #[a]) <[a]>. Proof. (* Goal: is_true (@isog (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (Zp (@order gT a)) (@cycle gT a)) *) exact: isom_isog Zp_isom. Qed. End Zpm. Lemma cyclic_abelian A : cyclic A -> abelian A. Proof. (* Goal: forall _ : is_true (cyclic A), is_true (@abelian gT A) *) by case/cyclicP=> a ->; apply: cycle_abelian. Qed. Lemma cycleMsub a b : commute a b -> coprime #[a] #[b] -> <[a]> \subset <[a * b]>. Proof. (* Goal: forall (_ : @commute (FinGroup.base gT) a b) (_ : is_true (coprime (@order gT a) (@order 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)) (@cycle 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)) (@cycle gT (@mulg (FinGroup.base gT) a b))))) *) move=> cab co_ab; apply/subsetP=> _ /cycleP[k ->]. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@expgn (FinGroup.base gT) a 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)) (@cycle gT (@mulg (FinGroup.base gT) a b))))) *) apply/cycleP; exists (chinese #[a] #[b] k 0); symmetry. (* Goal: @eq (FinGroup.arg_sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) (@mulg (FinGroup.base gT) a b) (chinese (@order gT a) (@order gT b) k O)) (@expgn (FinGroup.base gT) a k) *) rewrite expgMn // -expg_mod_order chinese_modl // expg_mod_order. (* Goal: @eq (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@expgn (FinGroup.base gT) a k) (@expgn (FinGroup.base gT) b (chinese (@order gT a) (@order gT b) k O))) (@expgn (FinGroup.base gT) a k) *) by rewrite /chinese addn0 -mulnA mulnCA expgM expg_order expg1n mulg1. Qed. Lemma cycleM a b : commute a b -> coprime #[a] #[b] -> <[a * b]> = <[a]> * <[b]>. Proof. (* Goal: forall (_ : @commute (FinGroup.base gT) a b) (_ : is_true (coprime (@order gT a) (@order gT b))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cycle gT (@mulg (FinGroup.base gT) a b)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@cycle gT a) (@cycle gT b)) *) move=> cab co_ab; apply/eqP; rewrite eqEsubset -(cent_joinEl (cents_cycle cab)). (* 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)) (@cycle gT (@mulg (FinGroup.base gT) a b)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@joing gT (@gval gT (@cycle_group gT a)) (@gval gT (@cycle_group gT b)))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@joing gT (@gval gT (@cycle_group gT a)) (@gval gT (@cycle_group 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)) (@cycle gT (@mulg (FinGroup.base gT) a b)))))) *) rewrite join_subG {3}cab !cycleMsub // 1?coprime_sym //. (* 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)) (@cycle gT (@mulg (FinGroup.base gT) a b)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@joing gT (@gval gT (@cycle_group gT a)) (@gval gT (@cycle_group gT b)))))) (andb true true)) *) by rewrite -genM_join cycle_subG mem_gen // mem_imset2 ?cycle_id. Qed. Lemma cyclicM A B : cyclic A -> cyclic B -> B \subset 'C(A) -> coprime #|A| #|B| -> cyclic (A * B). Proof. (* Goal: forall (_ : is_true (cyclic A)) (_ : is_true (cyclic 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)) 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)) (@centraliser gT A))))) (_ : 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)) 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)) B))))), is_true (cyclic (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) A B)) *) move=> /cyclicP[a ->] /cyclicP[b ->]; rewrite cent_cycle cycle_subG => cab coab. (* Goal: is_true (cyclic (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@cycle gT a) (@cycle gT b))) *) by rewrite -cycleM ?cycle_cyclic //; apply/esym/cent1P. Qed. Lemma cyclicY K H : cyclic K -> cyclic H -> H \subset 'C(K) -> coprime #|K| #|H| -> cyclic (K <*> H). Proof. (* Goal: forall (_ : is_true (cyclic (@gval gT K))) (_ : is_true (cyclic (@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)))))) (_ : 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 (cyclic (@joing gT (@gval gT K) (@gval gT H))) *) by move=> cycK cycH cKH coKH; rewrite cent_joinEr // cyclicM. Qed. Lemma order_dvdn a n : #[a] %| n = (a ^+ n == 1). Proof. (* Goal: @eq bool (dvdn (@order gT a) n) (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@expgn (FinGroup.base gT) a n) (oneg (FinGroup.base gT))) *) by rewrite (eq_expg_mod_order a n 0) mod0n. Qed. Lemma order_inf a n : a ^+ n.+1 == 1 -> #[a] <= n.+1. Proof. (* Goal: forall _ : is_true (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@expgn (FinGroup.base gT) a (S n)) (oneg (FinGroup.base gT))), is_true (leq (@order gT a) (S n)) *) by rewrite -order_dvdn; apply: dvdn_leq. Qed. Lemma order_dvdG G a : a \in G -> #[a] %| #|G|. Proof. (* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (dvdn (@order 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 G))))) *) by move=> Ga; apply: cardSg; rewrite cycle_subG. Qed. Lemma expg_cardG G a : a \in G -> a ^+ #|G| = 1. Proof. (* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (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)))), @eq (FinGroup.sort (FinGroup.base gT)) (@expgn (FinGroup.base 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 G))))) (oneg (FinGroup.base gT)) *) by move=> Ga; apply/eqP; rewrite -order_dvdn order_dvdG. Qed. Lemma expg_znat G x k : x \in G -> x ^+ (k%:R : 'Z_(#|G|))%R = x ^+ k. Proof. (* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (FinGroup.sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) x (@nat_of_ord (S (S (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (@GRing.natmul (GRing.Ring.zmodType (Zp_ringType (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base 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 (Zp_ringType (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) k : ordinal (S (S (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))))))) (@expgn (FinGroup.base gT) x k) *) case: (eqsVneq G 1) => [-> /set1P-> | ntG Gx]; first by rewrite !expg1n. (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) x (@nat_of_ord (S (S (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (@GRing.natmul (GRing.Ring.zmodType (Zp_ringType (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base 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 (Zp_ringType (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) k))) (@expgn (FinGroup.base gT) x k) *) apply/eqP; rewrite val_Zp_nat ?cardG_gt1 // eq_expg_mod_order. (* Goal: is_true (@eq_op nat_eqType (modn (modn k (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@order gT x)) (modn k (@order gT x))) *) by rewrite modn_dvdm ?order_dvdG. Qed. Lemma expg_zneg G x (k : 'Z_(#|G|)) : x \in G -> x ^+ (- k)%R = x ^- k. Proof. (* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (FinGroup.sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) x (@nat_of_ord (S (S (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base 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 (Zp_zmodType (S (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) k))) (@invg (FinGroup.base gT) (@expgn (FinGroup.base gT) x (@nat_of_ord (S (S (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) k))) *) move=> Gx; apply/eqP; rewrite eq_sym eq_invg_mul -expgD. (* Goal: is_true (@eq_op (FinGroup.arg_eqType (FinGroup.base gT)) (@expgn (FinGroup.base gT) x (addn (@nat_of_ord (S (S (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) k) (@nat_of_ord (S (S (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base 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 (Zp_zmodType (S (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) k)))) (oneg (FinGroup.base gT))) *) by rewrite -(expg_znat _ Gx) natrD natr_Zp natr_negZp subrr. Qed. Lemma nt_gen_prime G x : prime #|G| -> x \in G^# -> G :=: <[x]>. Proof. (* Goal: forall (_ : is_true (prime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT G) (@cycle gT x) *) move=> Gpr /setD1P[]; rewrite -cycle_subG -cycle_eq1 => ntX sXG. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT G) (@cycle gT x) *) apply/eqP; rewrite eqEsubset sXG andbT. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@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)) (@cycle gT x)))) *) by apply: contraR ntX => /(prime_TIg Gpr); rewrite (setIidPr sXG) => ->. Qed. Lemma nt_prime_order p x : prime p -> x ^+ p = 1 -> x != 1 -> #[x] = p. Lemma orderXdvd a n : #[a ^+ n] %| #[a]. Proof. (* Goal: is_true (dvdn (@order gT (@expgn (FinGroup.base gT) a n)) (@order gT a)) *) by apply: order_dvdG; apply: mem_cycle. Qed. Lemma orderXgcd a n : #[a ^+ n] = #[a] %/ gcdn #[a] n. Proof. (* Goal: @eq nat (@order gT (@expgn (FinGroup.base gT) a n)) (divn (@order gT a) (gcdn (@order gT a) n)) *) apply/eqP; rewrite eqn_dvd; apply/andP; split. (* Goal: is_true (dvdn (divn (@order gT a) (gcdn (@order gT a) n)) (@order gT (@expgn (FinGroup.base gT) a n))) *) (* Goal: is_true (dvdn (@order gT (@expgn (FinGroup.base gT) a n)) (divn (@order gT a) (gcdn (@order gT a) n))) *) rewrite order_dvdn -expgM -muln_divCA_gcd //. (* Goal: is_true (dvdn (divn (@order gT a) (gcdn (@order gT a) n)) (@order gT (@expgn (FinGroup.base gT) a n))) *) (* Goal: is_true (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@expgn (FinGroup.base gT) a (muln (@order gT a) (divn n (gcdn (@order gT a) n)))) (oneg (FinGroup.base gT))) *) by rewrite expgM expg_order expg1n. (* Goal: is_true (dvdn (divn (@order gT a) (gcdn (@order gT a) n)) (@order gT (@expgn (FinGroup.base gT) a n))) *) have [-> | n_gt0] := posnP n; first by rewrite gcdn0 divnn order_gt0 dvd1n. (* Goal: is_true (dvdn (divn (@order gT a) (gcdn (@order gT a) n)) (@order gT (@expgn (FinGroup.base gT) a n))) *) rewrite -(dvdn_pmul2r n_gt0) divn_mulAC ?dvdn_gcdl // dvdn_lcm. (* Goal: is_true (andb (dvdn (@order gT a) (muln (@order gT (@expgn (FinGroup.base gT) a n)) n)) (dvdn n (muln (@order gT (@expgn (FinGroup.base gT) a n)) n))) *) by rewrite order_dvdn mulnC expgM expg_order eqxx dvdn_mulr. Qed. Lemma orderXdiv a n : n %| #[a] -> #[a ^+ n] = #[a] %/ n. Proof. (* Goal: forall _ : is_true (dvdn n (@order gT a)), @eq nat (@order gT (@expgn (FinGroup.base gT) a n)) (divn (@order gT a) n) *) by case/dvdnP=> q defq; rewrite orderXgcd {2}defq gcdnC gcdnMl. Qed. Lemma orderXexp p m n x : #[x] = (p ^ n)%N -> #[x ^+ (p ^ m)] = (p ^ (n - m))%N. Proof. (* Goal: forall _ : @eq nat (@order gT x) (expn p n), @eq nat (@order gT (@expgn (FinGroup.base gT) x (expn p m))) (expn p (subn n m)) *) move=> ox; have [n_le_m | m_lt_n] := leqP n m. (* Goal: @eq nat (@order gT (@expgn (FinGroup.base gT) x (expn p m))) (expn p (subn n m)) *) (* Goal: @eq nat (@order gT (@expgn (FinGroup.base gT) x (expn p m))) (expn p (subn n m)) *) rewrite -(subnKC n_le_m) subnDA subnn expnD expgM -ox. (* Goal: @eq nat (@order gT (@expgn (FinGroup.base gT) x (expn p m))) (expn p (subn n m)) *) (* Goal: @eq nat (@order gT (@expgn (FinGroup.base gT) (@expgn (FinGroup.base gT) x (@order gT x)) (expn p (subn m n)))) (expn p (subn O (subn m n))) *) by rewrite expg_order expg1n order1. (* Goal: @eq nat (@order gT (@expgn (FinGroup.base gT) x (expn p m))) (expn p (subn n m)) *) rewrite orderXdiv ox ?dvdn_exp2l ?expnB ?(ltnW m_lt_n) //. (* Goal: is_true (leq (S O) p) *) by have:= order_gt0 x; rewrite ox expn_gt0 orbC -(ltn_predK m_lt_n). Qed. Lemma orderXpfactor p k n x : #[x ^+ (p ^ k)] = n -> prime p -> p %| n -> #[x] = (p ^ k * n)%N. Proof. (* Goal: forall (_ : @eq nat (@order gT (@expgn (FinGroup.base gT) x (expn p k))) n) (_ : is_true (prime p)) (_ : is_true (dvdn p n)), @eq nat (@order gT x) (muln (expn p k) n) *) move=> oxp p_pr dv_p_n. (* Goal: @eq nat (@order gT x) (muln (expn p k) n) *) suffices pk_x: p ^ k %| #[x] by rewrite -oxp orderXdiv // mulnC divnK. (* Goal: is_true (dvdn (expn p k) (@order gT x)) *) rewrite pfactor_dvdn // leqNgt; apply: contraL dv_p_n => lt_x_k. (* Goal: is_true (negb (dvdn p n)) *) rewrite -oxp -p'natE // -(subnKC (ltnW lt_x_k)) expnD expgM. (* Goal: is_true (pnat (negn (nat_pred_of_nat p)) (@order gT (@expgn (FinGroup.base gT) (@expgn (FinGroup.base gT) x (expn p (logn p (@order gT x)))) (expn p (subn k (logn p (@order gT x))))))) *) rewrite (pnat_dvd (orderXdvd _ _)) // -p_part // orderXdiv ?dvdn_part //. (* Goal: is_true (pnat (negn (nat_pred_of_nat p)) (divn (@order gT x) (partn (@order gT x) (nat_pred_of_nat p)))) *) by rewrite -{1}[#[x]](partnC p) // mulKn // part_pnat. Qed. Lemma orderXprime p n x : #[x ^+ p] = n -> prime p -> p %| n -> #[x] = (p * n)%N. Proof. (* Goal: forall (_ : @eq nat (@order gT (@expgn (FinGroup.base gT) x p)) n) (_ : is_true (prime p)) (_ : is_true (dvdn p n)), @eq nat (@order gT x) (muln p n) *) exact: (@orderXpfactor p 1). Qed. Lemma orderXpnat m n x : #[x ^+ m] = n -> \pi(n).-nat m -> #[x] = (m * n)%N. Proof. (* Goal: forall (_ : @eq nat (@order gT (@expgn (FinGroup.base gT) x m)) n) (_ : is_true (pnat (pi_of n) m)), @eq nat (@order gT x) (muln m n) *) move=> oxm n_m; have [m_gt0 _] := andP n_m. (* Goal: @eq nat (@order gT x) (muln m n) *) suffices m_x: m %| #[x] by rewrite -oxm orderXdiv // mulnC divnK. (* Goal: is_true (dvdn m (@order gT x)) *) apply/dvdn_partP=> // p; rewrite mem_primes => /and3P[p_pr _ p_m]. (* Goal: is_true (dvdn (partn m (nat_pred_of_nat p)) (@order gT x)) *) have n_p: p \in \pi(n) by apply: (pnatP _ _ n_m). (* Goal: is_true (dvdn (partn m (nat_pred_of_nat p)) (@order gT x)) *) have p_oxm: p %| #[x ^+ (p ^ logn p m)]. (* Goal: is_true (dvdn (partn m (nat_pred_of_nat p)) (@order gT x)) *) (* Goal: is_true (dvdn p (@order gT (@expgn (FinGroup.base gT) x (expn p (logn p m))))) *) apply: dvdn_trans (orderXdvd _ m`_p^'); rewrite -expgM -p_part ?partnC //. (* Goal: is_true (dvdn (partn m (nat_pred_of_nat p)) (@order gT x)) *) (* Goal: is_true (dvdn p (@order gT (@expgn (FinGroup.base gT) x m))) *) by rewrite oxm; rewrite mem_primes in n_p; case/and3P: n_p. (* Goal: is_true (dvdn (partn m (nat_pred_of_nat p)) (@order gT x)) *) by rewrite (orderXpfactor (erefl _) p_pr p_oxm) p_part // dvdn_mulr. Qed. Lemma orderM a b : commute a b -> coprime #[a] #[b] -> #[a * b] = (#[a] * #[b])%N. Proof. (* Goal: forall (_ : @commute (FinGroup.base gT) a b) (_ : is_true (coprime (@order gT a) (@order gT b))), @eq nat (@order gT (@mulg (FinGroup.base gT) a b)) (muln (@order gT a) (@order gT b)) *) by move=> cab co_ab; rewrite -coprime_cardMg -?cycleM. Qed. Definition expg_invn A k := (egcdn k #|A|).1. Lemma expgK G k : coprime #|G| k -> {in G, cancel (expgn^~ k) (expgn^~ (expg_invn G k))}. Lemma cyclic_dprod K H G : K \x H = G -> cyclic K -> cyclic H -> cyclic G = coprime #|K| #|H| . Proof. (* Goal: forall (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (direct_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (_ : is_true (cyclic (@gval gT K))) (_ : is_true (cyclic (@gval gT H))), @eq bool (cyclic (@gval gT G)) (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))))) *) case/dprodP=> _ defKH cKH tiKH cycK cycH; pose m := lcmn #|K| #|H|. (* Goal: @eq bool (cyclic (@gval gT G)) (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))))) *) apply/idP/idP=> [/cyclicP[x defG] | coKH]; last by rewrite -defKH cyclicM. (* Goal: is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) *) rewrite /coprime -dvdn1 -(@dvdn_pmul2l m) ?lcmn_gt0 ?cardG_gt0 //. (* Goal: is_true (dvdn (muln m (gcdn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (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)))))) (muln m (S O))) *) rewrite muln_lcm_gcd muln1 -TI_cardMg // defKH defG order_dvdn. (* Goal: is_true (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@expgn (FinGroup.base gT) x m) (oneg (FinGroup.base gT))) *) have /mulsgP[y z Ky Hz ->]: x \in K * H by rewrite defKH defG cycle_id. (* Goal: is_true (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@expgn (FinGroup.base gT) (@mulg (FinGroup.base gT) y z) m) (oneg (FinGroup.base gT))) *) rewrite -[1]mulg1 expgMn; last exact/commute_sym/(centsP cKH). (* Goal: is_true (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@expgn (FinGroup.base gT) y m) (@expgn (FinGroup.base gT) z m)) (@mulg (FinGroup.base gT) (oneg (FinGroup.base gT)) (oneg (FinGroup.base gT)))) *) apply/eqP; congr (_ * _); apply/eqP; rewrite -order_dvdn. (* Goal: is_true (dvdn (@order gT z) m) *) (* Goal: is_true (dvdn (@order gT y) m) *) exact: dvdn_trans (order_dvdG Ky) (dvdn_lcml _ _). (* Goal: is_true (dvdn (@order gT z) m) *) exact: dvdn_trans (order_dvdG Hz) (dvdn_lcmr _ _). Qed. Definition generator (A : {set gT}) a := A == <[a]>. Lemma generator_cycle a : generator <[a]> a. Proof. (* Goal: is_true (generator (@cycle gT a) a) *) exact: eqxx. Qed. Lemma cycle_generator a x : generator <[a]> x -> x \in <[a]>. Proof. (* Goal: forall _ : is_true (generator (@cycle gT a) x), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cycle gT a)))) *) by move/(<[a]> =P _)->; apply: cycle_id. Qed. Lemma generator_order a b : generator <[a]> b -> #[a] = #[b]. Proof. (* Goal: forall _ : is_true (generator (@cycle gT a) b), @eq nat (@order gT a) (@order gT b) *) by rewrite /order => /(<[a]> =P _)->. Qed. End Cyclic. Arguments cyclic {gT} A%g. Arguments generator {gT} A%g a%g. Arguments expg_invn {gT} A%g k%N. Arguments cyclicP {gT A}. Prenex Implicits cyclic Zpm. Theorem Euler_exp_totient a n : coprime a n -> a ^ totient n = 1 %[mod n]. Proof. (* Goal: forall _ : is_true (coprime a n), @eq nat (modn (expn a (totient n)) n) (modn (S O) n) *) case: n => [|[|n']] //; [by rewrite !modn1 | set n := n'.+2] => co_a_n. (* Goal: @eq nat (modn (expn a (totient n)) n) (modn (S O) n) *) have{co_a_n} Ua: coprime n (inZp a : 'I_n) by rewrite coprime_sym coprime_modl. (* Goal: @eq nat (modn (expn a (totient n)) n) (modn (S O) n) *) have: FinRing.unit 'Z_n Ua ^+ totient n == 1. (* Goal: forall _ : is_true (@eq_op (FinGroup.eqType (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc n)))) (@expgn (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc n))) (@FinRing.Unit (Zp_finUnitRingType (Zp_trunc n)) (Phant (ordinal (S (S (Zp_trunc n))))) (@inZp (S n') a) Ua) (totient n)) (oneg (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc n))))), @eq nat (modn (expn a (totient n)) n) (modn (S O) n) *) (* Goal: is_true (@eq_op (FinGroup.eqType (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc n)))) (@expgn (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc n))) (@FinRing.Unit (Zp_finUnitRingType (Zp_trunc n)) (Phant (ordinal (S (S (Zp_trunc n))))) (@inZp (S n') a) Ua) (totient n)) (oneg (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc n))))) *) by rewrite -card_units_Zp // -order_dvdn order_dvdG ?inE. (* Goal: forall _ : is_true (@eq_op (FinGroup.eqType (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc n)))) (@expgn (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc n))) (@FinRing.Unit (Zp_finUnitRingType (Zp_trunc n)) (Phant (ordinal (S (S (Zp_trunc n))))) (@inZp (S n') a) Ua) (totient n)) (oneg (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc n))))), @eq nat (modn (expn a (totient n)) n) (modn (S O) n) *) by rewrite -2!val_eqE unit_Zp_expg /= -/n modnXm => /eqP. Qed. Section Eltm. Variables (aT rT : finGroupType) (x : aT) (y : rT). Definition eltm of #[y] %| #[x] := fun x_i => y ^+ invm (injm_Zpm x) x_i. Hypothesis dvd_y_x : #[y] %| #[x]. Lemma eltmE i : eltm dvd_y_x (x ^+ i) = y ^+ i. Proof. (* Goal: @eq (FinGroup.sort (FinGroup.base rT)) (eltm dvd_y_x (@expgn (FinGroup.base aT) x i)) (@expgn (FinGroup.base rT) y i) *) apply/eqP; rewrite eq_expg_mod_order. (* Goal: is_true (@eq_op nat_eqType (modn (@nat_of_ord (S (S (Zp_trunc (@order aT x)))) (@invm (Zp_finGroupType (S (Zp_trunc (@order aT x)))) aT (Zp_group (@order aT x)) (@Zpm_morphism aT x) (@injm_Zpm aT x) (@expgn (FinGroup.base aT) x i))) (@order rT y)) (modn i (@order rT y))) *) have [x_le1 | x_gt1] := leqP #[x] 1. (* Goal: is_true (@eq_op nat_eqType (modn (@nat_of_ord (S (S (Zp_trunc (@order aT x)))) (@invm (Zp_finGroupType (S (Zp_trunc (@order aT x)))) aT (Zp_group (@order aT x)) (@Zpm_morphism aT x) (@injm_Zpm aT x) (@expgn (FinGroup.base aT) x i))) (@order rT y)) (modn i (@order rT y))) *) (* Goal: is_true (@eq_op nat_eqType (modn (@nat_of_ord (S (S (Zp_trunc (@order aT x)))) (@invm (Zp_finGroupType (S (Zp_trunc (@order aT x)))) aT (Zp_group (@order aT x)) (@Zpm_morphism aT x) (@injm_Zpm aT x) (@expgn (FinGroup.base aT) x i))) (@order rT y)) (modn i (@order rT y))) *) suffices: #[y] %| 1 by rewrite dvdn1 => /eqP->; rewrite !modn1. (* Goal: is_true (@eq_op nat_eqType (modn (@nat_of_ord (S (S (Zp_trunc (@order aT x)))) (@invm (Zp_finGroupType (S (Zp_trunc (@order aT x)))) aT (Zp_group (@order aT x)) (@Zpm_morphism aT x) (@injm_Zpm aT x) (@expgn (FinGroup.base aT) x i))) (@order rT y)) (modn i (@order rT y))) *) (* Goal: is_true (dvdn (@order rT y) (S O)) *) by rewrite (dvdn_trans dvd_y_x) // dvdn1 order_eq1 -cycle_eq1 trivg_card_le1. (* Goal: is_true (@eq_op nat_eqType (modn (@nat_of_ord (S (S (Zp_trunc (@order aT x)))) (@invm (Zp_finGroupType (S (Zp_trunc (@order aT x)))) aT (Zp_group (@order aT x)) (@Zpm_morphism aT x) (@injm_Zpm aT x) (@expgn (FinGroup.base aT) x i))) (@order rT y)) (modn i (@order rT y))) *) rewrite -(expg_znat i (cycle_id x)) invmE /=; last by rewrite /Zp x_gt1 inE. (* Goal: is_true (@eq_op nat_eqType (modn (@nat_of_ord (S (S (Zp_trunc (@order aT x)))) (@GRing.natmul (GRing.Ring.zmodType (Zp_ringType (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@cycle aT x))))))) (GRing.one (Zp_ringType (Zp_trunc (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@cycle aT x))))))) i)) (@order rT y)) (modn i (@order rT y))) *) by rewrite val_Zp_nat // modn_dvdm. Qed. Lemma eltmM : {in <[x]> &, {morph eltm dvd_y_x : x_i x_j / x_i * x_j}}. Proof. (* Goal: @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@cycle aT x))) (fun x y : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (FinGroup.sort (FinGroup.base rT)) (eltm dvd_y_x ((fun x_i x_j : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @mulg (FinGroup.base aT) x_i x_j) x y)) ((fun x_i x_j : FinGroup.sort (FinGroup.base rT) => @mulg (FinGroup.base rT) x_i x_j) (eltm dvd_y_x x) (eltm dvd_y_x y))) (inPhantom (@morphism_2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (FinGroup.sort (FinGroup.base rT)) (eltm dvd_y_x) (fun x_i x_j : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @mulg (FinGroup.base aT) x_i x_j) (fun x_i x_j : FinGroup.sort (FinGroup.base rT) => @mulg (FinGroup.base rT) x_i x_j))) *) move=> _ _ /cycleP[i ->] /cycleP[j ->]. (* Goal: @eq (FinGroup.sort (FinGroup.base rT)) (eltm dvd_y_x (@mulg (FinGroup.base aT) (@expgn (FinGroup.base aT) x i) (@expgn (FinGroup.base aT) x j))) (@mulg (FinGroup.base rT) (eltm dvd_y_x (@expgn (FinGroup.base aT) x i)) (eltm dvd_y_x (@expgn (FinGroup.base aT) x j))) *) by apply/eqP; rewrite -expgD !eltmE expgD. Qed. Canonical eltm_morphism := Morphism eltmM. Lemma im_eltm : eltm dvd_y_x @* <[x]> = <[y]>. Proof. (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim aT rT (@cycle aT x) eltm_morphism (@MorPhantom aT rT (eltm dvd_y_x)) (@cycle aT x)) (@cycle rT y) *) by rewrite morphim_cycle ?cycle_id //= eltm_id. Qed. Lemma ker_eltm : 'ker (eltm dvd_y_x) = <[x ^+ #[y]]>. Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@ker aT rT (@cycle aT x) eltm_morphism (@MorPhantom aT rT (eltm dvd_y_x))) (@cycle aT (@expgn (FinGroup.base aT) x (@order rT y))) *) apply/eqP; rewrite eq_sym eqEcard cycle_subG 3!inE mem_cycle /= eltmE. (* Goal: is_true (andb (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base rT))) (@expgn (FinGroup.base rT) y (@order rT y)) (oneg (FinGroup.base rT))) (leq (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@ker aT rT (@cycle aT x) eltm_morphism (@MorPhantom aT rT (eltm dvd_y_x)))))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@cycle aT (@expgn (FinGroup.base aT) x (@order rT y)))))))) *) rewrite expg_order eqxx (orderE y) -im_eltm card_morphim setIid -orderE. (* Goal: is_true (andb true (leq (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@ker aT rT (@cycle aT x) eltm_morphism (@MorPhantom aT rT (eltm dvd_y_x)))))) (@order aT (@expgn (FinGroup.base aT) x (@indexg aT (@gval aT (@cycle_group aT x)) (@ker aT rT (@gval aT (@cycle_group aT x)) eltm_morphism (@MorPhantom aT rT (@mfun aT rT (@gval aT (@cycle_group aT x)) eltm_morphism)))))))) *) by rewrite orderXdiv ?dvdn_indexg //= leq_divRL ?indexg_gt0 ?Lagrange ?subsetIl. Qed. Lemma injm_eltm : 'injm (eltm dvd_y_x) = (#[x] %| #[y]). Proof. (* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@ker aT rT (@cycle aT x) eltm_morphism (@MorPhantom aT rT (eltm dvd_y_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)) (oneg (group_set_baseGroupType (FinGroup.base aT)))))) (dvdn (@order aT x) (@order rT y)) *) by rewrite ker_eltm subG1 cycle_eq1 -order_dvdn. Qed. End Eltm. Section CycleSubGroup. Variable gT : finGroupType. Lemma cycle_sub_group (a : gT) m : m %| #[a] -> [set H : {group gT} | H \subset <[a]> & #|H| == m] = [set <[a ^+ (#[a] %/ m)]>%G]. Proof. (* Goal: forall _ : is_true (dvdn m (@order gT a)), @eq (@set_of (group_of_finType gT) (Phant (Finite.sort (group_of_finType gT)))) (@SetDef.finset (group_of_finType gT) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => 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 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)) (@cycle gT a)))) (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (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)))) m))) (@set1 (group_of_finType gT) (@cycle_group gT (@expgn (FinGroup.base gT) a (divn (@order gT a) m)))) *) move=> m_dv_a; have m_gt0: 0 < m by apply: dvdn_gt0 m_dv_a. (* Goal: @eq (@set_of (group_of_finType gT) (Phant (Finite.sort (group_of_finType gT)))) (@SetDef.finset (group_of_finType gT) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => 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 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)) (@cycle gT a)))) (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (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)))) m))) (@set1 (group_of_finType gT) (@cycle_group gT (@expgn (FinGroup.base gT) a (divn (@order gT a) m)))) *) have oam: #|<[a ^+ (#[a] %/ m)]>| = m. (* Goal: @eq (@set_of (group_of_finType gT) (Phant (Finite.sort (group_of_finType gT)))) (@SetDef.finset (group_of_finType gT) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => 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 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)) (@cycle gT a)))) (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (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)))) m))) (@set1 (group_of_finType gT) (@cycle_group gT (@expgn (FinGroup.base gT) a (divn (@order gT a) m)))) *) (* 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)) (@cycle gT (@expgn (FinGroup.base gT) a (divn (@order gT a) m)))))) m *) apply/eqP; rewrite [#|_|]orderXgcd -(divnMr m_gt0) muln_gcdl divnK //. (* Goal: @eq (@set_of (group_of_finType gT) (Phant (Finite.sort (group_of_finType gT)))) (@SetDef.finset (group_of_finType gT) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => 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 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)) (@cycle gT a)))) (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (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)))) m))) (@set1 (group_of_finType gT) (@cycle_group gT (@expgn (FinGroup.base gT) a (divn (@order gT a) m)))) *) (* Goal: is_true (@eq_op nat_eqType (divn (muln (@order gT a) m) (gcdn (muln (@order gT a) m) (@order gT a))) m) *) by rewrite gcdnC gcdnMr mulKn. (* Goal: @eq (@set_of (group_of_finType gT) (Phant (Finite.sort (group_of_finType gT)))) (@SetDef.finset (group_of_finType gT) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => 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 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)) (@cycle gT a)))) (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (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)))) m))) (@set1 (group_of_finType gT) (@cycle_group gT (@expgn (FinGroup.base gT) a (divn (@order gT a) m)))) *) apply/eqP; rewrite eqEsubset sub1set inE /= cycleX oam eqxx !andbT. (* 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) (@SetDef.finset (group_of_finType gT) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT 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)) (@cycle gT a)))) (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.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)))) m))))) (@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) (@set1 (group_of_finType gT) (@cycle_group gT (@expgn (FinGroup.base gT) a (divn (@order gT a) m))))))) *) apply/subsetP=> X; rewrite in_set1 inE -val_eqE /= eqEcard oam. (* Goal: forall _ : is_true (andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT 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)) (@cycle gT a)))) (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.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)))) m)), 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 X))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cycle gT (@expgn (FinGroup.base gT) a (divn (@order gT a) m)))))) (leq 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 X)))))) *) case/andP=> sXa /eqP oX; rewrite oX leqnn andbT. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@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)) (@cycle gT (@expgn (FinGroup.base gT) a (divn (@order gT a) m)))))) *) apply/subsetP=> x Xx; case/cycleP: (subsetP sXa _ Xx) => k def_x. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cycle gT (@expgn (FinGroup.base gT) a (divn (@order gT a) m)))))) *) have: (x ^+ m == 1)%g by rewrite -oX -order_dvdn cardSg // gen_subG sub1set. (* Goal: forall _ : is_true (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@expgn (FinGroup.base gT) x m) (oneg (FinGroup.base gT))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cycle gT (@expgn (FinGroup.base gT) a (divn (@order gT a) m)))))) *) rewrite {x Xx}def_x -expgM -order_dvdn -[#[a]](Lagrange sXa) -oX mulnC. (* Goal: forall _ : is_true (dvdn (muln (@indexg gT (@gval gT (@cycle_group gT a)) (@gval gT X)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT X))))) (muln 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)) (@gval gT X)))))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@expgn (FinGroup.base gT) a 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)) (@cycle gT (@expgn (FinGroup.base gT) a (divn (muln (@indexg gT (@gval gT (@cycle_group gT a)) (@gval gT X)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT 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 X)))))))))) *) rewrite dvdn_pmul2r // mulnK // => /dvdnP[i ->]. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@expgn (FinGroup.base gT) a (muln i (@indexg gT (@gval gT (@cycle_group gT a)) (@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)) (@cycle gT (@expgn (FinGroup.base gT) a (@indexg gT (@gval gT (@cycle_group gT a)) (@gval gT X))))))) *) by rewrite mulnC expgM groupX // cycle_id. Qed. Lemma cycle_subgroup_char a (H : {group gT}) : H \subset <[a]> -> H \char <[a]>. Proof. (* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@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)) (@cycle gT a)))), is_true (@characteristic gT (@gval gT H) (@cycle gT a)) *) move=> sHa; apply: lone_subgroup_char => // J sJa isoJH. (* 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 J))) (@mem (Finite.sort (FinGroup.arg_finType (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 dvHa: #|H| %| #[a] by apply: cardSg. (* 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 J))) (@mem (Finite.sort (FinGroup.arg_finType (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{dvHa} /setP Huniq := esym (cycle_sub_group dvHa). (* 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 J))) (@mem (Finite.sort (FinGroup.arg_finType (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: (Huniq H) (Huniq J); rewrite !inE /=. (* Goal: forall (_ : @eq bool (@eq_op (Finite.eqType (group_of_finType gT)) H (@cycle_group gT (@expgn (FinGroup.base gT) a (divn (@order gT a) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.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)))))))) (andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT 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)) (@cycle gT a)))) (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.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)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))))) (_ : @eq bool (@eq_op (Finite.eqType (group_of_finType gT)) J (@cycle_group gT (@expgn (FinGroup.base gT) a (divn (@order gT a) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.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)))))))) (andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT J))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cycle gT a)))) (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT J)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.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))))))), 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 J))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *) by rewrite sHa sJa (card_isog isoJH) eqxx => /eqP<- /eqP<-. Qed. End CycleSubGroup. Section MorphicImage. Variables aT rT : finGroupType. Variables (D : {group aT}) (f : {morphism D >-> rT}) (x : aT). Hypothesis Dx : x \in D. Lemma morph_order : #[f x] %| #[x]. Proof. (* Goal: is_true (dvdn (@order rT (@mfun aT rT (@gval aT D) f x)) (@order aT x)) *) by rewrite order_dvdn -morphX // expg_order morph1. Qed. Lemma morph_generator A : generator A x -> generator (f @* A) (f x). Proof. (* Goal: forall _ : is_true (@generator aT A x), is_true (@generator rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) A) (@mfun aT rT (@gval aT D) f x)) *) by move/(A =P _)->; rewrite /generator morphim_cycle. Qed. End MorphicImage. Section CyclicProps. Variables gT : finGroupType. Implicit Types (aT rT : finGroupType) (G H K : {group gT}). Lemma cyclicS G H : H \subset G -> cyclic G -> cyclic H. Lemma cyclicJ G x : cyclic (G :^ x) = cyclic G. Proof. (* Goal: @eq bool (@cyclic gT (@conjugate gT (@gval gT G) x)) (@cyclic gT (@gval gT G)) *) apply/cyclicP/cyclicP=> [[y /(canRL (conjsgK x))] | [y ->]]. (* Goal: @ex (FinGroup.arg_sort (FinGroup.base gT)) (fun x0 : FinGroup.arg_sort (FinGroup.base gT) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@conjugate gT (@cycle gT y) x) (@cycle gT x0)) *) (* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT G) (@conjugate gT (@cycle gT y) (@invg (FinGroup.base gT) x)), @ex (FinGroup.arg_sort (FinGroup.base gT)) (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 G) (@cycle gT x)) *) by rewrite -cycleJ; exists (y ^ x^-1). (* Goal: @ex (FinGroup.arg_sort (FinGroup.base gT)) (fun x0 : FinGroup.arg_sort (FinGroup.base gT) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@conjugate gT (@cycle gT y) x) (@cycle gT x0)) *) by exists (y ^ x); rewrite cycleJ. Qed. Lemma eq_subG_cyclic G H K : cyclic G -> H \subset G -> K \subset G -> (H :==: K) = (#|H| == #|K|). Proof. (* Goal: forall (_ : is_true (@cyclic 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 (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (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))))), @eq bool (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (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))))) *) case/cyclicP=> x -> sHx sKx; apply/eqP/eqP=> [-> //| eqHK]. (* Goal: @eq (Equality.sort (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT)))) (@gval gT H) (@gval gT K) *) have def_GHx := cycle_sub_group (cardSg sHx); set GHx := [set _] in def_GHx. (* Goal: @eq (Equality.sort (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT)))) (@gval gT H) (@gval gT K) *) have []: H \in GHx /\ K \in GHx by rewrite -def_GHx !inE sHx sKx eqHK /=. (* Goal: forall (_ : is_true (@in_mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) GHx)))) (_ : is_true (@in_mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) K (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) GHx)))), @eq (Equality.sort (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT)))) (@gval gT H) (@gval gT K) *) by do 2!move/set1P->. Qed. Lemma cardSg_cyclic G H K : cyclic G -> H \subset G -> K \subset G -> (#|H| %| #|K|) = (H \subset K). Lemma sub_cyclic_char G H : cyclic G -> (H \char G) = (H \subset G). Lemma morphim_cyclic rT G H (f : {morphism G >-> rT}) : cyclic H -> cyclic (f @* H). Proof. (* Goal: forall _ : is_true (@cyclic gT (@gval gT H)), is_true (@cyclic rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT H))) *) move=> cycH; wlog sHG: H cycH / H \subset G. (* Goal: is_true (@cyclic rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT H))) *) (* Goal: forall _ : forall (H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (@cyclic gT (@gval gT H))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), is_true (@cyclic rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT H))), is_true (@cyclic rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT H))) *) by rewrite -morphimIdom; apply; rewrite (cyclicS _ cycH, subsetIl) ?subsetIr. (* Goal: is_true (@cyclic rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT H))) *) case/cyclicP: cycH sHG => x ->; rewrite gen_subG sub1set => Gx. (* Goal: is_true (@cyclic rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@cycle gT x))) *) by apply/cyclicP; exists (f x); rewrite morphim_cycle. Qed. Lemma quotient_cycle x H : x \in 'N(H) -> <[x]> / H = <[coset H 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)) (@normaliser gT (@gval gT H))))), @eq (@set_of (@coset_finType gT (@gval gT H)) (Phant (@coset_of gT (@gval gT H)))) (@quotient gT (@cycle gT x) (@gval gT H)) (@cycle (@coset_groupType gT (@gval gT H)) (@coset gT (@gval gT H) x)) *) exact: morphim_cycle. Qed. Lemma quotient_cyclic G H : cyclic G -> cyclic (G / H). Proof. (* Goal: forall _ : is_true (@cyclic gT (@gval gT G)), is_true (@cyclic (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) *) exact: morphim_cyclic. Qed. Lemma quotient_generator x G H : x \in 'N(H) -> generator G x -> generator (G / H) (coset H 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)) (@normaliser gT (@gval gT H)))))) (_ : is_true (@generator gT (@gval gT G) x)), is_true (@generator (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@coset gT (@gval gT H) x)) *) by move=> Nx; apply: morph_generator. Qed. Lemma prime_cyclic G : prime #|G| -> cyclic G. Lemma dvdn_prime_cyclic G p : prime p -> #|G| %| p -> cyclic G. Proof. (* Goal: forall (_ : is_true (prime p)) (_ : is_true (dvdn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) p)), is_true (@cyclic gT (@gval gT G)) *) move=> p_pr pG; case: (eqsVneq G 1) => [-> | ntG]; first exact: cyclic1. (* Goal: is_true (@cyclic gT (@gval gT G)) *) by rewrite prime_cyclic // (prime_nt_dvdP p_pr _ pG) -?trivg_card1. Qed. Lemma cyclic_small G : #|G| <= 3 -> cyclic G. Proof. (* Goal: forall _ : 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)))) (S (S (S O)))), is_true (@cyclic gT (@gval gT G)) *) rewrite 4!(ltnS, leq_eqVlt) -trivg_card_le1 orbA orbC. (* Goal: forall _ : is_true (orb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (orb (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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 (S O)))) (@eq_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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 (@cyclic gT (@gval gT G)) *) case/predU1P=> [-> | oG]; first exact: cyclic1. (* Goal: is_true (@cyclic gT (@gval gT G)) *) by apply: prime_cyclic; case/pred2P: oG => ->. Qed. End CyclicProps. Section IsoCyclic. Variables gT rT : finGroupType. Implicit Types (G H : {group gT}) (M : {group rT}). Lemma injm_cyclic G H (f : {morphism G >-> rT}) : 'injm f -> H \subset G -> cyclic (f @* H) = cyclic H. Lemma isog_cyclic G M : G \isog M -> cyclic G = cyclic M. Proof. (* Goal: forall _ : is_true (@isog gT rT (@gval gT G) (@gval rT M)), @eq bool (@cyclic gT (@gval gT G)) (@cyclic rT (@gval rT M)) *) by case/isogP=> f injf <-; rewrite injm_cyclic. Qed. Lemma isog_cyclic_card G M : cyclic G -> isog G M = cyclic M && (#|M| == #|G|). Lemma injm_generator G H (f : {morphism G >-> rT}) x : 'injm f -> x \in G -> H \subset G -> generator (f @* H) (f x) = generator H x. End IsoCyclic. Section Metacyclic. Variable gT : finGroupType. Implicit Types (A : {set gT}) (G H : {group gT}). Definition metacyclic A := [exists H : {group gT}, [&& cyclic H, H <| A & cyclic (A / H)]]. Lemma metacyclicP A : reflect (exists H : {group gT}, [/\ cyclic H, H <| A & cyclic (A / H)]) (metacyclic A). Proof. (* Goal: Bool.reflect (@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 (@cyclic gT (@gval gT H))) (is_true (@normal gT (@gval gT H) A)) (is_true (@cyclic (@coset_groupType gT (@gval gT H)) (@quotient gT A (@gval gT H)))))) (metacyclic A) *) exact: 'exists_and3P. Qed. Lemma metacyclic1 : metacyclic 1. Proof. (* Goal: is_true (metacyclic (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) *) by apply/existsP; exists 1%G; rewrite normal1 trivg_quotient !cyclic1. Qed. Lemma cyclic_metacyclic A : cyclic A -> metacyclic A. Proof. (* Goal: forall _ : is_true (@cyclic gT A), is_true (metacyclic A) *) case/cyclicP=> x ->; apply/existsP; exists (<[x]>)%G. (* Goal: is_true (andb (@cyclic gT (@gval gT (@cycle_group gT x))) (andb (@normal gT (@gval gT (@cycle_group gT x)) (@cycle gT x)) (@cyclic (@coset_groupType gT (@gval gT (@cycle_group gT x))) (@quotient gT (@cycle gT x) (@gval gT (@cycle_group gT x)))))) *) by rewrite normal_refl cycle_cyclic trivg_quotient cyclic1. Qed. Lemma metacyclicS G H : H \subset G -> metacyclic G -> metacyclic H. End Metacyclic. Arguments metacyclic {gT} A%g. Arguments metacyclicP {gT A}. Section CyclicAutomorphism. Variable gT : finGroupType. Section CycleAutomorphism. Variable a : gT. Section CycleMorphism. Variable n : nat. Definition cyclem of gT := fun x : gT => x ^+ n. Lemma cyclemM : {in <[a]> & , {morph cyclem a : x y / 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)) (@cycle gT a))) (fun x y : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (cyclem a ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x0 y0) x y)) ((fun x0 y0 : FinGroup.sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x0 y0) (cyclem a x) (cyclem a y))) (inPhantom (@morphism_2 (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base gT)) (cyclem a) (fun x y : FinGroup.arg_sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x y) (fun x y : FinGroup.sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x y))) *) by move=> x y ax ay; apply: expgMn; apply: (centsP (cycle_abelian a)). Qed. Canonical cyclem_morphism := Morphism cyclemM. End CycleMorphism. Section ZpUnitMorphism. Variable u : {unit 'Z_#[a]}. Lemma injm_cyclem : 'injm (cyclem (val u) a). Proof. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@cycle gT a) (cyclem_morphism (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) (@val (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (fun x : FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a))) => @in_mem (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) x (@mem (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (predPredType (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@has_quality (S O) (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (@GRing.unit (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (FinRing.unit_subType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) u))) (@MorPhantom gT gT (cyclem (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) (@val (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (fun x : FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a))) => @in_mem (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) x (@mem (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (predPredType (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@has_quality (S O) (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (@GRing.unit (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (FinRing.unit_subType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) u)) 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)) (oneg (group_set_baseGroupType (FinGroup.base gT)))))) *) apply/subsetP=> x /setIdP[ax]; rewrite !inE -order_dvdn. (* Goal: forall _ : is_true (dvdn (@order gT x) (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) (@val (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (fun x : FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a))) => @in_mem (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) x (@mem (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (predPredType (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@has_quality (S O) (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (@GRing.unit (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (FinRing.unit_subType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) u))), is_true (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base gT))) x (oneg (FinGroup.base gT))) *) case: (eqVneq a 1) => [a1 | nta]; first by rewrite a1 cycle1 inE in ax. (* Goal: forall _ : is_true (dvdn (@order gT x) (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) (@val (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (fun x : FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a))) => @in_mem (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) x (@mem (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (predPredType (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@has_quality (S O) (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (@GRing.unit (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (FinRing.unit_subType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) u))), is_true (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base gT))) x (oneg (FinGroup.base gT))) *) rewrite -order_eq1 -dvdn1; move/eqnP: (valP u) => /= <-. (* Goal: forall _ : is_true (dvdn (@order gT x) (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) (@FinRing.uval (Zp_finUnitRingType (Zp_trunc (@order gT a))) u))), is_true (dvdn (@order gT x) (gcdn (S (S (Zp_trunc (@order gT a)))) (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) (@FinRing.uval (Zp_finUnitRingType (Zp_trunc (@order gT a))) u)))) *) by rewrite dvdn_gcd {2}Zp_cast ?order_gt1 // order_dvdG. Qed. Lemma im_cyclem : cyclem (val u) a @* <[a]> = <[a]>. Definition Zp_unitm := aut injm_cyclem im_cyclem. End ZpUnitMorphism. Lemma Zp_unitmM : {in units_Zp #[a] &, {morph Zp_unitm : u v / u * v}}. Canonical Zp_unit_morphism := Morphism Zp_unitmM. Lemma injm_Zp_unitm : 'injm Zp_unitm. Proof. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@ker (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (units_Zp (@order gT a)) Zp_unit_morphism (@MorPhantom (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) Zp_unitm)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (oneg (group_set_baseGroupType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))))) *) case: (eqVneq a 1) => [a1 | nta]. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@ker (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (units_Zp (@order gT a)) Zp_unit_morphism (@MorPhantom (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) Zp_unitm)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (oneg (group_set_baseGroupType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@ker (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (units_Zp (@order gT a)) Zp_unit_morphism (@MorPhantom (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) Zp_unitm)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (oneg (group_set_baseGroupType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))))) *) by rewrite subIset //= card_le1_trivg ?subxx // card_units_Zp a1 order1. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@ker (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (units_Zp (@order gT a)) Zp_unit_morphism (@MorPhantom (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) Zp_unitm)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (oneg (group_set_baseGroupType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))))) *) apply/subsetP=> /= u /morphpreP[_ /set1P/= um1]. (* Goal: is_true (@in_mem (@FinRing.unit_of (Zp_finUnitRingType (Zp_trunc (@order gT a))) (Phant (ordinal (S (S (Zp_trunc (@order gT a))))))) u (@mem (@FinRing.unit_of (Zp_finUnitRingType (Zp_trunc (@order gT a))) (Phant (ordinal (S (S (Zp_trunc (@order gT a))))))) (predPredType (@FinRing.unit_of (Zp_finUnitRingType (Zp_trunc (@order gT a))) (Phant (ordinal (S (S (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (oneg (group_set_baseGroupType (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))))) *) have{um1}: Zp_unitm u a == Zp_unitm 1 a by rewrite um1 morph1. (* Goal: forall _ : is_true (@eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT))) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) (Zp_unitm u) a) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) (Zp_unitm (oneg (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) a)), is_true (@in_mem (@FinRing.unit_of (Zp_finUnitRingType (Zp_trunc (@order gT a))) (Phant (ordinal (S (S (Zp_trunc (@order gT a))))))) u (@mem (@FinRing.unit_of (Zp_finUnitRingType (Zp_trunc (@order gT a))) (Phant (ordinal (S (S (Zp_trunc (@order gT a))))))) (predPredType (@FinRing.unit_of (Zp_finUnitRingType (Zp_trunc (@order gT a))) (Phant (ordinal (S (S (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (oneg (group_set_baseGroupType (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))))) *) rewrite !autE ?cycle_id // eq_expg_mod_order. (* Goal: forall _ : is_true (@eq_op nat_eqType (modn (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) (@val (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (fun x : FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a))) => @in_mem (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) x (@mem (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (predPredType (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@has_quality (S O) (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (@GRing.unit (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (FinRing.unit_subType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) u)) (@order gT a)) (modn (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) (@val (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (fun x : FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a))) => @in_mem (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) x (@mem (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (predPredType (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@has_quality (S O) (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (@GRing.unit (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (FinRing.unit_subType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (oneg (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (@order gT a))), is_true (@in_mem (@FinRing.unit_of (Zp_finUnitRingType (Zp_trunc (@order gT a))) (Phant (ordinal (S (S (Zp_trunc (@order gT a))))))) u (@mem (@FinRing.unit_of (Zp_finUnitRingType (Zp_trunc (@order gT a))) (Phant (ordinal (S (S (Zp_trunc (@order gT a))))))) (predPredType (@FinRing.unit_of (Zp_finUnitRingType (Zp_trunc (@order gT a))) (Phant (ordinal (S (S (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (oneg (group_set_baseGroupType (FinRing.unit_baseFinGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))))) *) by rewrite -[n in _ == _ %[mod n]]Zp_cast ?order_gt1 // !modZp inE. Qed. Lemma generator_coprime m : generator <[a]> (a ^+ m) = coprime #[a] m. Proof. (* Goal: @eq bool (@generator gT (@cycle gT a) (@expgn (FinGroup.base gT) a m)) (coprime (@order gT a) m) *) rewrite /generator eq_sym eqEcard cycleX -/#[a] [#|_|]orderXgcd /=. (* Goal: @eq bool (leq (@order gT a) (divn (@order gT a) (gcdn (@order gT a) m))) (coprime (@order gT a) m) *) apply/idP/idP=> [le_a_am|co_am]; last by rewrite (eqnP co_am) divn1. (* Goal: is_true (coprime (@order gT a) m) *) have am_gt0: 0 < gcdn #[a] m by rewrite gcdn_gt0 order_gt0. (* Goal: is_true (coprime (@order gT a) m) *) by rewrite /coprime eqn_leq am_gt0 andbT -(@leq_pmul2l #[a]) ?muln1 -?leq_divRL. Qed. Lemma im_Zp_unitm : Zp_unitm @* units_Zp #[a] = Aut <[a]>. Proof. (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (@morphim (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (units_Zp (@order gT a)) Zp_unit_morphism (@MorPhantom (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) Zp_unitm) (units_Zp (@order gT a))) (@Aut gT (@cycle gT a)) *) rewrite morphimEdom; apply/setP=> f; pose n := invm (injm_Zpm a) (f a). (* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) f (@mem (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@mfun (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))) Zp_unit_morphism) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))))))))) (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) f (@mem (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@cycle gT a))))) *) apply/imsetP/idP=> [[u _ ->] | Af]; first exact: Aut_aut. (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => @eq (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) f (@mfun (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))) Zp_unit_morphism x)) *) have [a1 | nta] := eqVneq a 1. (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => @eq (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) f (@mfun (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))) Zp_unit_morphism x)) *) (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => @eq (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) f (@mfun (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))) Zp_unit_morphism x)) *) by rewrite a1 cycle1 Aut1 in Af; exists 1; rewrite // morph1 (set1P Af). (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => @eq (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) f (@mfun (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))) Zp_unit_morphism x)) *) have a_fa: <[a]> = <[f a]>. (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => @eq (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) f (@mfun (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))) Zp_unit_morphism x)) *) (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cycle gT a) (@cycle gT (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) f a)) *) by rewrite -(autmE Af) -morphim_cycle ?im_autm ?cycle_id. (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => @eq (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) f (@mfun (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))) Zp_unit_morphism x)) *) have def_n: a ^+ n = f a. (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => @eq (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) f (@mfun (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))) Zp_unit_morphism x)) *) (* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) a (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) n)) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) f a) *) by rewrite -/(Zpm n) invmK // im_Zpm a_fa cycle_id. (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => @eq (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) f (@mfun (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))) Zp_unit_morphism x)) *) have co_a_n: coprime #[a].-2.+2 n. (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => @eq (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) f (@mfun (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))) Zp_unit_morphism x)) *) (* Goal: is_true (coprime (S (S (Nat.pred (Nat.pred (@order gT a))))) (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) n)) *) by rewrite {1}Zp_cast ?order_gt1 // -generator_coprime def_n; apply/eqP. (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) => @eq (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) f (@mfun (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))) Zp_unit_morphism x)) *) exists (FinRing.unit 'Z_#[a] co_a_n); rewrite ?inE //. (* Goal: @eq (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) f (@mfun (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (units_Zp_group (@order gT a))) Zp_unit_morphism (@FinRing.Unit (Zp_finUnitRingType (Zp_trunc (@order gT a))) (Phant (ordinal (S (S (Zp_trunc (@order gT a)))))) n co_a_n)) *) apply: eq_Aut (Af) (Aut_aut _ _) _ => x ax. (* Goal: @eq (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) f x) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) (@aut gT (@cycle_group gT a) (cyclem_morphism (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) (@val (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (fun x : FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a))) => @in_mem (FinRing.UnitRing.sort (Zp_finUnitRingType (Zp_trunc (@order gT a)))) x (@mem (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (predPredType (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))) (@has_quality (S O) (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a))))) (@GRing.unit (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))) (FinRing.unit_subType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (@FinRing.Unit (Zp_finUnitRingType (Zp_trunc (@order gT a))) (Phant (ordinal (S (S (Zp_trunc (@order gT a)))))) n co_a_n)))) (injm_cyclem (@FinRing.Unit (Zp_finUnitRingType (Zp_trunc (@order gT a))) (Phant (ordinal (S (S (Zp_trunc (@order gT a)))))) n co_a_n)) (im_cyclem (@FinRing.Unit (Zp_finUnitRingType (Zp_trunc (@order gT a))) (Phant (ordinal (S (S (Zp_trunc (@order gT a)))))) n co_a_n))) x) *) rewrite autE //= /cyclem; case/cycleP: ax => k ->{x}. (* Goal: @eq (FinGroup.arg_sort (FinGroup.base gT)) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) f (@expgn (FinGroup.base gT) a k)) (@expgn (FinGroup.base gT) (@expgn (FinGroup.base gT) a k) (@nat_of_ord (S (S (Zp_trunc (@order gT a)))) n)) *) by rewrite -(autmE Af) morphX ?cycle_id //= autmE -def_n -!expgM mulnC. Qed. Lemma Zp_unit_isom : isom (units_Zp #[a]) (Aut <[a]>) Zp_unitm. Proof. (* Goal: is_true (@isom (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (units_Zp (@order gT a)) (@Aut gT (@cycle gT a)) Zp_unitm) *) by apply/isomP; rewrite ?injm_Zp_unitm ?im_Zp_unitm. Qed. Lemma Zp_unit_isog : isog (units_Zp #[a]) (Aut <[a]>). Proof. (* Goal: is_true (@isog (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc (@order gT a)))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (units_Zp (@order gT a)) (@Aut gT (@cycle gT a))) *) exact: isom_isog Zp_unit_isom. Qed. Lemma card_Aut_cycle : #|Aut <[a]>| = totient #[a]. Proof. (* Goal: @eq nat (@card (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT (@cycle gT a))))) (totient (@order gT a)) *) by rewrite -(card_isog Zp_unit_isog) card_units_Zp. Qed. Lemma totient_gen : totient #[a] = #|[set x | generator <[a]> x]|. Proof. (* Goal: @eq nat (totient (@order 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)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @generator gT (@cycle gT a) x))))) *) have [lea1 | lt1a] := leqP #[a] 1. (* Goal: @eq nat (totient (@order 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)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @generator gT (@cycle gT a) x))))) *) (* Goal: @eq nat (totient (@order 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)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @generator gT (@cycle gT a) x))))) *) rewrite /order card_le1_trivg // cards1 (@eq_card1 _ 1) // => x. (* Goal: @eq nat (totient (@order 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)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @generator gT (@cycle gT a) x))))) *) (* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @generator gT (oneg (group_set_of_baseGroupType (FinGroup.base gT))) x))))) (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) x (@mem (Equality.sort (Finite.eqType (FinGroup.finType (FinGroup.base gT)))) (simplPredType (Equality.sort (Finite.eqType (FinGroup.finType (FinGroup.base gT))))) (@pred1 (Finite.eqType (FinGroup.finType (FinGroup.base gT))) (oneg (FinGroup.base gT))))) *) by rewrite !inE -cycle_eq1 eq_sym. (* Goal: @eq nat (totient (@order 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)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @generator gT (@cycle gT a) x))))) *) rewrite -(card_injm (injm_invm (injm_Zpm a))) /= ?im_Zpm; last first. (* Goal: @eq nat (totient (@order gT a)) (@card (FinGroup.finType (Zp_baseFinGroupType (S (Zp_trunc (@order gT a))))) (@mem (ordinal (S (S (Zp_trunc (@order gT a))))) (predPredType (ordinal (S (S (Zp_trunc (@order gT a)))))) (@SetDef.pred_of_set (FinGroup.finType (Zp_baseFinGroupType (S (Zp_trunc (@order gT a))))) (@morphim gT (Zp_finGroupType (S (Zp_trunc (@order gT a)))) (@morphim (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (Zp (@order gT a)) (@Zpm_morphism gT a) (@MorPhantom (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (@Zpm gT a)) (Zp (@order gT a))) (@invm_morphism (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (Zp_group (@order gT a)) (@Zpm_morphism gT a) (@injm_Zpm gT a)) (@MorPhantom gT (Zp_finGroupType (S (Zp_trunc (@order gT a)))) (@invm (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (Zp_group (@order gT a)) (@Zpm_morphism gT a) (@injm_Zpm gT a))) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @generator gT (@cycle gT a) x)))))) *) (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @generator gT (@cycle gT a) x)))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cycle gT a)))) *) by apply/subsetP=> x; rewrite inE; apply: cycle_generator. (* Goal: @eq nat (totient (@order gT a)) (@card (FinGroup.finType (Zp_baseFinGroupType (S (Zp_trunc (@order gT a))))) (@mem (ordinal (S (S (Zp_trunc (@order gT a))))) (predPredType (ordinal (S (S (Zp_trunc (@order gT a)))))) (@SetDef.pred_of_set (FinGroup.finType (Zp_baseFinGroupType (S (Zp_trunc (@order gT a))))) (@morphim gT (Zp_finGroupType (S (Zp_trunc (@order gT a)))) (@morphim (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (Zp (@order gT a)) (@Zpm_morphism gT a) (@MorPhantom (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (@Zpm gT a)) (Zp (@order gT a))) (@invm_morphism (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (Zp_group (@order gT a)) (@Zpm_morphism gT a) (@injm_Zpm gT a)) (@MorPhantom gT (Zp_finGroupType (S (Zp_trunc (@order gT a)))) (@invm (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (Zp_group (@order gT a)) (@Zpm_morphism gT a) (@injm_Zpm gT a))) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @generator gT (@cycle gT a) x)))))) *) rewrite -card_units_Zp // cardsE card_sub morphim_invmE; apply: eq_card => /= d. (* Goal: @eq bool (@in_mem (ordinal (S (S (Zp_trunc (@order gT a))))) d (@mem (ordinal (S (S (Zp_trunc (@order gT a))))) (predPredType (ordinal (S (S (Zp_trunc (@order gT a)))))) (@pred_of_simpl (ordinal (S (S (Zp_trunc (@order gT a))))) (@SimplPred (ordinal (S (S (Zp_trunc (@order gT a))))) (fun x : ordinal (S (S (Zp_trunc (@order gT a)))) => @in_mem (ordinal (S (S (Zp_trunc (@order gT a))))) x (@mem (ordinal (S (S (Zp_trunc (@order gT a))))) (predPredType (ordinal (S (S (Zp_trunc (@order gT a)))))) (@has_quality (S O) (ordinal (S (S (Zp_trunc (@order gT a))))) (@GRing.unit (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc (@order gT a)))))))))))) (@in_mem (ordinal (S (S (Zp_trunc (@order gT a))))) d (@mem (ordinal (S (S (Zp_trunc (@order gT a))))) (predPredType (ordinal (S (S (Zp_trunc (@order gT a)))))) (@SetDef.pred_of_set (FinGroup.finType (Zp_baseFinGroupType (S (Zp_trunc (@order gT a))))) (@morphpre (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (Zp (@order gT a)) (@Zpm_morphism gT a) (@MorPhantom (Zp_finGroupType (S (Zp_trunc (@order gT a)))) gT (@Zpm gT a)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @generator gT (@cycle gT a) x)))))) *) by rewrite !inE /= qualifE /= /Zp lt1a inE /= generator_coprime {1}Zp_cast. Qed. Lemma Aut_cycle_abelian : abelian (Aut <[a]>). Proof. (* Goal: is_true (@abelian (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT (@cycle gT a))) *) by rewrite -im_Zp_unitm morphim_abelian ?units_Zp_abelian. Qed. End CycleAutomorphism. Variable G : {group gT}. Lemma Aut_cyclic_abelian : cyclic G -> abelian (Aut G). Proof. (* Goal: forall _ : is_true (@cyclic gT (@gval gT G)), is_true (@abelian (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT (@gval gT G))) *) by case/cyclicP=> x ->; apply: Aut_cycle_abelian. Qed. Lemma card_Aut_cyclic : cyclic G -> #|Aut G| = totient #|G|. Proof. (* Goal: forall _ : is_true (@cyclic gT (@gval gT G)), @eq nat (@card (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT (@gval gT G))))) (totient (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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/cyclicP=> x ->; apply: card_Aut_cycle. Qed. Lemma sum_ncycle_totient : \sum_(d < #|G|.+1) #|[set <[x]> | x in G & #[x] == d]| * totient d = #|G|. Proof. (* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (ordinal_finType (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 G))))))) O (index_enum (ordinal_finType (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 G))))))) (fun d : ordinal (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 G))))) => @BigBody nat (ordinal (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 G)))))) d addn true (muln (@card (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @cycle gT x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op nat_eqType (@order gT x) (@nat_of_ord (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 G))))) d)))))))))) (totient (@nat_of_ord (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 G))))) d))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *) pose h (x : gT) : 'I_#|G|.+1 := inord #[x]. (* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (ordinal_finType (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 G))))))) O (index_enum (ordinal_finType (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 G))))))) (fun d : ordinal (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 G))))) => @BigBody nat (ordinal (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 G)))))) d addn true (muln (@card (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @cycle gT x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op nat_eqType (@order gT x) (@nat_of_ord (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 G))))) d)))))))))) (totient (@nat_of_ord (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 G))))) d))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *) symmetry; rewrite -{1}sum1_card (partition_big h xpredT) //=. (* Goal: @eq nat (@BigOp.bigop nat (ordinal (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) O (index_enum (ordinal_finType (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_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 j : ordinal (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_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 nat (ordinal (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) j addn true (@BigOp.bigop nat (FinGroup.arg_sort (FinGroup.base gT)) O (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : FinGroup.arg_sort (FinGroup.base gT) => @BigBody nat (FinGroup.arg_sort (FinGroup.base gT)) i addn (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)) (@gval gT G)))) (@eq_op (Finite.eqType (ordinal_finType (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (h i) j)) (S O))))) (@BigOp.bigop nat (ordinal (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) O (index_enum (ordinal_finType (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_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 d : ordinal (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_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 nat (ordinal (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) d addn true (muln (@card (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @cycle gT x) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => 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 nat_eqType (@order gT x) (@nat_of_ord (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) d)))))))))) (totient (@nat_of_ord (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) d))))) *) apply: eq_bigr => d _; set Gd := finset _. (* Goal: @eq nat (@BigOp.bigop nat (FinGroup.arg_sort (FinGroup.base gT)) O (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : FinGroup.arg_sort (FinGroup.base gT) => @BigBody nat (FinGroup.arg_sort (FinGroup.base gT)) i addn (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)) (@gval gT G)))) (@eq_op (Finite.eqType (ordinal_finType (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (h i) d)) (S O))) (muln (@card (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @cycle gT x) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) Gd)))))) (totient (@nat_of_ord (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) d))) *) rewrite -sum_nat_const sum1dep_card -sum1_card (_ : finset _ = Gd); last first. (* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) O (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i addn (@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)) Gd))) (S O))) (@BigOp.bigop nat (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) O (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun i : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @BigBody nat (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) i addn (@in_mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) i (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @cycle gT x) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) Gd)))))) (totient (@nat_of_ord (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) d)))) *) (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 (Finite.eqType (ordinal_finType (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (h x) d))) Gd *) apply/setP=> x; rewrite !inE; apply: andb_id2l => Gx. (* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) O (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i addn (@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)) Gd))) (S O))) (@BigOp.bigop nat (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) O (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun i : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @BigBody nat (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) i addn (@in_mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) i (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @cycle gT x) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) Gd)))))) (totient (@nat_of_ord (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) d)))) *) (* Goal: @eq bool (@eq_op (Finite.eqType (ordinal_finType (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (h x) d) (@eq_op nat_eqType (@order gT x) (@nat_of_ord (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) d)) *) by rewrite /eq_op /= inordK // ltnS subset_leq_card ?cycle_subG. (* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) O (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i addn (@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)) Gd))) (S O))) (@BigOp.bigop nat (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) O (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun i : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @BigBody nat (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) i addn (@in_mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) i (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @cycle gT x) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) Gd)))))) (totient (@nat_of_ord (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) d)))) *) rewrite (partition_big_imset cycle) {}/Gd; apply: eq_bigr => C /=. (* Goal: forall _ : is_true (@in_mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) C (@mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@cycle gT) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => 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 nat_eqType (@order gT x) (@nat_of_ord (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) d)))))))))), @eq nat (@BigOp.bigop nat (FinGroup.arg_sort (FinGroup.base gT)) O (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : FinGroup.arg_sort (FinGroup.base gT) => @BigBody nat (FinGroup.arg_sort (FinGroup.base gT)) i addn (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)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => 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 nat_eqType (@order gT x) (@nat_of_ord (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) d))))))) (@eq_op (Finite.eqType (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (@cycle gT i) C)) (S O))) (totient (@nat_of_ord (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) d)) *) case/imsetP=> x /setIdP[Gx /eqP <-] -> {C d}. (* Goal: @eq nat (@BigOp.bigop nat (FinGroup.arg_sort (FinGroup.base gT)) O (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : FinGroup.arg_sort (FinGroup.base gT) => @BigBody nat (FinGroup.arg_sort (FinGroup.base gT)) i addn (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)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x0 : FinGroup.arg_sort (FinGroup.base gT) => andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x0 (@mem (FinGroup.arg_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 nat_eqType (@order gT x0) (@order gT x))))))) (@eq_op (Finite.eqType (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (@cycle gT i) (@cycle gT x))) (S O))) (totient (@order gT x)) *) rewrite sum1dep_card totient_gen; apply: eq_card => y; rewrite !inE /generator. (* Goal: @eq bool (andb (andb (@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)) (@gval gT G)))) (@eq_op nat_eqType (@order gT y) (@order gT x))) (@eq_op (Finite.eqType (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (@cycle gT y) (@cycle gT x))) (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@cycle gT x) (@cycle gT y)) *) move: Gx; rewrite andbC eq_sym -!cycle_subG /order. (* 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)) (@cycle gT x))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq bool (andb (@eq_op (Finite.eqType (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (@cycle gT x) (@cycle gT y)) (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)) (@cycle 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_op nat_eqType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cycle gT y)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cycle gT x))))))) (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@cycle gT x) (@cycle gT y)) *) by case: eqP => // -> ->; rewrite eqxx. Qed. End CyclicAutomorphism. Lemma sum_totient_dvd n : \sum_(d < n.+1 | d %| n) totient d = n. Section FieldMulCyclic. Import GRing.Theory. Variables (gT : finGroupType) (G : {group gT}). Lemma order_inj_cyclic : {in G &, forall x y, #[x] = #[y] -> <[x]> = <[y]>} -> cyclic G. Lemma div_ring_mul_group_cyclic (R : unitRingType) (f : gT -> R) : f 1 = 1%R -> {in G &, {morph f : u v / u * v >-> (u * v)%R}} -> {in G^#, forall x, f x - 1 \in GRing.unit}%R -> Lemma field_mul_group_cyclic (F : fieldType) (f : gT -> F) : {in G &, {morph f : u v / u * v >-> (u * v)%R}} -> {in G, forall x, f x = 1%R <-> x = 1} -> cyclic G. End FieldMulCyclic. Lemma field_unit_group_cyclic (F : finFieldType) (G : {group {unit F}}) : cyclic G. Proof. (* Goal: is_true (@cyclic (FinRing.unit_finGroupType (FinRing.Field.finUnitRingType F)) (@gval (FinRing.unit_finGroupType (FinRing.Field.finUnitRingType F)) G)) *) apply: field_mul_group_cyclic FinRing.uval _ _ => // u _. (* Goal: iff (@eq (GRing.Field.sort (FinRing.Field.fieldType F)) (@FinRing.uval (FinRing.Field.join_finUnitRingType F) u) (GRing.one (GRing.Field.ringType (FinRing.Field.fieldType F)))) (@eq (FinGroup.arg_sort (FinGroup.base (FinRing.unit_finGroupType (FinRing.Field.join_finUnitRingType F)))) u (oneg (FinGroup.base (FinRing.unit_finGroupType (FinRing.Field.join_finUnitRingType F))))) *) by split=> /eqP ?; apply/eqP. Qed. Section PrimitiveRoots. Open Scope ring_scope. Import GRing.Theory. Lemma has_prim_root (F : fieldType) (n : nat) (rs : seq F) : n > 0 -> all n.-unity_root rs -> uniq rs -> size rs >= n -> Proof. (* Goal: forall (_ : is_true (leq (S O) n)) (_ : is_true (@all (GRing.Ring.sort (GRing.Field.ringType F)) (@root_of_unity (GRing.Field.ringType F) n) rs)) (_ : is_true (@uniq (GRing.Field.eqType F) rs)) (_ : is_true (leq n (@size (GRing.Field.sort F) rs))), is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) move=> n_gt0 rsn1 Urs; rewrite leq_eqVlt ltnNge max_unity_roots // orbF eq_sym. (* Goal: forall _ : is_true (@eq_op nat_eqType (@size (GRing.Field.sort F) rs) n), is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) move/eqP=> sz_rs; pose r := val (_ : seq_sub rs). (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) have rn1 x: r x ^+ n = 1. (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) (* Goal: @eq (GRing.Ring.sort (GRing.Field.ringType F)) (@GRing.exp (GRing.Field.ringType F) (r x) n) (GRing.one (GRing.Field.ringType F)) *) by apply/eqP; rewrite -unity_rootE (allP rsn1) ?(valP x). (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) have prim_r z: z ^+ n = 1 -> z \in rs. (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) (* Goal: forall _ : @eq (GRing.Ring.sort (GRing.Field.ringType F)) (@GRing.exp (GRing.Field.ringType F) z n) (GRing.one (GRing.Field.ringType F)), is_true (@in_mem (GRing.Ring.sort (GRing.Field.ringType F)) z (@mem (Equality.sort (GRing.Field.eqType F)) (seq_predType (GRing.Field.eqType F)) rs)) *) by move/eqP; rewrite -unity_rootE -(mem_unity_roots n_gt0). (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) pose r' := SeqSub (prim_r _ _); pose sG_1 := r' _ (expr1n _ _). (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) have sG_VP: r _ ^+ n.-1 ^+ n = 1. (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) (* Goal: forall s : @seq_sub (GRing.Field.eqType F) rs, @eq (GRing.Ring.sort (GRing.Field.ringType F)) (@GRing.exp (GRing.Field.ringType F) (@GRing.exp (GRing.Field.ringType F) (r s) (Nat.pred n)) n) (GRing.one (GRing.Field.ringType F)) *) by move=> x; rewrite -exprM mulnC exprM rn1 expr1n. (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) have sG_MP: (r _ * r _) ^+ n = 1 by move=> x y; rewrite exprMn !rn1 mul1r. (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) pose sG_V := r' _ (sG_VP _); pose sG_M := r' _ (sG_MP _ _). (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) have sG_Ag: associative sG_M by move=> x y z; apply: val_inj; rewrite /= mulrA. (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) have sG_1g: left_id sG_1 sG_M by move=> x; apply: val_inj; rewrite /= mul1r. (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) have sG_Vg: left_inverse sG_1 sG_V sG_M. (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) (* Goal: @left_inverse (@seq_sub (GRing.Ring.eqType (GRing.Field.ringType F)) rs) (@seq_sub (GRing.Field.eqType F) rs) (@seq_sub (GRing.Ring.eqType (GRing.Field.ringType F)) rs) sG_1 sG_V sG_M *) by move=> x; apply: val_inj; rewrite /= -exprSr prednK ?rn1. (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) pose sgT := BaseFinGroupType _ (FinGroup.Mixin sG_Ag sG_1g sG_Vg). (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) pose gT := @FinGroupType sgT sG_Vg. (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) have /cyclicP[x gen_x]: @cyclic gT setT. (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) (* Goal: is_true (@cyclic gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) *) apply: (@field_mul_group_cyclic gT [set: _] F r) => // x _. (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) (* Goal: iff (@eq (GRing.Field.sort F) (r x) (GRing.one (GRing.Field.ringType F))) (@eq (FinGroup.arg_sort (FinGroup.base gT)) x (oneg (FinGroup.base gT))) *) by split=> [ri1 | ->]; first apply: val_inj. (* Goal: is_true (@has (GRing.Ring.sort (GRing.Field.ringType F)) (@primitive_root_of_unity (GRing.Field.ringType F) n) rs) *) apply/hasP; exists (r x); first exact: (valP x). (* Goal: is_true (@primitive_root_of_unity (GRing.Field.ringType F) n (r x)) *) have [m prim_x dvdmn] := prim_order_exists n_gt0 (rn1 x). (* Goal: is_true (@primitive_root_of_unity (GRing.Field.ringType F) n (r x)) *) rewrite -((m =P n) _) // eqn_dvd {}dvdmn -sz_rs -(card_seq_sub Urs) -cardsT. (* Goal: is_true (andb true (dvdn (@card (@seq_sub_finType (GRing.Field.choiceType F) rs) (@mem (Finite.sort (@seq_sub_finType (GRing.Field.choiceType F) rs)) (predPredType (Finite.sort (@seq_sub_finType (GRing.Field.choiceType F) rs))) (@SetDef.pred_of_set (@seq_sub_finType (GRing.Field.choiceType F) rs) (@setTfor (@seq_sub_finType (GRing.Field.choiceType F) rs) (Phant (Finite.sort (@seq_sub_finType (GRing.Field.choiceType F) rs))))))) m)) *) rewrite gen_x (@order_dvdn gT) /(_ == _) /= -{prim_x}(prim_expr_order prim_x). (* Goal: is_true (@eq_op (choice.Choice.eqType (GRing.Field.choiceType F)) (@ssval (choice.Choice.eqType (GRing.Field.choiceType F)) rs (@expgn sgT x m)) (@GRing.exp (GRing.Field.ringType F) (r x) m)) *) by apply/eqP; elim: m => //= m IHm; rewrite exprS expgS /= -IHm. Qed. End PrimitiveRoots. Section AutPrime. Variable gT : finGroupType. Lemma Aut_prime_cycle_cyclic (a : gT) : prime #[a] -> cyclic (Aut <[a]>). Lemma Aut_prime_cyclic (G : {group gT}) : prime #|G| -> cyclic (Aut G). Proof. (* Goal: forall _ : is_true (prime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), is_true (@cyclic (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT (@gval gT G))) *) move=> pr_G; case/cyclicP: (prime_cyclic pr_G) (pr_G) => x ->. (* Goal: forall _ : is_true (prime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cycle gT x))))), is_true (@cyclic (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT (@cycle gT x))) *) exact: Aut_prime_cycle_cyclic. Qed. End AutPrime.
Require Import TypeThms. Require Import List. Require Import syntax. Require Import environments. Require Import utils. Require Import freevars. Require Import typecheck. Require Import rename. Require Import OSrules. Goal forall (nv v : vari) (HF H0 : ty_env) (e : tm) (t s r : ty), nv = v \/ ~ FV nv e /\ ~ member vari v (TE_Dom HF) /\ ~ member vari nv (TE_Dom HF) -> TC ((v, t) :: HF ++ (v, s) :: H0) e r -> TC ((v, t) :: HF ++ (nv, s) :: H0) e r. intros. elim H; intro B. rewrite B; assumption. change (TC (((v, t) :: HF) ++ (nv, s) :: H0) e r) in |- *. apply TEp_nfvExt with (((v, t) :: HF) ++ H0). change (TC (nil ++ (v, t) :: HF ++ H0) e r) in |- *. apply TEp_inv_eqExt with v s (nil ++ (v, t) :: HF ++ (v, s) :: H0). reflexivity. simpl in |- *; assumption. reflexivity. elim B; intros; assumption. reflexivity. Save ren_case1. Goal forall (nv v nx x : vari) (HF H0 : ty_env) (e1 e2 e3 : tm) (t s r : ty), v <> nx -> nx <> nv -> ~ FV nx e1 -> ~ FV nv e2 -> nv = v \/ (nv = x \/ ~ FV nv e1) /\ ~ member vari v (TE_Dom HF) /\ ~ member vari nv (TE_Dom HF) -> (forall (HF H : ty_env) (s t : ty), nx = x \/ ~ FV nx e1 /\ ~ member vari x (TE_Dom HF) /\ ~ member vari nx (TE_Dom HF) -> TC (HF ++ (x, s) :: H) e1 t -> TC (HF ++ (nx, s) :: H) e2 t) -> (forall (HF H : ty_env) (s t : ty), nv = v \/ ~ FV nv e2 /\ ~ member vari v (TE_Dom HF) /\ ~ member vari nv (TE_Dom HF) -> TC (HF ++ (v, s) :: H) e2 t -> TC (HF ++ (nv, s) :: H) e3 t) -> TC ((x, t) :: HF ++ (v, s) :: H0) e1 r -> TC ((nx, t) :: HF ++ (nv, s) :: H0) e3 r. intros. change (TC (((nx, t) :: HF) ++ (nv, s) :: H0) e3 r) in |- *. apply H6. elim H4; intro A. left; assumption. right; split. assumption. elim A; intros F M. elim M; intros Mv Mnv. split; simpl in |- *; unfold IF_then_else in |- *; red in |- *; simple induction 1; intro N. apply H; symmetry in |- *; assumption. apply Mv; assumption. apply H1; assumption. apply Mnv; assumption. change (TC (nil ++ (nx, t) :: HF ++ (v, s) :: H0) e2 r) in |- *. apply H5. right; split; assumption || split; simpl in |- *; red in |- *; intro; assumption. simpl in |- *; assumption. Save ren_case2. Goal forall (nv v : vari) (H HF : ty_env) (s t : ty), nv = v \/ nv <> v /\ ~ member vari v (TE_Dom HF) /\ ~ member vari nv (TE_Dom HF) -> mapsto v t (HF ++ (v, s) :: H) -> mapsto nv t (HF ++ (nv, s) :: H). simple induction 1; intro N. intro; rewrite N; assumption. generalize N; elim HF; simpl in |- *. intros A If. apply T_If. reflexivity. apply If_T with (v = v) (mapsto v t H). assumption. reflexivity. simple induction a; simpl in |- *. intros a0 b y IH A If. elim A; intro nvv; simple induction 1; intros a0v a0nv. apply F_If. red in |- *; intro; apply a0nv; left; assumption. apply IH. split. assumption. split. red in |- *; intro; apply a0v; right; assumption. red in |- *; intro; apply a0nv; right; assumption. apply If_F with (a0 = v) (b = t). assumption. red in |- *; intro; apply a0v; left; assumption. Save ren_var1. Goal forall (nv v x : vari) (H HF : ty_env) (s t : ty), v <> x -> nv = v \/ nv <> x /\ ~ member vari v (TE_Dom HF) /\ ~ member vari nv (TE_Dom HF) -> mapsto x t (HF ++ (v, s) :: H) -> mapsto x t (HF ++ (nv, s) :: H). intros nv v x H HF s t nvx. simple induction 1; intro A. intro; rewrite A; assumption. generalize A; elim HF; simpl in |- *. intros B If. apply F_If. elim B; intros; assumption. apply If_F with (v = x) (s = t); assumption. simple induction a; simpl in |- *. intros a0 b y IH B If. specialize (Xmidvar a0 x); simple induction 1; intro ax. apply T_If. assumption. apply If_T with (a0 = x) (mapsto x t (y ++ (v, s) :: H)); assumption. apply F_If. assumption. apply IH. elim B; intro nx; simple induction 1; intros a0v a0nv. split. assumption. split. red in |- *; intro; apply a0v; right; assumption. red in |- *; intro; apply a0nv; right; assumption. apply If_F with (a0 = x) (b = t); assumption. Save ren_var2. Goal forall (nx x : vari) (e ne : tm), rename nx x e ne -> forall (HF H : ty_env) (s t : ty), nx = x \/ ~ FV nx e /\ ~ member vari x (TE_Dom HF) /\ ~ member vari nx (TE_Dom HF) -> TC (HF ++ (x, s) :: H) e t -> TC (HF ++ (nx, s) :: H) ne t. simple induction 1; intros. specialize inv_TC_o with (1 := H2). intro Q; rewrite Q; apply TC_o. specialize inv_TC_ttt with (1 := H2). intro Q; rewrite Q; apply TC_ttt. specialize inv_TC_fff with (1 := H2). intro Q; rewrite Q; apply TC_fff. specialize inv_TC_abs with (1 := H2). simple induction 1; simple induction 1; intros Q T. rewrite Q. apply TC_abs. apply ren_case1. specialize AABC_ABC with (B := ~ FV nv e0) (1 := H1). intro AA; apply AA. intro; apply notFV_abs with t; assumption. assumption. specialize inv_TC_abs with (1 := H10). simple induction 1; simple induction 1; intros Q T. rewrite Q. apply TC_abs. apply ren_case2 with v x0 e1 e2. red in |- *; intro; apply H2; symmetry in |- *; assumption. assumption. assumption. rewrite H0; apply RenNotFree with nx0 e1; assumption || elim H0; assumption. elim H9; intro S. left; assumption. right; elim S; intros F M; split. apply notFV_abs with t; assumption. assumption. assumption. assumption. assumption. specialize inv_TC_abs with (1 := H6). simple induction 1; simple induction 1; intros Q T. rewrite Q; apply TC_abs. change (TC (((x0, t) :: HF) ++ (nv, s) :: H4) ne0 x1) in |- *. apply H3. elim H5; intro N. left; assumption. right; elim N; intros F M; split. red in |- *; intro; apply F; apply FV_abs; assumption. elim M; intros Mv Mnv. split; simpl in |- *; red in |- *; simple induction 1; intro A. apply H0; symmetry in |- *; assumption. apply Mv; assumption. apply H1; symmetry in |- *; assumption. apply Mnv; assumption. simpl in |- *; assumption. specialize inv_TC_appl with (1 := H6). simple induction 1; simple induction 1; intros T1 T2. apply TC_appl with x0. apply H1. elim H5; intro N. left; assumption. right; elim N; intros F M; split. red in |- *; intro; apply F; apply FV_appl1; assumption. assumption. assumption. apply H3. elim H5; intro N. left; assumption. right; elim N; intros F M; split. red in |- *; intro; apply F; apply FV_appl2; assumption. assumption. assumption. specialize inv_TC_cond with (1 := H8). simple induction 1; intro T1. simple induction 1; intros T2 T3. apply TC_cond. apply H1. elim H7; intro N. left; assumption. right; elim N; intros F M; split. red in |- *; intro; apply F; apply FV_cond1; assumption. assumption. assumption. apply H3. elim H7; intro N. left; assumption. right; elim N; intros F M; split. red in |- *; intro; apply F; apply FV_cond2; assumption. assumption. assumption. apply H5. elim H7; intro N. left; assumption. right; elim N; intros F M; split. red in |- *; intro; apply F; apply FV_cond3; assumption. assumption. assumption. apply TC_var. specialize inv_TC_var with (1 := H2). intro; apply ren_var1 with v. elim H1; intro. left; assumption. right; elim H4; intros; split. apply notFV_var; assumption. assumption. assumption. apply TC_var. specialize inv_TC_var with (1 := H3). intro; apply ren_var2 with v. assumption. elim H2; intro A. left; assumption. right; elim A; intros F M; split. apply notFV_var; assumption. assumption. assumption. specialize inv_TC_succ with (1 := H4). simple induction 1; intros Q T; rewrite Q; apply TC_succ. apply H1. elim H3; intro A. left; assumption. right; elim A; intros F M. split; assumption || red in |- *; intro; apply F; apply FV_succ; assumption. assumption. specialize inv_TC_prd with (1 := H4). simple induction 1; intros Q T; rewrite Q; apply TC_prd. apply H1. elim H3; intro A. left; assumption. right; elim A; intros F M. split; assumption || red in |- *; intro; apply F; apply FV_prd; assumption. assumption. specialize inv_TC_is_o with (1 := H4). simple induction 1; intros Q T; rewrite Q; apply TC_is_o. apply H1. elim H3; intro A. left; assumption. right; elim A; intros F M. split; assumption || red in |- *; intro; apply F; apply FV_is_o; assumption. assumption. specialize inv_TC_fix with (1 := H2). simple induction 1; intros Q T. elim Q. apply TC_fix. pattern t at 2 in |- *; rewrite Q. apply ren_case1. specialize AABC_ABC with (1 := H1) (B := ~ FV nv e0). intro AA; apply AA. intro; apply notFV_fix with t; assumption. assumption. specialize inv_TC_fix with (1 := H10). simple induction 1; intros Q T. elim Q. apply TC_fix. pattern t at 2 in |- *; rewrite Q. apply ren_case2 with v x0 e1 e2. red in |- *; intro; apply H2; symmetry in |- *; assumption. assumption. assumption. rewrite H0; apply RenNotFree with nx0 e1; assumption || elim H0; assumption. elim H9; intro S. left; assumption. right; elim S; intros F M; split. apply notFV_fix with t; assumption. assumption. assumption. assumption. assumption. specialize inv_TC_fix with (1 := H6). simple induction 1; intros Q T. elim Q; apply TC_fix. pattern t at 2 in |- *; rewrite Q. change (TC (((x0, t) :: HF) ++ (nv, s) :: H4) ne0 t0) in |- *. apply H3. elim H5; intro N. left; assumption. right; elim N; intros F M; split. red in |- *; intro; apply F; apply FV_fix; assumption. elim M; intros Mv Mnv. split; simpl in |- *; red in |- *; simple induction 1; intro A. apply H0; symmetry in |- *; assumption. apply Mv; assumption. apply H1; symmetry in |- *; assumption. apply Mnv; assumption. simpl in |- *; assumption. specialize inv_TC_clos with (1 := H4). simple induction 1; intros Ta Tb. apply TC_clos. apply H1. elim H3; intro A. left; assumption. right; elim A; intros F M; split. red in |- *; intro; apply F; apply FV_closa; assumption. assumption. assumption. apply ren_case1. specialize AABC_ABC with (1 := H3) (B := ~ FV nv e0). intro AA; apply AA. intro F; specialize notFV_clos with (1 := F). simple induction 1; intros; assumption. assumption. specialize inv_TC_clos with (1 := H12). simple induction 1; intros Ta Tb. apply TC_clos. apply H9. elim H11; intro A. left; assumption. right; elim A; intros F M; split. red in |- *; intro; apply F; apply FV_closa; assumption. assumption. assumption. apply ren_case2 with v x0 e0 e'. red in |- *; intro; apply H2; symmetry in |- *; assumption. assumption. assumption. rewrite H0; apply RenNotFree with nx0 e0; assumption || elim H0; assumption. elim H11; intro S. left; assumption. right; split. left; assumption. elim S; intros; assumption. assumption. assumption. assumption. specialize inv_TC_clos with (1 := H8). simple induction 1; intros Ta Tb. apply TC_clos. apply H5. elim H7; intro A. left; assumption. right; elim A; intros F M; split. red in |- *; intro; apply F; apply FV_closa; assumption. assumption. assumption. change (TC (((x0, t) :: HF) ++ (nv, s) :: H6) ne0 t0) in |- *. apply H3. elim H7; intro N. left; assumption. right; elim N; intros F M; split. red in |- *; intro; apply F; apply FV_closb; assumption. elim M; intros Mv Mnv. split; simpl in |- *; red in |- *; simple induction 1; intro A. apply H0; symmetry in |- *; assumption. apply Mv; assumption. apply H1; symmetry in |- *; assumption. apply Mnv; assumption. simpl in |- *; assumption. Save TEp_RenExpGen. Goal forall (nx x : vari) (e ne : tm), rename nx x e ne -> nx = x \/ ~ FV nx e -> forall (H : ty_env) (s t : ty), TC ((x, s) :: H) e t -> TC ((nx, s) :: H) ne t. intros. change (TC (nil ++ (nx, s) :: H1) ne t) in |- *. apply TEp_RenExpGen with x e. assumption. elim H0; intro N. left; assumption. right; simpl in |- *; split. assumption. split; red in |- *; intro; assumption. simpl in |- *; assumption. Save TEp_RenExp. Goal forall (a e ne : tm) (A : OS_env) (n : vari) (t : ty), Ap a e A ne n t -> (forall x : vari, FV x e -> member vari x (OS_Dom A)) -> forall (H : ty_env) (r s : ty), TC H e (arr r s) -> TC ((n, t) :: H) ne s /\ r = t. simple induction 1; intros. specialize inv_TC_abs with (1 := H4). simple induction 1; simple induction 1; intros Ar Te. specialize subty_eq with (1 := Ar); simple induction 1; intros Q1 Q2. split. rewrite Q2. apply TEp_RenExp with v e0. assumption. specialize (Xmidvar nv v); simple induction 1; intro N. left; assumption. right; red in |- *; intro F; apply H0; apply H2; apply FV_abs; assumption. assumption. assumption. specialize inv_TC_clos with (1 := H4). simple induction 1; intros T1 T0. elim H1 with ((v, s) :: H3) r s0. intros T Q. specialize (ApNewVar a e0 ne0 (OScons v s e1 A0) n0 t0) with (1 := H0); intro M. split. apply TC_clos. change (TC (nil ++ (n0, t0) :: H3) e1 s) in |- *. apply TEp_nfvExt with H3. assumption. red in |- *; intro; apply M; simpl in |- *. right; apply H2; apply FV_closa; assumption. simpl in |- *; reflexivity. change (TC (nil ++ (v, s) :: (n0, t0) :: H3) ne0 s0) in |- *. apply TEp_swap with (nil ++ (n0, t0) :: (v, s) :: H3). red in |- *; intro; apply M. simpl in |- *; left; assumption. simpl in |- *; assumption. reflexivity. assumption. intros x F; simpl in |- *. specialize (Xmidvar x v); simple induction 1; intro N. left; symmetry in |- *; assumption. right; apply H2; apply FV_closb; assumption. assumption. Save TEp_Ap.
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinear4. Section Euclid. Context `{Ax1:euclidean_neutral_ruler_compass}. Lemma lemma_twolines : forall A B C D E F, Cut A B C D E -> Cut A B C D F -> nCol B C D -> eq E F. Proof. (* Goal: forall (A B C D E F : @Point Ax) (_ : @Cut Ax A B C D E) (_ : @Cut Ax A B C D F) (_ : @nCol Ax B C D), @eq Ax E F *) intros. (* Goal: @eq Ax E F *) assert ((BetS A E B /\ BetS C E D /\ nCol A B C /\ nCol A B D)) by (conclude_def Cut ). (* Goal: @eq Ax E F *) assert ((BetS A F B /\ BetS C F D /\ nCol A B C /\ nCol A B D)) by (conclude_def Cut ). (* Goal: @eq Ax E F *) assert (Col A E B) by (conclude_def Col ). (* Goal: @eq Ax E F *) assert (Col A B E) by (forward_using lemma_collinearorder). (* Goal: @eq Ax E F *) assert (Col A F B) by (conclude_def Col ). (* Goal: @eq Ax E F *) assert (Col A B F) by (forward_using lemma_collinearorder). (* Goal: @eq Ax E F *) assert (neq A B) by (forward_using lemma_betweennotequal). (* Goal: @eq Ax E F *) assert (Col B E F) by (conclude lemma_collinear4). (* Goal: @eq Ax E F *) assert (Col E F B) by (forward_using lemma_collinearorder). (* Goal: @eq Ax E F *) assert (Col C E D) by (conclude_def Col ). (* Goal: @eq Ax E F *) assert (Col C F D) by (conclude_def Col ). (* Goal: @eq Ax E F *) assert (Col C D F) by (forward_using lemma_collinearorder). (* Goal: @eq Ax E F *) assert (Col C D E) by (forward_using lemma_collinearorder). (* Goal: @eq Ax E F *) assert (neq C D) by (forward_using lemma_betweennotequal). (* Goal: @eq Ax E F *) assert (Col D E F) by (conclude lemma_collinear4). (* Goal: @eq Ax E F *) assert (Col E F D) by (forward_using lemma_collinearorder). (* Goal: @eq Ax E F *) assert (Col D C E) by (conclude lemma_collinear1). (* Goal: @eq Ax E F *) assert (Col D C F) by (conclude lemma_collinear1). (* Goal: @eq Ax E F *) assert (BetS D E C) by (conclude axiom_betweennesssymmetry). (* Goal: @eq Ax E F *) assert (neq D C) by (forward_using lemma_betweennotequal). (* Goal: @eq Ax E F *) assert (Col C E F) by (conclude lemma_collinear4). (* Goal: @eq Ax E F *) assert (Col E F C) by (forward_using lemma_collinearorder). (* Goal: @eq Ax E F *) assert (~ neq E F). (* Goal: @eq Ax E F *) (* Goal: not (@neq Ax E F) *) { (* Goal: not (@neq Ax E F) *) intro. (* Goal: False *) assert (Col F B C) by (conclude lemma_collinear4). (* Goal: False *) assert (Col F B D) by (conclude lemma_collinear4). (* Goal: False *) assert (~ eq F B). (* Goal: False *) (* Goal: not (@eq Ax F B) *) { (* Goal: not (@eq Ax F B) *) intro. (* Goal: False *) assert (Col F C D) by (conclude_def Col ). (* Goal: False *) assert (Col B C D) by (conclude cn_equalitysub). (* Goal: False *) contradict. (* BG Goal: @eq Ax E F *) (* BG Goal: False *) } (* Goal: False *) assert (Col B C D) by (conclude lemma_collinear4). (* Goal: False *) contradict. (* BG Goal: @eq Ax E F *) } (* Goal: @eq Ax E F *) close. Qed. End Euclid.
Require Import abp_base. Require Import abp_defs. Require Import abp_lem1. Require Import abp_lem2. Require Import abp_lem25. Theorem Lem20 : forall d : D, seq (ia frame c6 (tuple e0)) (Y1 d) = enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))) :>proc. Proof. (* Goal: forall d : D, @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) *) intros. (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) *) elim EXPH4. (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (alt (enc H (Lmer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim Lmers6. (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim LmerK. (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim CommTn_dK. (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim (SC3 (seq (Rn e0) (R i)) (K i)). (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim CommKRn. (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim (SC3 (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))). (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia frame s6 (tuple e0)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim CommTn_dRn. (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim CommKs6. (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt Delta (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim CommRns6. (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia frame s6 (tuple e0)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) pattern e0 at 1 2 in |- *. (* Goal: (fun b : bit => @eq proc (seq (ia frame c6 (tuple b)) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia frame s6 (tuple b)) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))))))))))))) e0 *) elimtype (toggle e1 = e0). (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e1))) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia frame s6 (tuple (toggle e1))) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim CommTn_ds6_b. (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e1))) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia frame c6 (tuple (toggle e1))) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i))))))))))))))) *) repeat elim A6. (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e1))) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia frame c6 (tuple (toggle e1))) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i))))))))))))))) *) repeat elim A6'. (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e1))) (Y1 d)) (seq (ia frame c6 (tuple (toggle e1))) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i)))))) *) elim Toggle2. (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (Y1 d)) (seq (ia frame c6 (tuple e0)) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i)))))) *) unfold Y1 in |- *. (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 (tuple e0)) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i)))))) *) elim (SC6 (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i))) (L i)). (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 (tuple e0)) (enc H (mer (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i))) (L i)))) *) elim SC7. (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (mer (seq (Rn e0) (R i)) (K i)) (L i))))) *) elim SC7. (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (mer (K i) (L i)))))) *) elim (SC6 (mer (K i) (L i)) (seq (Rn e0) (R i))). (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (mer (K i) (L i)) (seq (Rn e0) (R i)))))) *) elim SC7. (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 (tuple e0)) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) *) apply refl_equal. (* Goal: @eq bit (toggle e1) e0 *) elim Toggle2. (* Goal: @eq bit e0 e0 *) apply refl_equal. Qed. Theorem Lem21 : forall d : D, seq (ia frame c6 sce) (Y1 d) = enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))). Proof. (* Goal: forall d : D, @eq proc (seq (ia frame c6 sce) (Y1 d)) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) *) intros. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) *) elim EXPH4. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt (enc H (Lmer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia frame s6 sce) (L i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim Lmers6. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia frame s6 sce) (L i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim LmerK. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia frame s6 sce) (L i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia frame s6 sce) (L i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim CommTn_dK. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim (SC3 (seq (Rn e0) (R i)) (K i)). (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim CommKRn. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim (SC3 (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))). (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim CommTn_dRn. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim CommKs6. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt Delta (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim CommRns6. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))))))))))) *) elim CommTn_ds6_sce. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i))))))))))))))) *) repeat elim A6. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i))))))))))))))) *) repeat elim A6'. (* Goal: @eq proc (seq (ia frame c6 sce) (Y1 d)) (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i)))))) *) unfold Y1 in |- *. (* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i)))))) *) elim (SC6 (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i))) (L i)). (* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 sce) (enc H (mer (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (K i))) (L i)))) *) elim SC7. (* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (mer (seq (Rn e0) (R i)) (K i)) (L i))))) *) elim SC7. (* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (mer (K i) (L i)))))) *) elimtype (mer (K i) (mer (L i) (seq (Rn e0) (R i))) = mer (seq (Rn e0) (R i)) (mer (K i) (L i))). (* Goal: @eq proc (mer (K i) (mer (L i) (seq (Rn e0) (R i)))) (mer (seq (Rn e0) (R i)) (mer (K i) (L i))) *) (* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))) *) apply refl_equal. (* Goal: @eq proc (mer (K i) (mer (L i) (seq (Rn e0) (R i)))) (mer (seq (Rn e0) (R i)) (mer (K i) (L i))) *) elim (SC6 (mer (K i) (L i)) (seq (Rn e0) (R i))). (* Goal: @eq proc (mer (K i) (mer (L i) (seq (Rn e0) (R i)))) (mer (mer (K i) (L i)) (seq (Rn e0) (R i))) *) elim SC7. (* Goal: @eq proc (mer (K i) (mer (L i) (seq (Rn e0) (R i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))) *) apply refl_equal. Qed. Goal forall d : D, seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (seq (ia D s4 d) (Y2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e0)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e0))) (seq (ia one int i) (ia frame c6 sce))) (Y1 d)))))) = Y1 d. intros. pattern (Y1 d) at 2 in |- *. elim Lem13. elim Lem14. elim Lem15. elim Lem16. elim Lem17. elim Lem18. elim Lem19. elim Lem20. elim Lem21. elim A4. elim A5. elim A5. apply refl_equal. Save Lem22. Goal forall d : D, seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i))))) = X2 d. intros. unfold X2 in |- *. elim (EXPH4 (seq (Tn_d d e0) (seq (Sn e1) (S i)))). elim LmerTnd. elim LmerK. elim LmerL. elim Lmers5. elim (SC3 (L i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))). elim CommLs5. elim CommKL. elim CommKs5. elim (SC3 (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)). elim CommTn_dK. elim CommTn_dL. elim (SC3 (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))). elim CommTn_ds5. repeat elim A6. repeat elim A6'. apply refl_equal. Save Lem23. Goal forall d : D, alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))))) = enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))). intros. elim (EXPH4 (seq (Rn e0) (R i))). elim LmerRn. elim Lmeri. elim LmerTnd. elim LmerK. elim (SC3 (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)). elim CommTn_dK. elim (SC3 (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))). elim CommiRn. elim (SC3 (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))). elim CommTn_dRn. elim (SC3 (seq (Rn e0) (R i)) (K i)). elim CommKRn. elim (SC3 (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))). elim CommTn_di. elim CommiK. repeat elim A6. repeat elim A6'. apply refl_equal. Save Lem24. Goal forall d : D, seq (ia frame c6 (tuple e0)) Y = enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))). intros. elim EXPH4. elim LmerRn. elim Lmers6. elim LmerTnd. elim LmerK. elim (SC3 (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)). elim CommTn_dK. elim (SC3 (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))). elim CommTn_dRn. elim CommRns6. elim (SC3 (seq (Rn e0) (R i)) (K i)). elim CommKRn. elim CommKs6. elim CommTn_ds6_b'. repeat elim A6. repeat elim A6'. unfold Y in |- *. elim (SC6 (mer (seq (Sn e1) (S i)) (mer (seq (Rn e0) (R i)) (K i))) (L i)). elim SC7. elim SC7. elim (SC6 (mer (K i) (L i)) (seq (Rn e0) (R i))). elim SC7. apply refl_equal. Save Lem25. Goal forall d : D, seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (seq (Rn e0) (R i)) (K i))))) = enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)))). intros. elim (EXPH4 (seq (ia frame s6 sce) (L i))). elim LmerRn. elim Lmers6. elim LmerTnd. elim LmerK. elim (SC3 (seq (Tn_d d e0) (seq (Sn e1) (S i))) (K i)). elim CommTn_dK. elim (SC3 (seq (Rn e0) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))). elim CommTn_dRn. elim CommRns6. elim (SC3 (seq (Rn e0) (R i)) (K i)). elim CommKRn. elim CommKs6. elim CommTn_ds6_sce. repeat elim A6. repeat elim A6'. apply refl_equal. Save Lem26. Goal forall d : D, seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (seq (Rn e0) (R i)))))) = enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))). intros. elim (EXPH4 (L i)). elim LmerL. elim LmerSnd. elim LmerRn. elim LmerK. elim CommLRn. elim (SC3 (seq (Rn e0) (R i)) (K i)). elim CommKRn. elim CommSn_dK. elim (SC3 (L i) (seq (Sn_d d e0) (seq (Sn e1) (S i)))). elim CommSn_dL. elim (SC3 (L i) (K i)). elim CommKL. elim CommSn_dRn. repeat elim A6. repeat elim A6'. apply refl_equal. Save Lem27. Goal forall d : D, alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))))) = enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (seq (Rn e0) (R i))))). intros. elim (EXPH4 (seq (Tn_d d e0) (seq (Sn e1) (S i)))). elim LmerTnd. elim Lmeri. elim LmerL. elim LmerRn. elim CommTn_dRn. elim CommTn_dL. elim CommTn_di. elim CommLRn. elim CommiRn. elim CommiL. repeat elim A6. repeat elim A6'. apply refl_equal. Save Lem28. Goal forall d : D, seq (ia Frame c3 lce) (X2 d) = enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))). intros. elim EXPH4. elim Lmers3. elim LmerTnd. elim LmerL. elim LmerRn. elim CommLRn. elim CommTn_dL. elim CommTn_dRn. elim Comms3Tn_d. elim Comms3L. elim Comms3Rn_lce. repeat elim A6. repeat elim A6'. unfold X2 in |- *. elim (SC6 (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (seq (ia frame s5 (tuple e0)) (Rn e0)) (R i)))). elim SC7. elim (SC6 (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)). elim (SC6 (mer (K i) (seq (seq (ia frame s5 (tuple e0)) (Rn e0)) (R i))) (L i)). elim SC7. elim A5. apply refl_equal. Save Lem29. Goal forall d : D, seq (ia Frame c3 (Tuple e0 d)) (X2 d) = enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))). intros. elim EXPH4. elim Lmers3. elim LmerTnd. elim LmerL. elim LmerRn. elim CommLRn. elim CommTn_dL. elim CommTn_dRn. elim Comms3Tn_d. elim Comms3L. elim Comms3Rn_b'. repeat elim A6. repeat elim A6'. unfold X2 in |- *. elim (SC6 (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (K i))). elim SC7. elim (SC6 (mer (L i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (K i)). elim SC7. apply refl_equal. Save Lem30. Goal forall d : D, seq (ia frame c5 (tuple e0)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e0 d)))) (X2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y))) = X2 d. intros. pattern (X2 d) at 2 in |- *. elim Lem23. elim Lem24. elim Lem25. elim Lem26. elim Lem27. elim Lem28. elim Lem29. elim Lem30. elim (A1 (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (X2 d))) (seq (ia one int i) (seq (ia Frame c3 lce) (X2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e0)) Y))). elim A4. elim (A1 (seq (ia one int i) (seq (ia Frame c3 lce) (X2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (X2 d)))). elim A5. elim A5. apply refl_equal. Save Lem31. Goal forall d : D, seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i))))) = Y2 d. intros. unfold Y2 in |- *. elim (EXPH4 (seq (Tn_d d e1) (S i))). elim LmerTnd. elim LmerK. elim LmerL. elim Lmers5. elim (SC3 (L i) (seq (ia frame s5 (tuple e1)) (R i))). elim CommLs5. elim CommKL. elim CommKs5. elim (SC3 (seq (Tn_d d e1) (S i)) (K i)). elim CommTn_dK. elim CommTn_dL. elim (SC3 (seq (Tn_d d e1) (S i)) (seq (ia frame s5 (tuple e1)) (R i))). elim CommTn_ds5. repeat elim A6. repeat elim A6'. apply refl_equal. Save Lem33. Goal forall d : D, alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))))) = enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Tn_d d e1) (S i)) (K i)))). intros. elim (EXPH4 (R i)). elim Lmeri. elim LmerTnd. elim LmerK. pattern (R i) at 3 9 10 11 in |- *. elim ProcR. elim LmerRn. elim (SC3 (seq (Tn_d d e1) (S i)) (K i)). elim CommTn_dK. elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (K i)). elim CommKRn. elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))). elim CommiRn. elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))). elim CommTn_dRn. elim (SC3 (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))). elim CommTn_di. elim CommiK. repeat elim A6. repeat elim A6'. apply refl_equal. Save Lem34. Goal forall d : D, seq (ia frame c6 (tuple e1)) X = enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))). intros. elim EXPH4. pattern (R i) at 2 6 7 8 in |- *. elim ProcR. elim LmerRn. elim Lmers6. elim LmerTnd. elim LmerK. elim (SC3 (seq (Tn_d d e1) (S i)) (K i)). elim CommTn_dK. elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))). elim CommTn_dRn. elim CommRns6. elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (K i)). elim CommKRn. elim CommKs6. elim CommTn_ds6_b'. repeat elim A6. repeat elim A6'. unfold X in |- *. elim (SC6 (mer (S i) (mer (R i) (K i))) (L i)). elim SC7. elim SC7. elim (SC6 (mer (K i) (L i)) (R i)). elim SC7. apply refl_equal. Save Lem35. Goal forall d : D, seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i))))) = enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (seq (Tn_d d e1) (S i)) (K i)))). intros. elim (EXPH4 (seq (ia frame s6 sce) (L i))). pattern (R i) at 3 7 8 9 in |- *. elim ProcR. elim LmerRn. elim Lmers6. elim LmerTnd. elim LmerK. elim (SC3 (seq (Tn_d d e1) (S i)) (K i)). elim CommTn_dK. elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))). elim CommTn_dRn. elim CommRns6. elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (K i)). elim CommKRn. elim CommKs6. elim CommTn_ds6_sce. repeat elim A6. repeat elim A6'. apply refl_equal. Save Lem36. Goal forall d : D, seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i))))) = enc H (mer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (R i) (K i)))). intros. elim (EXPH4 (L i)). elim LmerL. elim LmerSnd. pattern (R i) at 2 4 5 8 in |- *. elim ProcR. elim LmerRn. elim LmerK. elim CommLRn. elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (K i)). elim CommKRn. elim CommSn_dK. elim (SC3 (L i) (seq (Sn_d d e1) (S i))). elim CommSn_dL. elim (SC3 (L i) (K i)). elim CommKL. elim CommSn_dRn. repeat elim A6. repeat elim A6'. apply refl_equal. Save Lem37. Goal forall d : D, alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))))) = enc H (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (L i) (R i)))). intros. elim (EXPH4 (seq (Tn_d d e1) (S i))). elim LmerTnd. elim Lmeri. elim LmerL. pattern (R i) at 5 6 8 11 in |- *. elim ProcR. elim LmerRn. elim CommTn_dRn. elim CommTn_dL. elim CommTn_di. elim CommLRn. elim CommiRn. elim CommiL. repeat elim A6. repeat elim A6'. apply refl_equal. Save Lem38. Goal forall d : D, seq (ia Frame c3 lce) (Y2 d) = enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))). intros. elim EXPH4. elim Lmers3. elim LmerTnd. elim LmerL. pattern (R i) at 1 2 4 7 in |- *. elim ProcR. elim LmerRn. elim CommLRn. elim CommTn_dL. elim CommTn_dRn. elim Comms3Tn_d. elim Comms3L. elim Comms3Rn_lce. repeat elim A6. repeat elim A6'. unfold Y2 in |- *. elim (SC6 (mer (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (seq (ia frame s5 (tuple e1)) (Rn e1)) (seq (Rn e0) (R i))))). elim SC7. elim (SC6 (seq (ia frame s5 (tuple e1)) (R i)) (L i)). elim (SC6 (mer (K i) (seq (seq (ia frame s5 (tuple e1)) (Rn e1)) (seq (Rn e0) (R i)))) (L i)). elim SC7. elim A5. pattern (R i) at 1 in |- *. elim ProcR. apply refl_equal. Save Lem39. Goal forall d : D, seq (ia Frame c3 (Tuple e1 d)) (Y2 d) = enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (R i)))). intros. elim EXPH4. elim Lmers3. elim LmerTnd. elim LmerL. pattern (R i) at 1 2 4 7 in |- *. elim ProcR. elim LmerRn. elim CommLRn. elim CommTn_dL. elim CommTn_dRn. elim Comms3Tn_d. elim Comms3L. elim Comms3Rn_b'. repeat elim A6. repeat elim A6'. unfold Y2 in |- *. elim (SC6 (mer (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (K i))). elim SC7. elim (SC6 (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))) (K i)). elim SC7. pattern (R i) at 1 in |- *. elim ProcR. apply refl_equal. Save Lem40. Goal forall d : D, seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (seq (alt (seq (ia one int i) (ia Frame c3 lce)) (seq (ia one int i) (ia Frame c3 (Tuple e1 d)))) (Y2 d))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X))) = Y2 d. intros. pattern (Y2 d) at 2 in |- *. elim Lem33. elim Lem34. elim Lem35. elim Lem36. elim Lem37. elim Lem38. elim Lem39. elim Lem40. elim (A1 (seq (ia one int i) (seq (ia frame c6 sce) (seq (ia Frame c2 (Tuple e1 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))))))) (seq (ia one int i) (seq (ia frame c6 (tuple e1)) X))). elim A4. elim (A1 (seq (ia one int i) (seq (ia Frame c3 lce) (Y2 d))) (seq (ia one int i) (seq (ia Frame c3 (Tuple e1 d)) (Y2 d)))). elim A5. elim A5. apply refl_equal. Save Lem41.
Require Import abp_base. Require Import abp_defs. Require Import abp_lem1. Theorem Lem1 : D + (fun d : D => seq (ia D r1 d) (X1 d)) = X. Proof. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) X *) unfold X at 1 in |- *. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (enc H (mer (S i) (mer (K i) (mer (L i) (R i))))) *) elim ProcS; elim ProcR. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (enc H (mer (seq (Sn e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))) *) elim EXPH4. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (alt (enc H (Lmer (seq (Sn e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))) (alt (enc H (Lmer (K i) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))) (alt (enc H (Lmer (L i) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (mer (K i) (seq (Rn e1) (seq (Rn e0) (R i))))))) (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim LmerSn. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) (alt (enc H (Lmer (K i) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))) (alt (enc H (Lmer (L i) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (mer (K i) (seq (Rn e1) (seq (Rn e0) (R i))))))) (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim LmerK. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) (alt Delta (alt (enc H (Lmer (L i) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (mer (K i) (seq (Rn e1) (seq (Rn e0) (R i))))))) (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim LmerL. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim CommLRn. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim CommKL. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim CommKRn. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim CommSnK. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (Rn e1) (seq (Rn e0) (R i)))))) (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim CommSnL. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (Sn e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim CommSnRn. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta Delta))))))))) *) repeat elim A6. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) *) elim (A6 (D + (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i)))))))))). (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (X1 d))) (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) *) unfold X1 in |- *. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i))))))) (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) *) pattern (R i) at 1 in |- *. (* Goal: (fun p : proc => @eq proc (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) p)))))) (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i)))))))))) (R i) *) elim ProcR. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (seq (Rn e1) (seq (Rn e0) (R i))))))))) *) apply refl_equal. Qed. Theorem Lem2 : D + (fun d : D => seq (ia D r1 d) (Y1 d)) = Y. Proof. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) Y *) unfold Y in |- *. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (enc H (mer (seq (Sn e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))) *) elim ProcS. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (enc H (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))) *) elim EXPH4. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (alt (enc H (Lmer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (K i) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (L i) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) elim LmerSn. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) (alt (enc H (Lmer (K i) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (L i) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) elim LmerK. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (enc H (Lmer (L i) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) elim LmerL. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) elim CommLRn. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) elim CommKL. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) elim CommKRn. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) elim CommSnK. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) elim CommSnL. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (Sn e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) elim CommSnRn. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (alt (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta Delta))))))))) *) repeat elim A6. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) *) elim (A6 (D + (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))))). (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (Y1 d))) (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) *) unfold Y1 in |- *. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) *) pattern (S i) at 1 in |- *. (* Goal: (fun p : proc => @eq proc (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) p) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))))))) (S i) *) elim ProcS. (* Goal: @eq proc (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) (sum D (fun d : D => seq (ia D r1 d) (enc H (mer (seq (Sn_d d e1) (seq (Sn e0) (seq (Sn e1) (S i)))) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))))) *) apply refl_equal. Qed. Theorem Lem3 : forall d : D, seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i))))) = X1 d. Proof. (* Goal: forall d : D, @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (X1 d) *) intro. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (X1 d) *) unfold X1 at 1 in |- *. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i))))) *) elim (EXPH4 (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i) (L i) (R i) H). (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt (enc H (Lmer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i))))) (alt (enc H (Lmer (K i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (K i) (R i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (R i)))) (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (K i) (L i))))))))))))) *) elim LmerSnd. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt (enc H (Lmer (K i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (K i) (R i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (R i)))) (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (K i) (L i))))))))))))) *) elim LmerK. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (K i) (R i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (R i)))) (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (K i) (L i))))))))))))) *) elim LmerL. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (R i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (K i) (R i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (R i)))) (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (K i) (L i))))))))))))) *) pattern (R i) at 2 3 5 8 in |- *. (* Goal: (fun p : proc => @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer p (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) p) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (K i) p) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (R i)))) (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) p) (mer (K i) (L i)))))))))))))) (R i) *) elim ProcR. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (R i)))) (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (R i)))) (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim CommLRn. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (R i)))) (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim CommKL. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (R i)))) (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim CommKRn. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (R i)))) (enc H (Lmer (comm (seq (Sn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim ProcSn_d. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (seq (ia Frame s2 (Tuple e0 d)) (Tn_d d e0)) (seq (Sn e1) (S i))) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (seq (ia Frame s2 (Tuple e0 d)) (Tn_d d e0)) (seq (Sn e1) (S i))) (L i)) (mer (K i) (R i)))) (enc H (Lmer (comm (seq (seq (ia Frame s2 (Tuple e0 d)) (Tn_d d e0)) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim A5. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s2 (Tuple e0 d)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (K i)) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s2 (Tuple e0 d)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (L i)) (mer (K i) (R i)))) (enc H (Lmer (comm (seq (ia Frame s2 (Tuple e0 d)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim Comms2K. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s2 (Tuple e0 d)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (L i)) (mer (K i) (R i)))) (enc H (Lmer (comm (seq (ia Frame s2 (Tuple e0 d)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (L i))))))))))))) *) elim Comms2Rn. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s2 (Tuple e0 d)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (L i)) (mer (K i) (R i)))) Delta))))))))) *) elim Comms2L. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (R i))))) (alt Delta Delta))))))))) *) repeat elim A6. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (R i)))))))))))) *) repeat elim A6'. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (R i))))) *) elim SC7. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) *) apply refl_equal. Qed. Theorem Lem4 : forall d : D, alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) = enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))). Proof. (* Goal: forall d : D, @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i))))) *) intros. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i))))) *) elim (EXPH4 (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i) (R i)). (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))))) (alt (enc H (Lmer (comm (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (enc H (Lmer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))))) (alt (enc H (Lmer (comm (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i))))))))))))) *) elim LmerL. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (enc H (Lmer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) (alt Delta (alt (enc H (Lmer (R i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))))) (alt (enc H (Lmer (comm (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i))))))))))))) *) elim A4. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (enc H (Lmer (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) (alt Delta (alt (enc H (Lmer (R i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i)))))) (alt (enc H (Lmer (comm (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (L i))))))))))))) *) elim A5. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (enc H (Lmer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) (alt Delta (alt (enc H (Lmer (R i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (L i))))))))))))) *) elim A5. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (enc H (Lmer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) (alt Delta (alt (enc H (Lmer (R i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim Lmeri. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (enc H (Lmer (R i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) pattern (R i) at 5 6 8 11 in |- *. (* Goal: (fun p : proc => @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (enc H (Lmer p (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))) (alt (enc H (Lmer (comm (L i) p) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) p) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) p) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)))))))))))))) (R i) *) elim ProcR. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim CommLRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim CommiL. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim CommiRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (R i)))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim CommTn_dL. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (R i)))) (alt Delta (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim CommTn_di. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e0 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim CommTn_dRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta Delta))))))))) *) repeat elim A6. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt Delta (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))))) *) repeat elim A6'. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))))) *) apply refl_equal. Qed. Theorem Lem5 : forall d : D, seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) = enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))). Proof. (* Goal: forall d : D, @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) *) intros. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) *) elim (EXPH4 (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i) (R i)). (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt (enc H (Lmer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (ia Frame s3 lce) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim Lmers3. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (ia Frame s3 lce) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim LmerL. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) pattern (R i) at 2 3 5 8 in |- *. (* Goal: (fun p : proc => @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer p (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (comm (L i) p) (mer (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) p) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) p) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))))))))))) (R i) *) elim ProcR. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim CommLRn. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim CommTn_dL. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim CommTn_dRn. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim Comms3Tn_d. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim Comms3L. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim Comms3Rn_lce. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 lce) (enc H (mer (mer (K i) (seq (seq (ia frame s5 (tuple e1)) (Rn e1)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))))))))))) *) repeat elim A6'. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (seq (ia Frame c3 lce) (enc H (mer (mer (K i) (seq (seq (ia frame s5 (tuple e1)) (Rn e1)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) *) repeat elim A6. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (seq (ia Frame c3 lce) (enc H (mer (mer (K i) (seq (seq (ia frame s5 (tuple e1)) (Rn e1)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) *) elim SC7. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (seq (ia frame s5 (tuple e1)) (Rn e1)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) pattern (R i) at 1 in |- *. (* Goal: (fun p : proc => @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) p) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (seq (ia frame s5 (tuple e1)) (Rn e1)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))) (R i) *) elim ProcR. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (seq (ia frame s5 (tuple e1)) (Rn e1)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) elim A5. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) apply refl_equal. Qed. Theorem Lem6 : forall d : D, seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) = enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))). Proof. (* Goal: forall d : D, @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) *) intros. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) *) elim (EXPH4 (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i) (R i)). (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt (enc H (Lmer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim Lmers3. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (L i) (R i))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i))))) (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim LmerL. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (R i) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (comm (L i) (R i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) pattern (R i) at 1 2 3 5 8 in |- *. (* Goal: (fun p : proc => @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) p))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer p (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (comm (L i) p) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) p) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) p) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))))))))))) (R i) *) elim ProcR. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim CommLRn. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (R i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim CommTn_dL. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim CommTn_dRn. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (L i) (R i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim Comms3Tn_d. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (L i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (R i)))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim Comms3L. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e0 d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) pattern e0 at 6 in |- *. (* Goal: (fun b : bit => @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia Frame s3 (Tuple b d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))))))))))) e0 *) elimtype (toggle e1 = e0). (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia Frame s3 (Tuple (toggle e1) d)) (K i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))) *) elim Comms3Rn_b. (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple (toggle e1) d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple (toggle e1))) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))))))))) *) repeat elim A6'. (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (seq (ia Frame c3 (Tuple (toggle e1) d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple (toggle e1))) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) elim Toggle2. (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) pattern (R i) at 2 in |- *. (* Goal: @eq bit (toggle e1) e0 *) (* Goal: (fun p : proc => @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) p))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))) (R i) *) elim ProcR. (* Goal: @eq bit (toggle e1) e0 *) (* Goal: @eq proc (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) apply refl_equal. (* Goal: @eq bit (toggle e1) e0 *) elim Toggle2. (* Goal: @eq bit e0 e0 *) apply refl_equal. Qed. Theorem Lem7 : forall d : D, seq (ia D s4 d) (X2 d) = enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))). Proof. (* Goal: forall d : D, @eq proc (seq (ia D s4 d) (X2 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) *) intros. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) *) elim EXPH4. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (alt (enc H (Lmer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i))))) (alt (enc H (Lmer (L i) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))))))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim LmerK. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (alt Delta (alt (enc H (Lmer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i))))) (alt (enc H (Lmer (L i) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))))))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim Lmers4. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i))))) (alt (enc H (Lmer (L i) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))))))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt (enc H (Lmer (L i) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))))))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim LmerL. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))))))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim CommTn_dL. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim CommTn_ds4. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim CommLs4. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim CommKs4. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim CommTn_dK. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim CommKL. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta Delta))))))))) *) repeat elim A6. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (alt Delta (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))) *) repeat elim A6'. (* Goal: @eq proc (seq (ia D s4 d) (X2 d)) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) unfold X2 in |- *. (* Goal: @eq proc (seq (ia D s4 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)))))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) elim (SC6 (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)). (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) elim (SC6 (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)) (K i)). (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)) (K i))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) elim (SC6 (mer (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))). (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (mer (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)) (K i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) elim SC7. (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) elim SC7. (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (L i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) elim (SC6 (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (L i)). (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (L i))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) elim SC7. (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))))) *) apply refl_equal. Qed. Theorem Lem8 : forall d : D, seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) = enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))). Proof. (* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) *) intros. (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) *) elim (EXPH4 (K i) (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)). (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i))))) (alt (enc H (Lmer (L i) (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim LmerK. (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt (enc H (Lmer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i))))) (alt (enc H (Lmer (L i) (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim LmerL. (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt (enc H (Lmer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i))))) (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim Lmers5. (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt Delta (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i))))) (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)) (mer (K i) (seq (ia frame s5 (tuple e1)) (R i))))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim CommTn_dL. (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim CommTn_ds5. (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim CommLs5. (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim CommKs5. (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e1)) (R i)) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))))))))) *) elim CommKL. (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)))) Delta))))))))) *) elim CommTn_dK. (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt Delta Delta))))))))) *) repeat elim A6. (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))))))))) *) repeat elim A6'. (* Goal: @eq proc (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) *) apply refl_equal. Qed. Theorem Lem9 : forall d : D, alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) = enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))). Proof. (* Goal: forall d : D, @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) *) intros. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) *) elim (EXPH4 (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))). (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt (enc H (Lmer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (K i) (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))))))))))) *) elim Lmeri. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt (enc H (Lmer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt (enc H (Lmer (K i) (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))))))))))) *) elim LmerK. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt (enc H (Lmer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt (enc H (Lmer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))))))))))) *) pattern (R i) at 3 9 10 11 in |- *. (* Goal: (fun p : proc => @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt (enc H (Lmer p (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm p (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm p (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm p (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)))))))))))))) (R i) *) elim ProcR. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))))))))))) *) elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))). (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))))))))))) *) elim CommTn_dRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) Delta))))))))) *) elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (K i)). (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) Delta))))))))) *) elim CommKRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt Delta Delta))))))))) *) elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))). (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt Delta Delta))))))))) *) elim CommiRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))) (alt Delta (alt Delta Delta))))))))) *) elim (SC3 (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))). (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (R i) (K i)))) (alt Delta (alt Delta Delta))))))))) *) elim CommTn_di. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt Delta (alt Delta (alt Delta Delta))))))))) *) elim CommTn_dK. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt Delta (alt Delta (alt Delta Delta))))))))) *) elim CommiK. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta Delta))))))))) *) repeat elim A6. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt Delta (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))))) *) repeat elim A6'. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))))) *) apply refl_equal. Qed.
Require Import Coq.Arith.Arith Coq.NArith.NArith Coq.ZArith.ZArith. Lemma N_to_Z_to_nat: forall (a: N), Z.to_nat (Z.of_N a) = N.to_nat a. Proof. (* Goal: forall a : N, @eq nat (Z.to_nat (Z.of_N a)) (N.to_nat a) *) intros. (* Goal: @eq nat (Z.to_nat (Z.of_N a)) (N.to_nat a) *) rewrite <- (N2Z.id a) at 2. (* Goal: @eq nat (Z.to_nat (Z.of_N a)) (N.to_nat (Z.to_N (Z.of_N a))) *) rewrite Z_N_nat. (* Goal: @eq nat (Z.to_nat (Z.of_N a)) (Z.to_nat (Z.of_N a)) *) reflexivity. Qed. Module N2Nat. Lemma inj_mod: forall (a b: N), (b <> 0)%N -> N.to_nat (a mod b)%N = (N.to_nat a) mod (N.to_nat b). Proof. (* Goal: forall (a b : N) (_ : not (@eq N b N0)), @eq nat (N.to_nat (N.modulo a b)) (Nat.modulo (N.to_nat a) (N.to_nat b)) *) intros. (* Goal: @eq nat (N.to_nat (N.modulo a b)) (Nat.modulo (N.to_nat a) (N.to_nat b)) *) rewrite <-? N_to_Z_to_nat. (* Goal: @eq nat (Z.to_nat (Z.of_N (N.modulo a b))) (Nat.modulo (Z.to_nat (Z.of_N a)) (Z.to_nat (Z.of_N b))) *) rewrite N2Z.inj_mod by assumption. (* Goal: @eq nat (Z.to_nat (Z.modulo (Z.of_N a) (Z.of_N b))) (Nat.modulo (Z.to_nat (Z.of_N a)) (Z.to_nat (Z.of_N b))) *) apply Nat2Z.inj. (* Goal: @eq Z (Z.of_nat (Z.to_nat (Z.modulo (Z.of_N a) (Z.of_N b)))) (Z.of_nat (Nat.modulo (Z.to_nat (Z.of_N a)) (Z.to_nat (Z.of_N b)))) *) rewrite Zdiv.mod_Zmod. (* Goal: not (@eq nat (Z.to_nat (Z.of_N b)) O) *) (* Goal: @eq Z (Z.of_nat (Z.to_nat (Z.modulo (Z.of_N a) (Z.of_N b)))) (Z.modulo (Z.of_nat (Z.to_nat (Z.of_N a))) (Z.of_nat (Z.to_nat (Z.of_N b)))) *) - (* Goal: @eq Z (Z.of_nat (Z.to_nat (Z.modulo (Z.of_N a) (Z.of_N b)))) (Z.modulo (Z.of_nat (Z.to_nat (Z.of_N a))) (Z.of_nat (Z.to_nat (Z.of_N b)))) *) rewrite? Z2Nat.id; try apply N2Z.is_nonneg. (* Goal: Z.le Z0 (Z.modulo (Z.of_N a) (Z.of_N b)) *) (* Goal: @eq Z (Z.modulo (Z.of_N a) (Z.of_N b)) (Z.modulo (Z.of_N a) (Z.of_N b)) *) + (* Goal: @eq Z (Z.modulo (Z.of_N a) (Z.of_N b)) (Z.modulo (Z.of_N a) (Z.of_N b)) *) reflexivity. (* BG Goal: not (@eq nat (Z.to_nat (Z.of_N b)) O) *) (* BG Goal: Z.le Z0 (Z.modulo (Z.of_N a) (Z.of_N b)) *) + (* Goal: Z.le Z0 (Z.modulo (Z.of_N a) (Z.of_N b)) *) pose proof (Z.mod_pos_bound (Z.of_N a) (Z.of_N b)) as Q. (* Goal: Z.le Z0 (Z.modulo (Z.of_N a) (Z.of_N b)) *) destruct Q as [Q _]. (* Goal: Z.le Z0 (Z.modulo (Z.of_N a) (Z.of_N b)) *) (* Goal: Z.lt Z0 (Z.of_N b) *) * (* Goal: Z.lt Z0 (Z.of_N b) *) destruct b; try contradiction. (* Goal: Z.lt Z0 (Z.of_N (Npos p)) *) simpl. (* Goal: Z.lt Z0 (Zpos p) *) constructor. (* BG Goal: not (@eq nat (Z.to_nat (Z.of_N b)) O) *) (* BG Goal: Z.le Z0 (Z.modulo (Z.of_N a) (Z.of_N b)) *) * (* Goal: Z.le Z0 (Z.modulo (Z.of_N a) (Z.of_N b)) *) exact Q. (* BG Goal: not (@eq nat (Z.to_nat (Z.of_N b)) O) *) - (* Goal: not (@eq nat (Z.to_nat (Z.of_N b)) O) *) destruct b; try contradiction. (* Goal: not (@eq nat (Z.to_nat (Z.of_N (Npos p))) O) *) simpl. (* Goal: not (@eq nat (Pos.to_nat p) O) *) pose proof (Pos2Nat.is_pos p) as Q. (* Goal: not (@eq nat (Pos.to_nat p) O) *) omega. Qed. End N2Nat. Module Nat2Z. Lemma inj_pow: forall n m : nat, Z.of_nat (n ^ m) = (Z.of_nat n ^ Z.of_nat m)%Z. Proof. (* Goal: forall n m : nat, @eq Z (Z.of_nat (Nat.pow n m)) (Z.pow (Z.of_nat n) (Z.of_nat m)) *) intros. (* Goal: @eq Z (Z.of_nat (Nat.pow n m)) (Z.pow (Z.of_nat n) (Z.of_nat m)) *) induction m. (* Goal: @eq Z (Z.of_nat (Nat.pow n (S m))) (Z.pow (Z.of_nat n) (Z.of_nat (S m))) *) (* Goal: @eq Z (Z.of_nat (Nat.pow n O)) (Z.pow (Z.of_nat n) (Z.of_nat O)) *) - (* Goal: @eq Z (Z.of_nat (Nat.pow n O)) (Z.pow (Z.of_nat n) (Z.of_nat O)) *) reflexivity. (* BG Goal: @eq Z (Z.of_nat (Nat.pow n (S m))) (Z.pow (Z.of_nat n) (Z.of_nat (S m))) *) - (* Goal: @eq Z (Z.of_nat (Nat.pow n (S m))) (Z.pow (Z.of_nat n) (Z.of_nat (S m))) *) rewrite Nat2Z.inj_succ. (* Goal: @eq Z (Z.of_nat (Nat.pow n (S m))) (Z.pow (Z.of_nat n) (Z.succ (Z.of_nat m))) *) rewrite Z.pow_succ_r by (apply Nat2Z.is_nonneg). (* Goal: @eq Z (Z.of_nat (Nat.pow n (S m))) (Z.mul (Z.of_nat n) (Z.pow (Z.of_nat n) (Z.of_nat m))) *) rewrite <- IHm. (* Goal: @eq Z (Z.of_nat (Nat.pow n (S m))) (Z.mul (Z.of_nat n) (Z.of_nat (Nat.pow n m))) *) rewrite <- Nat2Z.inj_mul. (* Goal: @eq Z (Z.of_nat (Nat.pow n (S m))) (Z.of_nat (Init.Nat.mul n (Nat.pow n m))) *) reflexivity. Qed. End Nat2Z. Module Z2Nat. Lemma inj_pow: forall n m : Z, (0 <= n)%Z -> (0 <= m)%Z -> Z.to_nat (n ^ m) = Z.to_nat n ^ Z.to_nat m. End Z2Nat.
Require Export GeoCoq.Elements.OriginalProofs.lemma_ray1. Require Export GeoCoq.Elements.OriginalProofs.lemma_raystrict. Require Export GeoCoq.Elements.OriginalProofs.lemma_ray4. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma lemma_ray5 : forall A B C, Out A B C -> Out A C B. Proof. (* Goal: forall (A B C : @Point Ax0) (_ : @Out Ax0 A B C), @Out Ax0 A C B *) intros. (* Goal: @Out Ax0 A C B *) assert ((BetS A C B \/ eq B C \/ BetS A B C)) by (conclude lemma_ray1). (* Goal: @Out Ax0 A C B *) assert (neq A C) by (conclude lemma_raystrict). (* Goal: @Out Ax0 A C B *) assert (Out A C B) by (conclude lemma_ray4). (* Goal: @Out Ax0 A C B *) close. Qed. End Euclid.
Require Import basis. Require Import part1. Require Import part2. Theorem Triangle_axioms_i : forall t : Triangle, Apart (origin (base t)) (ln (Side2 t)). Proof. (* Goal: forall t : Triangle, Apart (origin (base t)) (ln (Side2 t)) *) intro t. (* Goal: Apart (origin (base t)) (ln (Side2 t)) *) generalize (thm4_3d t); intro H'. (* Goal: Apart (origin (base t)) (ln (Side2 t)) *) lapply (el_ax (base t) (ln (base t)) (ln (Side2 t))); trivial. (* Goal: forall _ : or (or (Apart (origin (base t)) (ln (base t))) (Apart (extremity (base t)) (ln (base t)))) (or (Apart (origin (base t)) (ln (Side2 t))) (Apart (extremity (base t)) (ln (Side2 t)))), Apart (origin (base t)) (ln (Side2 t)) *) intro H. (* Goal: Apart (origin (base t)) (ln (Side2 t)) *) elim H; intro H'0; clear H. (* Goal: Apart (origin (base t)) (ln (Side2 t)) *) (* Goal: Apart (origin (base t)) (ln (Side2 t)) *) generalize (inc_ln2 (base t)); generalize (inc_ln1 (base t)). (* Goal: Apart (origin (base t)) (ln (Side2 t)) *) (* Goal: forall (_ : Incident (origin (base t)) (ln (base t))) (_ : Incident (extremity (base t)) (ln (base t))), Apart (origin (base t)) (ln (Side2 t)) *) unfold Incident in |- *; tauto. (* Goal: Apart (origin (base t)) (ln (Side2 t)) *) generalize H'0; clear H'0. (* Goal: forall _ : or (Apart (origin (base t)) (ln (Side2 t))) (Apart (extremity (base t)) (ln (Side2 t))), Apart (origin (base t)) (ln (Side2 t)) *) rewrite (auxs2 t). (* Goal: forall _ : or (Apart (origin (base t)) (ln (Side2 t))) (Apart (extremity (Side2 t)) (ln (Side2 t))), Apart (origin (base t)) (ln (Side2 t)) *) intro H'2. (* Goal: Apart (origin (base t)) (ln (Side2 t)) *) elim H'2; [ trivial | intro H'0; clear H'2 ]. (* Goal: Apart (origin (base t)) (ln (Side2 t)) *) elim (inc_ln2 (Side2 t)); trivial. Qed. Theorem Triangle_axioms_ii : forall t : Triangle, Apart (extremity (base t)) (ln (reverse (Side1 t))). Proof. (* Goal: forall t : Triangle, Apart (extremity (base t)) (ln (reverse (Side1 t))) *) intro t. (* Goal: Apart (extremity (base t)) (ln (reverse (Side1 t))) *) generalize (thm4_3c t); intro H'. (* Goal: Apart (extremity (base t)) (ln (reverse (Side1 t))) *) lapply (el_ax (base t) (ln (base t)) (ln (reverse (Side1 t)))); trivial. (* Goal: DiLn (ln (base t)) (ln (reverse (Side1 t))) *) (* Goal: forall _ : or (or (Apart (origin (base t)) (ln (base t))) (Apart (extremity (base t)) (ln (base t)))) (or (Apart (origin (base t)) (ln (reverse (Side1 t)))) (Apart (extremity (base t)) (ln (reverse (Side1 t))))), Apart (extremity (base t)) (ln (reverse (Side1 t))) *) intro H; elim H; (clear H; intro H'0). (* Goal: DiLn (ln (base t)) (ln (reverse (Side1 t))) *) (* Goal: Apart (extremity (base t)) (ln (reverse (Side1 t))) *) (* Goal: Apart (extremity (base t)) (ln (reverse (Side1 t))) *) generalize (inc_ln2 (base t)); generalize (inc_ln1 (base t)). (* Goal: DiLn (ln (base t)) (ln (reverse (Side1 t))) *) (* Goal: Apart (extremity (base t)) (ln (reverse (Side1 t))) *) (* Goal: forall (_ : Incident (origin (base t)) (ln (base t))) (_ : Incident (extremity (base t)) (ln (base t))), Apart (extremity (base t)) (ln (reverse (Side1 t))) *) unfold Incident in |- *; tauto. (* Goal: DiLn (ln (base t)) (ln (reverse (Side1 t))) *) (* Goal: Apart (extremity (base t)) (ln (reverse (Side1 t))) *) elim H'0; [ intro H'1; clear H'0 | trivial ]. (* Goal: DiLn (ln (base t)) (ln (reverse (Side1 t))) *) (* Goal: Apart (extremity (base t)) (ln (reverse (Side1 t))) *) generalize (inc_ln1 (reverse (Side1 t))). (* Goal: DiLn (ln (base t)) (ln (reverse (Side1 t))) *) (* Goal: forall _ : Incident (origin (reverse (Side1 t))) (ln (reverse (Side1 t))), Apart (extremity (base t)) (ln (reverse (Side1 t))) *) rewrite <- (ext_rev (Side1 t)). (* Goal: DiLn (ln (base t)) (ln (reverse (Side1 t))) *) (* Goal: forall _ : Incident (extremity (Side1 t)) (ln (reverse (Side1 t))), Apart (extremity (base t)) (ln (reverse (Side1 t))) *) rewrite <- (auxs1 t). (* Goal: DiLn (ln (base t)) (ln (reverse (Side1 t))) *) (* Goal: forall _ : Incident (origin (base t)) (ln (reverse (Side1 t))), Apart (extremity (base t)) (ln (reverse (Side1 t))) *) intro H'3; elim H'3; auto. (* Goal: DiLn (ln (base t)) (ln (reverse (Side1 t))) *) apply cong_eqln_diln with (m := ln (Side1 t)); auto. Qed. Theorem Triangle_axioms_iii : forall t : Triangle, Apart (summit t) (ln (reverse (base t))). Proof. (* Goal: forall t : Triangle, Apart (summit t) (ln (reverse (base t))) *) intro t; elim t. (* Goal: forall (summit0 : Point) (base0 : Segment) (Tri_cond : Apart summit0 (ln base0)), Apart (summit (Tri summit0 base0 Tri_cond)) (ln (reverse (base (Tri summit0 base0 Tri_cond)))) *) intros summit base Tri_cond. (* Goal: Apart (basis.summit (Tri summit base Tri_cond)) (ln (reverse (basis.base (Tri summit base Tri_cond)))) *) apply cong_eqln_apt with (l := ln base); auto. Qed. Hint Resolve Triangle_axioms_i Triangle_axioms_ii Triangle_axioms_iii. Theorem thm4_5ia : forall (x : Segment) (l : Line), EqLn l (ln x) -> Incident (origin x) l /\ Incident (extremity x) l. Proof. (* Goal: forall (x : Segment) (l : Line) (_ : EqLn l (ln x)), and (Incident (origin x) l) (Incident (extremity x) l) *) unfold EqLn, Incident, Negation in |- *. (* Goal: forall (x : Segment) (l : Line) (_ : not (DiLn l (ln x))), and (not (Apart (origin x) l)) (not (Apart (extremity x) l)) *) intuition. Qed. Theorem thm4_5ib : forall (x : Segment) (l : Line), Incident (origin x) l /\ Incident (extremity x) l -> EqLn l (ln x). Proof. (* Goal: forall (x : Segment) (l : Line) (_ : and (Incident (origin x) l) (Incident (extremity x) l)), EqLn l (ln x) *) generalize Uniqueness_of_constructed_lines; intuition. Qed. Hint Resolve thm4_1c thm4_1d. Theorem thm4_5iia : forall (x : Twolines) (a : Point), EqPt a (pt x) -> Incident a (line1 x) /\ Incident a (line2 x). Proof. (* Goal: forall (x : Twolines) (a : Point) (_ : EqPt a (pt x)), and (Incident a (line1 x)) (Incident a (line2 x)) *) split; apply cong_eqpt_inc with (a := pt x); auto. Qed. Theorem thm4_5iib : forall (x : Twolines) (a : Point), Incident a (line1 x) /\ Incident a (line2 x) -> EqPt a (pt x). Proof. (* Goal: forall (x : Twolines) (a : Point) (_ : and (Incident a (line1 x)) (Incident a (line2 x))), EqPt a (pt x) *) intuition. (* Goal: EqPt a (pt x) *) apply Uniqueness_of_constructed_points; trivial. Qed. Theorem thm4_6 : forall x y : Segment, Incident (origin x) (ln y) /\ Incident (extremity x) (ln y) -> Incident (origin y) (ln x) /\ Incident (extremity y) (ln x). Proof. (* Goal: forall (x y : Segment) (_ : and (Incident (origin x) (ln y)) (Incident (extremity x) (ln y))), and (Incident (origin y) (ln x)) (Incident (extremity y) (ln x)) *) unfold Incident in |- *. (* Goal: forall (x y : Segment) (_ : and (not (Apart (origin x) (ln y))) (not (Apart (extremity x) (ln y)))), and (not (Apart (origin y) (ln x))) (not (Apart (extremity y) (ln x))) *) intros x y H'; generalize (Symmetry_of_Apart y x). (* Goal: forall _ : forall _ : or (Apart (origin y) (ln x)) (Apart (extremity y) (ln x)), or (Apart (origin x) (ln y)) (Apart (extremity x) (ln y)), and (not (Apart (origin y) (ln x))) (not (Apart (extremity y) (ln x))) *) tauto. Qed. Theorem thm4_7i : forall (a b c : Point) (H1 : DiPt a b) (H2 : DiPt b c), Incident c (ln (Seg a b H1)) -> Incident a (ln (reverse (Seg b c H2))). Proof. (* Goal: forall (a b c : Point) (H1 : DiPt a b) (H2 : DiPt b c) (_ : Incident c (ln (Seg a b H1))), Incident a (ln (reverse (Seg b c H2))) *) intros a b c H1 H2 H'. (* Goal: Incident a (ln (reverse (Seg b c H2))) *) lapply (thm4_6 (reverse (Seg b c H2)) (Seg a b H1)); [ intro H'1; elim H'1; trivial | idtac ]. (* Goal: and (Incident (origin (reverse (Seg b c H2))) (ln (Seg a b H1))) (Incident (extremity (reverse (Seg b c H2))) (ln (Seg a b H1))) *) generalize (inc_ln2 (Seg a b H1)); auto. Qed. Theorem thm4_7ii : forall (a b c : Point) (H1 : DiPt a b) (H2 : DiPt a c), Incident c (ln (Seg a b H1)) -> Incident b (ln (Seg a c H2)). Proof. (* Goal: forall (a b c : Point) (H1 : DiPt a b) (H2 : DiPt a c) (_ : Incident c (ln (Seg a b H1))), Incident b (ln (Seg a c H2)) *) intros a b c H1 H2 H'. (* Goal: Incident b (ln (Seg a c H2)) *) lapply (thm4_6 (Seg a c H2) (Seg a b H1)); [ intro H'1; elim H'1; trivial | idtac ]. (* Goal: and (Incident (origin (Seg a c H2)) (ln (Seg a b H1))) (Incident (extremity (Seg a c H2)) (ln (Seg a b H1))) *) generalize (inc_ln1 (Seg a b H1)); auto. Qed. Theorem thm4_7iii : forall (x : Segment) (c : Point), Incident c (ln x) -> Incident c (ln (reverse x)). Proof. (* Goal: forall (x : Segment) (c : Point) (_ : Incident c (ln x)), Incident c (ln (reverse x)) *) intros x c H'. (* Goal: Incident c (ln (reverse x)) *) apply cong_eqln_inc with (l := ln x); auto. Qed. Theorem Symmetry_of_Apart' : forall x y : Twolines, Apart (pt y) (line1 x) \/ Apart (pt y) (line2 x) -> Apart (pt x) (line1 y) \/ Apart (pt x) (line2 y). Proof. (* Goal: forall (x y : Twolines) (_ : or (Apart (pt y) (line1 x)) (Apart (pt y) (line2 x))), or (Apart (pt x) (line1 y)) (Apart (pt x) (line2 y)) *) intros x y H'. (* Goal: or (Apart (pt x) (line1 y)) (Apart (pt x) (line2 y)) *) apply thm4_1c. (* Goal: DiPt (pt x) (pt y) *) apply sym_DiPt; auto. Qed. Theorem thm4_9a : forall (x : Twolines) (c : Line), Apart (pt x) c -> DiLn c (line1 x). Proof. (* Goal: forall (x : Twolines) (c : Line) (_ : Apart (pt x) c), DiLn c (line1 x) *) intros x c H'. (* Goal: DiLn c (line1 x) *) lapply (cmp_apt_diln (pt x) c (line1 x)); [ intro H'3; elim H'3; [ trivial | intro H'4; clear H'3 ] | idtac ]; trivial. (* Goal: DiLn c (line1 x) *) elim (inc_pt1 x); trivial. Qed. Theorem thm4_9b : forall (x : Twolines) (c : Line), Apart (pt x) c -> DiLn c (line2 x). Proof. (* Goal: forall (x : Twolines) (c : Line) (_ : Apart (pt x) c), DiLn c (line2 x) *) intros x c H'. (* Goal: DiLn c (line2 x) *) lapply (cmp_apt_diln (pt x) c (line2 x)); [ intro H'3; elim H'3; [ trivial | intro H'4; clear H'3 ] | idtac ]; trivial. (* Goal: DiLn c (line2 x) *) elim (inc_pt2 x); trivial. Qed. Theorem thm5_3 : forall (x y : Segment) (z : Twolines), origin x = origin y -> line1 z = ln x -> line2 z = ln y -> EqPt (pt z) (origin x). Proof. (* Goal: forall (x y : Segment) (z : Twolines) (_ : @eq Point (origin x) (origin y)) (_ : @eq Line (line1 z) (ln x)) (_ : @eq Line (line2 z) (ln y)), EqPt (pt z) (origin x) *) intros x y z; elim z; simpl in |- *. (* Goal: forall (line1 line2 : Line) (Twol_cond : ConLn line1 line2) (_ : @eq Point (origin x) (origin y)) (_ : @eq Line line1 (ln x)) (_ : @eq Line line2 (ln y)), EqPt (pt (Twol line1 line2 Twol_cond)) (origin x) *) intros line1 line2 Twol_cond H' H'0 H'1. (* Goal: EqPt (pt (Twol line1 line2 Twol_cond)) (origin x) *) lapply (Convergent_imp_distinct line1 line2); trivial. (* Goal: forall _ : DiLn line1 line2, EqPt (pt (Twol line1 line2 Twol_cond)) (origin x) *) intro H'2; red in |- *; red in |- *; red in |- *; intro H. (* Goal: False *) lapply (el_ax (Seg (pt (Twol line1 line2 Twol_cond)) (origin x) H) line1 line2); [ intro H'7 | trivial ]. (* Goal: False *) simpl in H'7. (* Goal: False *) elim H'7; clear H'7; (intro H'3; elim H'3; (clear H'3; intro H'4)). (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) elim (inc_pt1 (Twol line1 line2 Twol_cond)); auto. (* Goal: False *) (* Goal: False *) (* Goal: False *) apply (inc_ln1 x); rewrite <- H'0; assumption. (* Goal: False *) (* Goal: False *) elim (inc_pt2 (Twol line1 line2 Twol_cond)); auto. (* Goal: False *) apply (inc_ln1 y); rewrite <- H'1; rewrite <- H'; assumption. Qed. Theorem thm5_4 : forall (x y : Twolines) (z : Segment), line1 x = line1 y -> origin z = pt x -> extremity z = pt y -> EqLn (ln z) (line1 x). Proof. (* Goal: forall (x y : Twolines) (z : Segment) (_ : @eq Line (line1 x) (line1 y)) (_ : @eq Point (origin z) (pt x)) (_ : @eq Point (extremity z) (pt y)), EqLn (ln z) (line1 x) *) intros x y z; elim z; simpl in |- *. (* Goal: forall (origin extremity : Point) (Seg_cond : DiPt origin extremity) (_ : @eq Line (line1 x) (line1 y)) (_ : @eq Point origin (pt x)) (_ : @eq Point extremity (pt y)), EqLn (ln (Seg origin extremity Seg_cond)) (line1 x) *) intros origin extremity Seg_cond H' H'0 H'1. (* Goal: EqLn (ln (Seg origin extremity Seg_cond)) (line1 x) *) red in |- *; red in |- *; red in |- *; intro H'2. (* Goal: False *) lapply (el_ax (Seg origin extremity Seg_cond) (ln (Seg origin extremity Seg_cond)) (line1 x)); [ intro H'7 | trivial ]. (* Goal: False *) simpl in H'7. (* Goal: False *) elim H'7; clear H'7; (intro H'3; elim H'3; (clear H'3; intro H'4)). (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) elim (inc_ln1 (Seg origin extremity Seg_cond)); auto. (* Goal: False *) (* Goal: False *) (* Goal: False *) elim (inc_ln2 (Seg origin extremity Seg_cond)); auto. (* Goal: False *) (* Goal: False *) apply (inc_pt1 x); rewrite <- H'0; assumption. (* Goal: False *) apply (inc_pt1 y); rewrite <- H'1; rewrite <- H'; assumption. Qed. Theorem thm5_5 : forall (a b c : Point) (H1 : DiPt a b) (H2 : EqPt b c), EqLn (ln (Seg a b H1)) (ln (Seg a c (cong_eqpt_dipt a b c H1 H2))). Proof. (* Goal: forall (a b c : Point) (H1 : DiPt a b) (H2 : EqPt b c), EqLn (ln (Seg a b H1)) (ln (Seg a c (cong_eqpt_dipt a b c H1 H2))) *) intros a b c H1 H2; apply Uniqueness_of_constructed_lines; simpl in |- *. (* Goal: Incident c (ln (Seg a b H1)) *) (* Goal: Incident a (ln (Seg a b H1)) *) exact (inc_ln1 (Seg a b H1)). (* Goal: Incident c (ln (Seg a b H1)) *) generalize (inc_ln2 (Seg a b H1)); simpl in |- *; intro H'. (* Goal: Incident c (ln (Seg a b H1)) *) apply cong_eqpt_inc with (a := b); trivial. Qed. Theorem thm5_6 : forall (l m n : Line) (H1 : ConLn l m) (H2 : EqLn m n), EqPt (pt (Twol l m H1)) (pt (Twol l n (cong_eqln_con l m n H1 H2))). Proof. (* Goal: forall (l m n : Line) (H1 : ConLn l m) (H2 : EqLn m n), EqPt (pt (Twol l m H1)) (pt (Twol l n (cong_eqln_con l m n H1 H2))) *) intros l m n H1 H2; apply Uniqueness_of_constructed_points; simpl in |- *. (* Goal: Incident (pt (Twol l m H1)) n *) (* Goal: Incident (pt (Twol l m H1)) l *) exact (inc_pt1 (Twol l m H1)). (* Goal: Incident (pt (Twol l m H1)) n *) generalize (inc_pt2 (Twol l m H1)); simpl in |- *; intro H'. (* Goal: Incident (pt (Twol l m H1)) n *) apply cong_eqln_inc with (l := m); trivial. Qed.
Require Import Ensf. Require Import more_words. Require Import PushdownAutomata. Require Import gram. Require Import gram_aut. Section def_axiom_APD. Variable X P : Ensf. Variable wd : Word. Variable wa : Word. Variable d : Ensf. Let L := LA X wd wa d. Axiom axiom_APD : P_automata X P wd wa d -> forall u : Word, {L u} + {~ L u}. End def_axiom_APD. Section parser. Variable X V R : Ensf. Variable S' : Elt. Hypothesis H : isGram X V R S'. Let LL := LG X V R S'. Let P := union X V. Let f_R_d (a : Elt) := couple (word (cons (first a) nil)) (couple (eps X) (second a)). Let f_X_d (x : Elt) := couple (word (cons x nil)) (couple x (word nil)). Let d := union (map f_R_d R) (map f_X_d X). Let wd := cons S' nil. Let wa := nil. Let L := LA X wd wa d. Theorem Parser1 : forall u : Word, {LL u} + {~ LL u}. Proof. (* Goal: forall u : Word, sumbool (LL u) (not (LL u)) *) intros. (* Goal: sumbool (LL u) (not (LL u)) *) elimtype ({L u} + {~ L u}). (* Goal: sumbool (L u) (not (L u)) *) (* Goal: forall _ : not (L u), sumbool (LL u) (not (LL u)) *) (* Goal: forall _ : L u, sumbool (LL u) (not (LL u)) *) intro Hyp. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: forall _ : not (L u), sumbool (LL u) (not (LL u)) *) (* Goal: sumbool (LL u) (not (LL u)) *) left. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: forall _ : not (L u), sumbool (LL u) (not (LL u)) *) (* Goal: LL u *) cut (l_egal L LL). (* Goal: sumbool (L u) (not (L u)) *) (* Goal: forall _ : not (L u), sumbool (LL u) (not (LL u)) *) (* Goal: l_egal L LL *) (* Goal: forall _ : l_egal L LL, LL u *) intro temp; elim temp. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: forall _ : not (L u), sumbool (LL u) (not (LL u)) *) (* Goal: l_egal L LL *) (* Goal: forall (_ : l_inclus L LL) (_ : l_inclus LL L), LL u *) unfold l_inclus in |- *. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: forall _ : not (L u), sumbool (LL u) (not (LL u)) *) (* Goal: l_egal L LL *) (* Goal: forall (_ : forall (w : Word) (_ : L w), LL w) (_ : forall (w : Word) (_ : LL w), L w), LL u *) intros. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: forall _ : not (L u), sumbool (LL u) (not (LL u)) *) (* Goal: l_egal L LL *) (* Goal: LL u *) auto. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: forall _ : not (L u), sumbool (LL u) (not (LL u)) *) (* Goal: l_egal L LL *) unfold L, LL, wa, wd, d, f_R_d, f_X_d in |- *. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: forall _ : not (L u), sumbool (LL u) (not (LL u)) *) (* Goal: l_egal (LA X (cons S' nil) nil (union (map (fun a : Elt => couple (word (cons (first a) nil)) (couple (eps X) (second a))) R) (map (fun x : Elt => couple (word (cons x nil)) (couple x (word nil))) X))) (LG X V R S') *) apply equiv_APD_Gram. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: forall _ : not (L u), sumbool (LL u) (not (LL u)) *) (* Goal: isGram X V R S' *) exact H. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: forall _ : not (L u), sumbool (LL u) (not (LL u)) *) unfold not in |- *. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: forall _ : forall _ : L u, False, sumbool (LL u) (forall _ : LL u, False) *) intro Hyp. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: sumbool (LL u) (forall _ : LL u, False) *) right. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: forall _ : LL u, False *) intro LL_u. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: False *) apply Hyp. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: L u *) cut (l_egal L LL). (* Goal: sumbool (L u) (not (L u)) *) (* Goal: l_egal L LL *) (* Goal: forall _ : l_egal L LL, L u *) intro temp; elim temp. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: l_egal L LL *) (* Goal: forall (_ : l_inclus L LL) (_ : l_inclus LL L), L u *) unfold l_inclus in |- *. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: l_egal L LL *) (* Goal: forall (_ : forall (w : Word) (_ : L w), LL w) (_ : forall (w : Word) (_ : LL w), L w), L u *) intros. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: l_egal L LL *) (* Goal: L u *) auto. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: l_egal L LL *) unfold L, LL, wa, wd, d, f_R_d, f_X_d in |- *. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: l_egal (LA X (cons S' nil) nil (union (map (fun a : Elt => couple (word (cons (first a) nil)) (couple (eps X) (second a))) R) (map (fun x : Elt => couple (word (cons x nil)) (couple x (word nil))) X))) (LG X V R S') *) apply equiv_APD_Gram. (* Goal: sumbool (L u) (not (L u)) *) (* Goal: isGram X V R S' *) exact H. (* Goal: sumbool (L u) (not (L u)) *) unfold L in |- *. (* Goal: sumbool (LA X wd wa d u) (not (LA X wd wa d u)) *) apply axiom_APD with P. (* Goal: P_automata X P wd wa d *) unfold P, wd, wa, d, f_R_d, f_X_d in |- *. (* Goal: P_automata X (union X V) (cons S' nil) nil (union (map (fun a : Elt => couple (word (cons (first a) nil)) (couple (eps X) (second a))) R) (map (fun x : Elt => couple (word (cons x nil)) (couple x (word nil))) X)) *) apply X_P_wd_wa_d. (* Goal: isGram X V R S' *) exact H. Qed. End parser.
Require Import basis. Require Import part1. Theorem thm4_1a : forall (x : Segment) (l : Line), DiLn l (ln x) -> Apart (origin x) l \/ Apart (extremity x) l. Proof. (* Goal: forall (x : Segment) (l : Line) (_ : DiLn l (ln x)), or (Apart (origin x) l) (Apart (extremity x) l) *) intros x l. (* Goal: forall _ : DiLn l (ln x), or (Apart (origin x) l) (Apart (extremity x) l) *) generalize (inc_ln2 x); generalize (inc_ln1 x). (* Goal: forall (_ : Incident (origin x) (ln x)) (_ : Incident (extremity x) (ln x)) (_ : DiLn l (ln x)), or (Apart (origin x) l) (Apart (extremity x) l) *) unfold Incident in |- *. (* Goal: forall (_ : not (Apart (origin x) (ln x))) (_ : not (Apart (extremity x) (ln x))) (_ : DiLn l (ln x)), or (Apart (origin x) l) (Apart (extremity x) l) *) generalize (el_ax x l (ln x)). (* Goal: forall (_ : forall _ : DiLn l (ln x), or (or (Apart (origin x) l) (Apart (extremity x) l)) (or (Apart (origin x) (ln x)) (Apart (extremity x) (ln x)))) (_ : not (Apart (origin x) (ln x))) (_ : not (Apart (extremity x) (ln x))) (_ : DiLn l (ln x)), or (Apart (origin x) l) (Apart (extremity x) l) *) tauto. Qed. Theorem thm4_1b : forall (x : Segment) (l : Line), Apart (origin x) l \/ Apart (extremity x) l -> DiLn l (ln x). Proof. (* Goal: forall (x : Segment) (l : Line) (_ : or (Apart (origin x) l) (Apart (extremity x) l)), DiLn l (ln x) *) intros x l. (* Goal: forall _ : or (Apart (origin x) l) (Apart (extremity x) l), DiLn l (ln x) *) generalize (inc_ln2 x); generalize (inc_ln1 x). (* Goal: forall (_ : Incident (origin x) (ln x)) (_ : Incident (extremity x) (ln x)) (_ : or (Apart (origin x) l) (Apart (extremity x) l)), DiLn l (ln x) *) unfold Incident in |- *. (* Goal: forall (_ : not (Apart (origin x) (ln x))) (_ : not (Apart (extremity x) (ln x))) (_ : or (Apart (origin x) l) (Apart (extremity x) l)), DiLn l (ln x) *) intros H' H'0 H'1; elim H'1; intro H'2; clear H'1. (* Goal: DiLn l (ln x) *) (* Goal: DiLn l (ln x) *) elim (cmp_apt_diln (origin x) l (ln x)); tauto. (* Goal: DiLn l (ln x) *) elim (cmp_apt_diln (extremity x) l (ln x)); tauto. Qed. Hint Resolve thm4_1a thm4_1b. Theorem thm4_1c : forall (x : Twolines) (a : Point), DiPt a (pt x) -> Apart a (line1 x) \/ Apart a (line2 x). Proof. (* Goal: forall (x : Twolines) (a : Point) (_ : DiPt a (pt x)), or (Apart a (line1 x)) (Apart a (line2 x)) *) intros x a. (* Goal: forall _ : DiPt a (pt x), or (Apart a (line1 x)) (Apart a (line2 x)) *) generalize (inc_pt2 x); generalize (inc_pt1 x). (* Goal: forall (_ : Incident (pt x) (line1 x)) (_ : Incident (pt x) (line2 x)) (_ : DiPt a (pt x)), or (Apart a (line1 x)) (Apart a (line2 x)) *) unfold Incident in |- *. (* Goal: forall (_ : not (Apart (pt x) (line1 x))) (_ : not (Apart (pt x) (line2 x))) (_ : DiPt a (pt x)), or (Apart a (line1 x)) (Apart a (line2 x)) *) intros H' H'0 H'1. (* Goal: or (Apart a (line1 x)) (Apart a (line2 x)) *) generalize (el_ax (Seg a (pt x) H'1) (line1 x) (line2 x)); simpl in |- *. (* Goal: forall _ : forall _ : DiLn (line1 x) (line2 x), or (or (Apart a (line1 x)) (Apart (pt x) (line1 x))) (or (Apart a (line2 x)) (Apart (pt x) (line2 x))), or (Apart a (line1 x)) (Apart a (line2 x)) *) cut (DiLn (line1 x) (line2 x)). (* Goal: DiLn (line1 x) (line2 x) *) (* Goal: forall (_ : DiLn (line1 x) (line2 x)) (_ : forall _ : DiLn (line1 x) (line2 x), or (or (Apart a (line1 x)) (Apart (pt x) (line1 x))) (or (Apart a (line2 x)) (Apart (pt x) (line2 x)))), or (Apart a (line1 x)) (Apart a (line2 x)) *) tauto. (* Goal: DiLn (line1 x) (line2 x) *) elim x; auto. Qed. Theorem thm4_1d : forall (x : Twolines) (a : Point), Apart a (line1 x) \/ Apart a (line2 x) -> DiPt a (pt x). Proof. (* Goal: forall (x : Twolines) (a : Point) (_ : or (Apart a (line1 x)) (Apart a (line2 x))), DiPt a (pt x) *) intros x a. (* Goal: forall _ : or (Apart a (line1 x)) (Apart a (line2 x)), DiPt a (pt x) *) generalize (inc_pt2 x); generalize (inc_pt1 x). (* Goal: forall (_ : Incident (pt x) (line1 x)) (_ : Incident (pt x) (line2 x)) (_ : or (Apart a (line1 x)) (Apart a (line2 x))), DiPt a (pt x) *) unfold Incident in |- *. (* Goal: forall (_ : not (Apart (pt x) (line1 x))) (_ : not (Apart (pt x) (line2 x))) (_ : or (Apart a (line1 x)) (Apart a (line2 x))), DiPt a (pt x) *) intros H' H'0 H'1; elim H'1; intro H'2; clear H'1. (* Goal: DiPt a (pt x) *) (* Goal: DiPt a (pt x) *) generalize (cmp_apt_dipt a (pt x) (line1 x)); tauto. (* Goal: DiPt a (pt x) *) generalize (cmp_apt_dipt a (pt x) (line2 x)); tauto. Qed. Theorem Symmetry_of_Apart : forall x y : Segment, Apart (origin x) (ln y) \/ Apart (extremity x) (ln y) -> Apart (origin y) (ln x) \/ Apart (extremity y) (ln x). Proof. (* Goal: forall (x y : Segment) (_ : or (Apart (origin x) (ln y)) (Apart (extremity x) (ln y))), or (Apart (origin y) (ln x)) (Apart (extremity y) (ln x)) *) intros x y H'. (* Goal: or (Apart (origin y) (ln x)) (Apart (extremity y) (ln x)) *) apply thm4_1a. (* Goal: DiLn (ln x) (ln y) *) apply sym_DiLn; auto. Qed. Theorem thm4_3a : forall (x : Segment) (c : Point), Apart c (ln x) -> DiPt c (origin x). Proof. (* Goal: forall (x : Segment) (c : Point) (_ : Apart c (ln x)), DiPt c (origin x) *) intros x c H'. (* Goal: DiPt c (origin x) *) elim (cmp_apt_dipt c (origin x) (ln x)); trivial. (* Goal: forall _ : Apart (origin x) (ln x), DiPt c (origin x) *) intro H0; elim (inc_ln1 x); trivial. Qed. Theorem thm4_3b : forall (x : Segment) (c : Point), Apart c (ln x) -> DiPt c (extremity x). Proof. (* Goal: forall (x : Segment) (c : Point) (_ : Apart c (ln x)), DiPt c (extremity x) *) intros x c H'. (* Goal: DiPt c (extremity x) *) elim (cmp_apt_dipt c (extremity x) (ln x)); trivial. (* Goal: forall _ : Apart (extremity x) (ln x), DiPt c (extremity x) *) intro H0; elim (inc_ln2 x); trivial. Qed. Definition Side1 : Triangle -> Segment. Proof. (* Goal: forall _ : Triangle, Segment *) intro H'; elim H'; clear H'. (* Goal: forall (summit : Point) (base : Segment) (_ : Apart summit (ln base)), Segment *) intros summit base H'. (* Goal: Segment *) apply (Seg summit (origin base)). (* Goal: DiPt summit (origin base) *) apply thm4_3a; trivial. Qed. Definition Side2 : Triangle -> Segment. Proof. (* Goal: forall _ : Triangle, Segment *) intro H'; elim H'; clear H'. (* Goal: forall (summit : Point) (base : Segment) (_ : Apart summit (ln base)), Segment *) intros summit base H'. (* Goal: Segment *) apply (Seg summit (extremity base)). (* Goal: DiPt summit (extremity base) *) apply thm4_3b; trivial. Qed. Theorem auxs1 : forall t : Triangle, origin (base t) = extremity (Side1 t). Proof. (* Goal: forall t : Triangle, @eq Point (origin (base t)) (extremity (Side1 t)) *) intro t; elim t; auto. Qed. Theorem auxs2 : forall t : Triangle, extremity (base t) = extremity (Side2 t). Proof. (* Goal: forall t : Triangle, @eq Point (extremity (base t)) (extremity (Side2 t)) *) intro t; elim t; auto. Qed. Theorem auxs3 : forall t : Triangle, summit t = origin (Side1 t). Proof. (* Goal: forall t : Triangle, @eq Point (summit t) (origin (Side1 t)) *) intro t; elim t; auto. Qed. Theorem auxs4 : forall t : Triangle, summit t = origin (Side2 t). Proof. (* Goal: forall t : Triangle, @eq Point (summit t) (origin (Side2 t)) *) intro t; elim t; auto. Qed. Theorem thm4_3c : forall t : Triangle, DiLn (ln (base t)) (ln (Side1 t)). Proof. (* Goal: forall t : Triangle, DiLn (ln (base t)) (ln (Side1 t)) *) intro H'; elim H'; clear H'. (* Goal: forall (summit : Point) (base0 : Segment) (Tri_cond : Apart summit (ln base0)), DiLn (ln (base (Tri summit base0 Tri_cond))) (ln (Side1 (Tri summit base0 Tri_cond))) *) intros summit base Tri_cond. (* Goal: DiLn (ln (basis.base (Tri summit base Tri_cond))) (ln (Side1 (Tri summit base Tri_cond))) *) elim (cmp_apt_diln summit (ln base) (ln (Side1 (Tri summit base Tri_cond)))); auto. Qed. Theorem thm4_3d : forall t : Triangle, DiLn (ln (base t)) (ln (Side2 t)). Proof. (* Goal: forall t : Triangle, DiLn (ln (base t)) (ln (Side2 t)) *) intro H'; elim H'; clear H'. (* Goal: forall (summit : Point) (base0 : Segment) (Tri_cond : Apart summit (ln base0)), DiLn (ln (base (Tri summit base0 Tri_cond))) (ln (Side2 (Tri summit base0 Tri_cond))) *) intros summit base Tri_cond. (* Goal: DiLn (ln (basis.base (Tri summit base Tri_cond))) (ln (Side2 (Tri summit base Tri_cond))) *) elim (cmp_apt_diln summit (ln base) (ln (Side2 (Tri summit base Tri_cond)))); auto. Qed. Hint Resolve thm4_3c thm4_3d.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrbool ssrfun eqtype ssrnat seq div choice fintype. From mathcomp Require Import tuple finfun bigop finset fingroup action perm primitive_action. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Import GroupScope. Lemma burnside_formula : forall (gT : finGroupType) s (G : {group gT}), uniq s -> s =i G -> forall (sT : finType) (to : {action gT &-> sT}), (#|orbit to G @: setT| * size s)%N = \sum_(p <- s) #|'Fix_to[p]|. Proof. (* Goal: forall (gT : FinGroup.type) (s : list (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT))))) (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (@uniq (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT))) s)) (_ : @eq_mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT)))) (@mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT)))) (seq_predType (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT)))) s) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (sT : Finite.type) (to : @action gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (Finite.sort sT)), @eq nat (muln (@card (set_of_finType sT) (@mem (Finite.sort (set_of_finType sT)) (predPredType (Finite.sort (set_of_finType sT))) (@SetDef.pred_of_set (set_of_finType sT) (@Imset.imset sT (set_of_finType sT) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@gval gT G)) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT (@setTfor sT (Phant (Finite.sort sT))))))))) (@size (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT)))) s)) (@BigOp.bigop nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT)))) O s (fun p : Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT))) => @BigBody nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT)))) p addn true (@card sT (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) p))))))) *) move=> gT s G Us sG sT to. (* Goal: @eq nat (muln (@card (set_of_finType sT) (@mem (Finite.sort (set_of_finType sT)) (predPredType (Finite.sort (set_of_finType sT))) (@SetDef.pred_of_set (set_of_finType sT) (@Imset.imset sT (set_of_finType sT) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@gval gT G)) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT (@setTfor sT (Phant (Finite.sort sT))))))))) (@size (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT)))) s)) (@BigOp.bigop nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT)))) O s (fun p : Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT))) => @BigBody nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT)))) p addn true (@card sT (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) p))))))) *) rewrite big_uniq // -(card_uniqP Us) (eq_card sG) -Frobenius_Cauchy. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@astabs gT (@gval gT (@setT_group gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) sT (@setTfor sT (Phant (Finite.sort sT))) to)))) *) (* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) O (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) a addn (@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)))) (@card sT (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT (@setI sT (@setTfor sT (Phant (Finite.sort sT))) (@afix gT (@gval gT (@setT_group gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) a)))))))) (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) O (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT)))) (seq_predType (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT)))) s)) (@card sT (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) i))))))) *) by apply: eq_big => // p _; rewrite setTI. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@astabs gT (@gval gT (@setT_group gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) sT (@setTfor sT (Phant (Finite.sort sT))) to)))) *) by apply/actsP=> ? _ ?; rewrite !inE. Qed. Arguments burnside_formula {gT}. Section colouring. Variable n : nat. Definition colors := 'I_n. Canonical colors_eqType := Eval hnf in [eqType of colors]. Canonical colors_choiceType := Eval hnf in [choiceType of colors]. Canonical colors_countType := Eval hnf in [countType of colors]. Canonical colors_finType := Eval hnf in [finType of colors]. Section square_colouring. Definition square := 'I_4. Canonical square_eqType := Eval hnf in [eqType of square]. Canonical square_choiceType := Eval hnf in [choiceType of square]. Canonical square_countType := Eval hnf in [countType of square]. Canonical square_finType := Eval hnf in [finType of square]. Canonical square_subType := Eval hnf in [subType of square]. Canonical square_subCountType := Eval hnf in [subCountType of square]. Canonical square_subFinType := Eval hnf in [subFinType of square]. Definition mksquare i : square := Sub (i %% _) (ltn_mod i 4). Definition c0 := mksquare 0. Definition c1 := mksquare 1. Definition c2 := mksquare 2. Definition c3 := mksquare 3. Definition R1 (sc : square) : square := tnth [tuple c1; c2; c3; c0] sc. Definition R2 (sc : square) : square := tnth [tuple c2; c3; c0; c1] sc. Definition R3 (sc : square) : square := tnth [tuple c3; c0; c1; c2] sc. Ltac get_inv elt l := match l with | (_, (elt, ?x)) => x | (elt, ?x) => x | (?x, _) => get_inv elt x end. Definition rot_inv := ((R1, R3), (R2, R2), (R3, R1)). Ltac inj_tac := move: (erefl rot_inv); unfold rot_inv; match goal with |- ?X = _ -> injective ?Y => move=> _; let x := get_inv Y X in apply: (can_inj (g:=x)); move=> [val H1] end. Lemma R1_inj : injective R1. Proof. (* Goal: @injective square square R1 *) by inj_tac; repeat (destruct val => //=; first by apply/eqP). Qed. Lemma R2_inj : injective R2. Proof. (* Goal: @injective square square R2 *) by inj_tac; repeat (destruct val => //=; first by apply/eqP). Qed. Lemma R3_inj : injective R3. Proof. (* Goal: @injective square square R3 *) by inj_tac; repeat (destruct val => //=; first by apply/eqP). Qed. Definition r1 := (perm R1_inj). Definition r2 := (perm R2_inj). Definition r3 := (perm R3_inj). Definition id1 := (1 : {perm square}). Definition is_rot (r : {perm _}) := (r * r1 == r1 * r). Definition rot := [set r | is_rot r]. Lemma group_set_rot : group_set rot. Proof. (* Goal: is_true (@group_set (perm_of_finGroupType square_finType) rot) *) apply/group_setP; split; first by rewrite /rot inE /is_rot mulg1 mul1g. (* Goal: @prop_in11 (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) rot)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) rot)) (fun x y : FinGroup.arg_sort (FinGroup.base (perm_of_finGroupType square_finType)) => is_true (@in_mem (FinGroup.sort (FinGroup.base (perm_of_finGroupType square_finType))) (@mulg (FinGroup.base (perm_of_finGroupType square_finType)) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) rot)))) (inPhantom (forall x y : FinGroup.arg_sort (FinGroup.base (perm_of_finGroupType square_finType)), is_true (@in_mem (FinGroup.sort (FinGroup.base (perm_of_finGroupType square_finType))) (@mulg (FinGroup.base (perm_of_finGroupType square_finType)) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) rot))))) *) move=> x1 y; rewrite /rot !inE /= /is_rot; move/eqP => hx1; move/eqP => hy. (* Goal: is_true (@eq_op (FinGroup.eqType (perm_of_baseFinGroupType square_finType)) (@mulg (perm_of_baseFinGroupType square_finType) (@mulg (perm_of_baseFinGroupType square_finType) x1 y) r1) (@mulg (perm_of_baseFinGroupType square_finType) r1 (@mulg (perm_of_baseFinGroupType square_finType) x1 y))) *) by rewrite -mulgA hy !mulgA hx1. Qed. Canonical rot_group := Group group_set_rot. Definition rotations := [set id1; r1; r2; r3]. Lemma rot_eq_c0 : forall r s : {perm square}, is_rot r -> is_rot s -> r c0 = s c0 -> r = s. Proof. (* Goal: forall (r s : @perm_of square_finType (Phant square)) (_ : is_true (is_rot r)) (_ : is_true (is_rot s)) (_ : @eq (Finite.sort square_finType) (@PermDef.fun_of_perm square_finType r c0) (@PermDef.fun_of_perm square_finType s c0)), @eq (@perm_of square_finType (Phant square)) r s *) rewrite /is_rot => r s; move/eqP => hr; move/eqP=> hs hrs; apply/permP => a. (* Goal: @eq (Finite.sort square_finType) (@PermDef.fun_of_perm square_finType r a) (@PermDef.fun_of_perm square_finType s a) *) have ->: a = (r1 ^+ a) c0 by apply/eqP; case: a; do 4?case=> //=; rewrite ?permM !permE. (* Goal: @eq (Finite.sort square_finType) (@PermDef.fun_of_perm square_finType r (@PermDef.fun_of_perm square_finType (@expgn (perm_of_baseFinGroupType square_finType) r1 (@nat_of_ord (S (S (S (S O)))) a)) c0)) (@PermDef.fun_of_perm square_finType s (@PermDef.fun_of_perm square_finType (@expgn (perm_of_baseFinGroupType square_finType) r1 (@nat_of_ord (S (S (S (S O)))) a)) c0)) *) by rewrite -!permM -!commuteX // !permM hrs. Qed. Lemma rot_r1 : forall r, is_rot r -> r = r1 ^+ (r c0). Lemma rotations_is_rot : forall r, r \in rotations -> is_rot r. Proof. (* Goal: forall (r : Finite.sort (perm_for_finType square_finType)) (_ : is_true (@in_mem (Finite.sort (perm_for_finType square_finType)) r (@mem (Finite.sort (perm_for_finType square_finType)) (predPredType (Finite.sort (perm_for_finType square_finType))) (@SetDef.pred_of_set (perm_for_finType square_finType) rotations)))), is_true (is_rot r) *) move=> r Dr; apply/eqP; apply/permP => a; rewrite !inE -!orbA !permM in Dr *. by case/or4P: Dr; move/eqP->; rewrite !permE //; case: a; do 4?case. Qed. Qed. Lemma rot_is_rot : rot = rotations. Definition Sh (sc : square) : square := tnth [tuple c1; c0; c3; c2] sc. Lemma Sh_inj : injective Sh. Proof. (* Goal: @injective square square Sh *) by apply: (can_inj (g:= Sh)); case; do 4?case=> //=; move=> H; apply/eqP. Qed. Definition sh := (perm Sh_inj). Lemma sh_inv : sh^-1 = sh. Definition Sv (sc : square) : square := tnth [tuple c3; c2; c1; c0] sc. Lemma Sv_inj : injective Sv. Proof. (* Goal: @injective square square Sv *) by apply: (can_inj (g:= Sv)); case; do 4?case=> //=; move=> H; apply/eqP. Qed. Definition sv := (perm Sv_inj). Lemma sv_inv : sv^-1 = sv. Definition Sd1 (sc : square) : square := tnth [tuple c0; c3; c2; c1] sc. Lemma Sd1_inj : injective Sd1. Proof. (* Goal: @injective square square Sd1 *) by apply: can_inj Sd1 _; case; do 4?case=> //=; move=> H; apply/eqP. Qed. Definition sd1 := (perm Sd1_inj). Lemma sd1_inv : sd1^-1 = sd1. Definition Sd2 (sc : square) : square := tnth [tuple c2; c1; c0; c3] sc. Lemma Sd2_inj : injective Sd2. Proof. (* Goal: @injective square square Sd2 *) by apply: can_inj Sd2 _; case; do 4?case=> //=; move=> H; apply/eqP. Qed. Definition sd2 := (perm Sd2_inj). Lemma sd2_inv : sd2^-1 = sd2. Lemma ord_enum4 : enum 'I_4 = [:: c0; c1; c2; c3]. Proof. (* Goal: @eq (list (Finite.sort (ordinal_finType (S (S (S (S O))))))) (@enum_mem (ordinal_finType (S (S (S (S O))))) (@mem (ordinal (S (S (S (S O))))) (predPredType (ordinal (S (S (S (S O)))))) (@sort_of_simpl_pred (ordinal (S (S (S (S O))))) (pred_of_argType (ordinal (S (S (S (S O))))))))) (@cons square c0 (@cons square c1 (@cons square c2 (@cons square c3 (@nil square))))) *) by apply: (inj_map val_inj); rewrite val_enum_ord. Qed. Lemma diff_id_sh : 1 != sh. Proof. (* Goal: is_true (negb (@eq_op (FinGroup.eqType (perm_of_baseFinGroupType square_finType)) (oneg (perm_of_baseFinGroupType square_finType)) sh)) *) by apply/eqP; move/(congr1 (fun p : {perm square} => p c0)); rewrite !permE. Qed. Definition isometries2 := [set 1; sh]. Lemma card_iso2 : #|isometries2| = 2. Proof. (* Goal: @eq nat (@card (FinGroup.finType (perm_of_baseFinGroupType square_finType)) (@mem (Finite.sort (FinGroup.finType (perm_of_baseFinGroupType square_finType))) (predPredType (Finite.sort (FinGroup.finType (perm_of_baseFinGroupType square_finType)))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries2))) (S (S O)) *) by rewrite cards2 diff_id_sh. Qed. Lemma group_set_iso2 : group_set isometries2. Proof. (* Goal: is_true (@group_set (perm_of_finGroupType square_finType) isometries2) *) apply/group_setP; split => [|x y]; rewrite !inE ?eqxx //. (* Goal: forall (_ : is_true (orb (@eq_op (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType square_finType))) x (oneg (perm_of_baseFinGroupType square_finType))) (@eq_op (Finite.eqType (perm_for_finType square_finType)) x sh))) (_ : is_true (orb (@eq_op (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType square_finType))) y (oneg (perm_of_baseFinGroupType square_finType))) (@eq_op (Finite.eqType (perm_for_finType square_finType)) y sh))), is_true (orb (@eq_op (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType square_finType))) (@mulg (FinGroup.base (perm_of_finGroupType square_finType)) x y) (oneg (perm_of_baseFinGroupType square_finType))) (@eq_op (Finite.eqType (perm_for_finType square_finType)) (@mulg (FinGroup.base (perm_of_finGroupType square_finType)) x y) sh)) *) do 2![case/orP; move/eqP->]; gsimpl; rewrite ?(eqxx, orbT) //. (* Goal: is_true (orb (@eq_op (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType square_finType))) (@mulg (FinGroup.base (perm_of_finGroupType square_finType)) sh sh) (oneg (perm_of_baseFinGroupType square_finType))) (@eq_op (Finite.eqType (perm_for_finType square_finType)) (@mulg (FinGroup.base (perm_of_finGroupType square_finType)) sh sh) sh)) *) by rewrite -/sh -{1}sh_inv mulVg eqxx. Qed. Canonical iso2_group := Group group_set_iso2. Definition isometries := [set p | [|| p == 1, p == r1, p == r2, p == r3, p == sh, p == sv, p == sd1 | p == sd2 ]]. Definition opp (sc : square) := tnth [tuple c2; c3; c0; c1] sc. Definition is_iso (p : {perm square}) := forall ci, p (opp ci) = opp (p ci). Lemma isometries_iso : forall p, p \in isometries -> is_iso p. Proof. (* Goal: forall (p : Finite.sort (FinGroup.finType (perm_of_baseFinGroupType square_finType))) (_ : is_true (@in_mem (Finite.sort (FinGroup.finType (perm_of_baseFinGroupType square_finType))) p (@mem (Finite.sort (FinGroup.finType (perm_of_baseFinGroupType square_finType))) (predPredType (Finite.sort (FinGroup.finType (perm_of_baseFinGroupType square_finType)))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries)))), is_iso p *) move=> p; rewrite inE. (* Goal: forall _ : is_true (orb (@eq_op (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType square_finType))) p (oneg (perm_of_baseFinGroupType square_finType))) (orb (@eq_op (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType square_finType))) p r1) (orb (@eq_op (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType square_finType))) p r2) (orb (@eq_op (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType square_finType))) p r3) (orb (@eq_op (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType square_finType))) p sh) (orb (@eq_op (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType square_finType))) p sv) (orb (@eq_op (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType square_finType))) p sd1) (@eq_op (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType square_finType))) p sd2)))))))), is_iso p *) by do ?case/orP; move/eqP=> -> a; rewrite !permE; case: a; do 4?case. Qed. Ltac non_inj p a1 a2 heq1 heq2 := let h1:= fresh "h1" in (absurd (p a1 = p a2); first (by red => - h1; move: (perm_inj h1)); by rewrite heq1 heq2; apply/eqP). Ltac is_isoPtac p f e0 e1 e2 e3 := suff ->: p = f by [rewrite inE eqxx ?orbT]; let e := fresh "e" in apply/permP; do 5?[case] => // ?; [move: e0 | move: e1 | move: e2 | move: e3] => e; apply: etrans (congr1 p _) (etrans e _); apply/eqP; rewrite // permE. Lemma is_isoP : forall p, reflect (is_iso p) (p \in isometries). Proof. (* Goal: forall p : @perm_of square_finType (Phant square), Bool.reflect (is_iso p) (@in_mem (@perm_of square_finType (Phant square)) p (@mem (Finite.sort (FinGroup.finType (perm_of_baseFinGroupType square_finType))) (predPredType (Finite.sort (FinGroup.finType (perm_of_baseFinGroupType square_finType)))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) move=> p; apply: (iffP idP) => [|iso_p]; first exact: isometries_iso. (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (Finite.sort (FinGroup.finType (perm_of_baseFinGroupType square_finType))) (predPredType (Finite.sort (FinGroup.finType (perm_of_baseFinGroupType square_finType)))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) move e1: (p c1) (iso_p c1) => k1; move e0: (p c0) (iso_p c0) k1 e1 => k0. (* Goal: forall (_ : @eq (Finite.sort square_finType) (@PermDef.fun_of_perm square_finType p (opp c0)) (opp k0)) (k1 : Finite.sort square_finType) (_ : @eq (Finite.sort square_finType) (@PermDef.fun_of_perm square_finType p c1) k1) (_ : @eq (Finite.sort square_finType) (@PermDef.fun_of_perm square_finType p (opp c1)) (opp k1)), is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (Finite.sort (FinGroup.finType (perm_of_baseFinGroupType square_finType))) (predPredType (Finite.sort (FinGroup.finType (perm_of_baseFinGroupType square_finType)))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) case: k0 e0; do 4?[case] => //= ? e0 e2; do 5?[case] => //= ? e1 e3; try by [non_inj p c0 c1 e0 e1 | non_inj p c0 c3 e0 e3]. (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) by is_isoPtac p id1 e0 e1 e2 e3. (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) by is_isoPtac p sd1 e0 e1 e2 e3. (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) by is_isoPtac p sh e0 e1 e2 e3. (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) by is_isoPtac p r1 e0 e1 e2 e3. (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) by is_isoPtac p sd2 e0 e1 e2 e3. (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) by is_isoPtac p r2 e0 e1 e2 e3. (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) by is_isoPtac p r3 e0 e1 e2 e3. (* Goal: is_true (@in_mem (@perm_of square_finType (Phant square)) p (@mem (@perm_of square_finType (Phant square)) (predPredType (@perm_of square_finType (Phant square))) (@SetDef.pred_of_set (FinGroup.finType (perm_of_baseFinGroupType square_finType)) isometries))) *) by is_isoPtac p sv e0 e1 e2 e3. Qed. Lemma group_set_iso : group_set isometries. Proof. (* Goal: is_true (@group_set (perm_of_finGroupType square_finType) isometries) *) apply/group_setP; split; first by rewrite inE eqxx /=. (* Goal: @prop_in11 (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) isometries)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) isometries)) (fun x y : FinGroup.arg_sort (FinGroup.base (perm_of_finGroupType square_finType)) => is_true (@in_mem (FinGroup.sort (FinGroup.base (perm_of_finGroupType square_finType))) (@mulg (FinGroup.base (perm_of_finGroupType square_finType)) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) isometries)))) (inPhantom (forall x y : FinGroup.arg_sort (FinGroup.base (perm_of_finGroupType square_finType)), is_true (@in_mem (FinGroup.sort (FinGroup.base (perm_of_finGroupType square_finType))) (@mulg (FinGroup.base (perm_of_finGroupType square_finType)) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) isometries))))) *) by move=> x y hx hy; apply/is_isoP => ci; rewrite !permM !isometries_iso. Qed. Canonical iso_group := Group group_set_iso. Lemma card_rot : #|rot| = 4. Proof. (* Goal: @eq nat (@card (perm_for_finType square_finType) (@mem (Finite.sort (perm_for_finType square_finType)) (predPredType (Finite.sort (perm_for_finType square_finType))) (@SetDef.pred_of_set (perm_for_finType square_finType) rot))) (S (S (S (S O)))) *) rewrite -[4]/(size [:: id1; r1; r2; r3]) -(card_uniqP _). (* Goal: is_true (@uniq (Finite.eqType (perm_for_finType square_finType)) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType))))))))) *) (* Goal: @eq nat (@card (perm_for_finType square_finType) (@mem (Finite.sort (perm_for_finType square_finType)) (predPredType (Finite.sort (perm_for_finType square_finType))) (@SetDef.pred_of_set (perm_for_finType square_finType) rot))) (@card (perm_for_finType square_finType) (@mem (Equality.sort (Finite.eqType (perm_for_finType square_finType))) (seq_predType (Finite.eqType (perm_for_finType square_finType))) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))))))) *) by apply: eq_card => x; rewrite rot_is_rot !inE -!orbA. (* Goal: is_true (@uniq (Finite.eqType (perm_for_finType square_finType)) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType))))))))) *) by apply: map_uniq (fun p : {perm square} => p c0) _ _; rewrite /= !permE. Qed. Lemma group_set_rotations : group_set rotations. Proof. (* Goal: is_true (@group_set (perm_of_finGroupType square_finType) rotations) *) by rewrite -rot_is_rot group_set_rot. Qed. Canonical rotations_group := Group group_set_rotations. Notation col_squares := {ffun square -> colors}. Definition act_f (sc : col_squares) (p : {perm square}) : col_squares := [ffun z => sc (p^-1 z)]. Lemma act_f_1 : forall k, act_f k 1 = k. Proof. (* Goal: forall k : @finfun_of square_finType colors (Phant (forall _ : square, colors)), @eq (@finfun_of square_finType colors (Phant (forall _ : square, colors))) (act_f k (oneg (perm_of_baseFinGroupType square_finType))) k *) by move=> k; apply/ffunP=> a; rewrite ffunE invg1 permE. Qed. Lemma act_f_morph : forall k x y, act_f k (x * y) = act_f (act_f k x) y. Proof. (* Goal: forall (k : @finfun_of square_finType colors (Phant (forall _ : square, colors))) (x y : FinGroup.arg_sort (perm_of_baseFinGroupType square_finType)), @eq (@finfun_of square_finType colors (Phant (forall _ : square, colors))) (act_f k (@mulg (perm_of_baseFinGroupType square_finType) x y)) (act_f (act_f k x) y) *) by move=> k x y; apply/ffunP=> a; rewrite !ffunE invMg permE. Qed. Definition to := TotalAction act_f_1 act_f_morph. Definition square_coloring_number2 := #|orbit to isometries2 @: setT|. Definition square_coloring_number4 := #|orbit to rotations @: setT|. Definition square_coloring_number8 := #|orbit to isometries @: setT|. Lemma Fid : 'Fix_to(1) = setT. Proof. (* Goal: @eq (@set_of (finfun_of_finType square_finType colors_finType) (Phant (Finite.sort (finfun_of_finType square_finType colors_finType)))) (@afix (perm_of_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))))) (finfun_of_finType square_finType colors_finType) to (oneg (group_set_of_baseGroupType (FinGroup.base (perm_of_finGroupType square_finType))))) (@setTfor (finfun_of_finType square_finType colors_finType) (Phant (Finite.sort (finfun_of_finType square_finType colors_finType)))) *) by apply/setP=> x /=; rewrite in_setT; apply/afix1P; apply: act1. Qed. Lemma card_Fid : #|'Fix_to(1)| = (n ^ 4)%N. Proof. (* Goal: @eq nat (@card (finfun_of_finType square_finType colors_finType) (@mem (Finite.sort (finfun_of_finType square_finType colors_finType)) (predPredType (Finite.sort (finfun_of_finType square_finType colors_finType))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@afix (perm_of_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))))) (finfun_of_finType square_finType colors_finType) to (oneg (group_set_of_baseGroupType (FinGroup.base (perm_of_finGroupType square_finType)))))))) (expn n (S (S (S (S O))))) *) rewrite -[4]card_ord -[n]card_ord -card_ffun_on Fid cardsE. (* Goal: @eq nat (@card (finfun_of_finType square_finType colors_finType) (@mem (Finite.sort (finfun_of_finType square_finType colors_finType)) (predPredType (Finite.sort (finfun_of_finType square_finType colors_finType))) (fun _ : Finite.sort (finfun_of_finType square_finType colors_finType) => true))) (@card (finfun_of_finType (ordinal_finType (S (S (S (S O))))) (ordinal_finType n)) (@mem (@finfun_of (ordinal_finType (S (S (S (S O))))) (Finite.sort (ordinal_finType n)) (Phant (forall _ : Finite.sort (ordinal_finType (S (S (S (S O))))), Finite.sort (ordinal_finType n)))) (simplPredType (@finfun_of (ordinal_finType (S (S (S (S O))))) (Finite.sort (ordinal_finType n)) (Phant (forall _ : Finite.sort (ordinal_finType (S (S (S (S O))))), Finite.sort (ordinal_finType n))))) (@ffun_on_mem (ordinal_finType (S (S (S (S O))))) (Finite.sort (ordinal_finType n)) (@mem (Finite.sort (ordinal_finType n)) (predPredType (Finite.sort (ordinal_finType n))) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n))))))) *) by symmetry; apply: eq_card => f; apply/ffun_onP. Qed. Definition coin0 (sc : col_squares) : colors := sc c0. Definition coin1 (sc : col_squares) : colors := sc c1. Definition coin2 (sc : col_squares) : colors := sc c2. Definition coin3 (sc : col_squares) : colors := sc c3. Lemma eqperm_map : forall p1 p2 : col_squares, (p1 == p2) = all (fun s => p1 s == p2 s) [:: c0; c1; c2; c3]. Proof. (* Goal: forall p1 p2 : @finfun_of square_finType colors (Phant (forall _ : square, colors)), @eq bool (@eq_op (finfun_of_eqType square_finType colors_eqType) p1 p2) (@all (Finite.sort square_finType) (fun s : Finite.sort square_finType => @eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors p1 s) (@FunFinfun.fun_of_fin square_finType colors p2 s)) (@cons square c0 (@cons square c1 (@cons square c2 (@cons square c3 (@nil square)))))) *) move=> p1 p2; apply/eqP/allP=> [-> // | Ep12]; apply/ffunP=> x. (* Goal: @eq (Equality.sort colors_eqType) (@FunFinfun.fun_of_fin square_finType (Equality.sort colors_eqType) p1 x) (@FunFinfun.fun_of_fin square_finType (Equality.sort colors_eqType) p2 x) *) by apply/eqP; apply Ep12; case: x; do 4!case=> //. Qed. Lemma F_Sh : 'Fix_to[sh] = [set x | (coin0 x == coin1 x) && (coin2 x == coin3 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType square_finType colors_finType) (Phant (Finite.sort (finfun_of_finType square_finType colors_finType)))) (@afix (perm_of_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))))) (finfun_of_finType square_finType colors_finType) to (@set1 (perm_for_finType square_finType) sh)) (@SetDef.finset (finfun_of_finType square_finType colors_finType) (fun x : Finite.sort (finfun_of_finType square_finType colors_finType) => andb (@eq_op colors_eqType (coin0 x) (coin1 x)) (@eq_op colors_eqType (coin2 x) (coin3 x)))) *) apply/setP=> x; rewrite (sameP afix1P eqP) !inE eqperm_map /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sh) c0) (@FunFinfun.fun_of_fin square_finType colors x c0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sh) c1) (@FunFinfun.fun_of_fin square_finType colors x c1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sh) c2) (@FunFinfun.fun_of_fin square_finType colors x c2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sh) c3) (@FunFinfun.fun_of_fin square_finType colors x c3)) true)))) (andb (@eq_op colors_eqType (coin0 x) (coin1 x)) (@eq_op colors_eqType (coin2 x) (coin3 x))) *) rewrite /act_f sh_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (Sh c0)) (@FunFinfun.fun_of_fin square_finType colors x c0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (Sh c1)) (@FunFinfun.fun_of_fin square_finType colors x c1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (Sh c2)) (@FunFinfun.fun_of_fin square_finType colors x c2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (Sh c3)) (@FunFinfun.fun_of_fin square_finType colors x c3)) true)))) (andb (@eq_op colors_eqType (coin0 x) (coin1 x)) (@eq_op colors_eqType (coin2 x) (coin3 x))) *) by rewrite eq_sym (eq_sym (x c3)) andbT andbA !andbb. Qed. Lemma F_Sv : 'Fix_to[sv] = [set x | (coin0 x == coin3 x) && (coin2 x == coin1 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType square_finType colors_finType) (Phant (Finite.sort (finfun_of_finType square_finType colors_finType)))) (@afix (perm_of_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))))) (finfun_of_finType square_finType colors_finType) to (@set1 (perm_for_finType square_finType) sv)) (@SetDef.finset (finfun_of_finType square_finType colors_finType) (fun x : Finite.sort (finfun_of_finType square_finType colors_finType) => andb (@eq_op colors_eqType (coin0 x) (coin3 x)) (@eq_op colors_eqType (coin2 x) (coin1 x)))) *) apply/setP=> x; rewrite (sameP afix1P eqP) !inE eqperm_map /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sv) c0) (@FunFinfun.fun_of_fin square_finType colors x c0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sv) c1) (@FunFinfun.fun_of_fin square_finType colors x c1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sv) c2) (@FunFinfun.fun_of_fin square_finType colors x c2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sv) c3) (@FunFinfun.fun_of_fin square_finType colors x c3)) true)))) (andb (@eq_op colors_eqType (coin0 x) (coin3 x)) (@eq_op colors_eqType (coin2 x) (coin1 x))) *) rewrite /act_f sv_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (Sv c0)) (@FunFinfun.fun_of_fin square_finType colors x c0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (Sv c1)) (@FunFinfun.fun_of_fin square_finType colors x c1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (Sv c2)) (@FunFinfun.fun_of_fin square_finType colors x c2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (Sv c3)) (@FunFinfun.fun_of_fin square_finType colors x c3)) true)))) (andb (@eq_op colors_eqType (coin0 x) (coin3 x)) (@eq_op colors_eqType (coin2 x) (coin1 x))) *) by rewrite eq_sym andbT andbC (eq_sym (x c1)) andbA -andbA !andbb andbC. Qed. Ltac inv_tac := apply: esym (etrans _ (mul1g _)); apply: canRL (mulgK _) _; let a := fresh "a" in apply/permP => a; apply/eqP; rewrite permM !permE; case: a; do 4?case. Lemma r1_inv : r1^-1 = r3. Proof. (* Goal: @eq (FinGroup.sort (perm_of_baseFinGroupType square_finType)) (@invg (perm_of_baseFinGroupType square_finType) r1) r3 *) by inv_tac. Qed. Lemma r2_inv : r2^-1 = r2. Proof. (* Goal: @eq (FinGroup.sort (perm_of_baseFinGroupType square_finType)) (@invg (perm_of_baseFinGroupType square_finType) r2) r2 *) by inv_tac. Qed. Lemma r3_inv : r3^-1 = r1. Proof. (* Goal: @eq (FinGroup.sort (perm_of_baseFinGroupType square_finType)) (@invg (perm_of_baseFinGroupType square_finType) r3) r1 *) by inv_tac. Qed. Lemma F_r2 : 'Fix_to[r2] = [set x | (coin0 x == coin2 x) && (coin1 x == coin3 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType square_finType colors_finType) (Phant (Finite.sort (finfun_of_finType square_finType colors_finType)))) (@afix (perm_of_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))))) (finfun_of_finType square_finType colors_finType) to (@set1 (perm_for_finType square_finType) r2)) (@SetDef.finset (finfun_of_finType square_finType colors_finType) (fun x : Finite.sort (finfun_of_finType square_finType colors_finType) => andb (@eq_op colors_eqType (coin0 x) (coin2 x)) (@eq_op colors_eqType (coin1 x) (coin3 x)))) *) apply/setP=> x; rewrite (sameP afix1P eqP) !inE eqperm_map /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x r2) c0) (@FunFinfun.fun_of_fin square_finType colors x c0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x r2) c1) (@FunFinfun.fun_of_fin square_finType colors x c1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x r2) c2) (@FunFinfun.fun_of_fin square_finType colors x c2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x r2) c3) (@FunFinfun.fun_of_fin square_finType colors x c3)) true)))) (andb (@eq_op colors_eqType (coin0 x) (coin2 x)) (@eq_op colors_eqType (coin1 x) (coin3 x))) *) rewrite /act_f r2_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (R2 c0)) (@FunFinfun.fun_of_fin square_finType colors x c0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (R2 c1)) (@FunFinfun.fun_of_fin square_finType colors x c1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (R2 c2)) (@FunFinfun.fun_of_fin square_finType colors x c2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (R2 c3)) (@FunFinfun.fun_of_fin square_finType colors x c3)) true)))) (andb (@eq_op colors_eqType (coin0 x) (coin2 x)) (@eq_op colors_eqType (coin1 x) (coin3 x))) *) by rewrite eq_sym andbT andbCA andbC (eq_sym (x c3)) andbA -andbA !andbb andbC. Qed. Lemma F_r1 : 'Fix_to[r1] = [set x | (coin0 x == coin1 x)&&(coin1 x == coin2 x)&&(coin2 x == coin3 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType square_finType colors_finType) (Phant (Finite.sort (finfun_of_finType square_finType colors_finType)))) (@afix (perm_of_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))))) (finfun_of_finType square_finType colors_finType) to (@set1 (perm_for_finType square_finType) r1)) (@SetDef.finset (finfun_of_finType square_finType colors_finType) (fun x : Finite.sort (finfun_of_finType square_finType colors_finType) => andb (andb (@eq_op colors_eqType (coin0 x) (coin1 x)) (@eq_op colors_eqType (coin1 x) (coin2 x))) (@eq_op colors_eqType (coin2 x) (coin3 x)))) *) apply/setP=> x; rewrite (sameP afix1P eqP) !inE eqperm_map /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x r1) c0) (@FunFinfun.fun_of_fin square_finType colors x c0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x r1) c1) (@FunFinfun.fun_of_fin square_finType colors x c1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x r1) c2) (@FunFinfun.fun_of_fin square_finType colors x c2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x r1) c3) (@FunFinfun.fun_of_fin square_finType colors x c3)) true)))) (andb (andb (@eq_op colors_eqType (coin0 x) (coin1 x)) (@eq_op colors_eqType (coin1 x) (coin2 x))) (@eq_op colors_eqType (coin2 x) (coin3 x))) *) rewrite /act_f r1_inv !ffunE !permE andbC. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (R3 c1)) (@FunFinfun.fun_of_fin square_finType colors x c1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (R3 c2)) (@FunFinfun.fun_of_fin square_finType colors x c2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (R3 c3)) (@FunFinfun.fun_of_fin square_finType colors x c3)) true))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (R3 c0)) (@FunFinfun.fun_of_fin square_finType colors x c0))) (andb (andb (@eq_op colors_eqType (coin0 x) (coin1 x)) (@eq_op colors_eqType (coin1 x) (coin2 x))) (@eq_op colors_eqType (coin2 x) (coin3 x))) *) by do 3![case E: {+}(_ == _); rewrite // {E}(eqP E)]; rewrite eqxx. Qed. Lemma F_r3 : 'Fix_to[r3] = [set x | (coin0 x == coin1 x)&&(coin1 x == coin2 x)&&(coin2 x == coin3 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType square_finType colors_finType) (Phant (Finite.sort (finfun_of_finType square_finType colors_finType)))) (@afix (perm_of_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))))) (finfun_of_finType square_finType colors_finType) to (@set1 (perm_for_finType square_finType) r3)) (@SetDef.finset (finfun_of_finType square_finType colors_finType) (fun x : Finite.sort (finfun_of_finType square_finType colors_finType) => andb (andb (@eq_op colors_eqType (coin0 x) (coin1 x)) (@eq_op colors_eqType (coin1 x) (coin2 x))) (@eq_op colors_eqType (coin2 x) (coin3 x)))) *) apply/setP=> x; rewrite (sameP afix1P eqP) !inE eqperm_map /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x r3) c0) (@FunFinfun.fun_of_fin square_finType colors x c0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x r3) c1) (@FunFinfun.fun_of_fin square_finType colors x c1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x r3) c2) (@FunFinfun.fun_of_fin square_finType colors x c2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x r3) c3) (@FunFinfun.fun_of_fin square_finType colors x c3)) true)))) (andb (andb (@eq_op colors_eqType (coin0 x) (coin1 x)) (@eq_op colors_eqType (coin1 x) (coin2 x))) (@eq_op colors_eqType (coin2 x) (coin3 x))) *) rewrite /act_f r3_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (R1 c0)) (@FunFinfun.fun_of_fin square_finType colors x c0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (R1 c1)) (@FunFinfun.fun_of_fin square_finType colors x c1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (R1 c2)) (@FunFinfun.fun_of_fin square_finType colors x c2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (R1 c3)) (@FunFinfun.fun_of_fin square_finType colors x c3)) true)))) (andb (andb (@eq_op colors_eqType (coin0 x) (coin1 x)) (@eq_op colors_eqType (coin1 x) (coin2 x))) (@eq_op colors_eqType (coin2 x) (coin3 x))) *) by do 3![rewrite eq_sym; case E: {+}(_ == _); rewrite // {E}(eqP E)]. Qed. Lemma card_n2 : forall x y z t : square, uniq [:: x; y; z; t] -> #|[set p : col_squares | (p x == p y) && (p z == p t)]| = (n ^ 2)%N. Lemma card_n : #|[set x | (coin0 x == coin1 x)&&(coin1 x == coin2 x)&& (coin2 x == coin3 x)]| = n. Lemma burnside_app2 : (square_coloring_number2 * 2 = n ^ 4 + n ^ 2)%N. Proof. (* Goal: @eq nat (muln square_coloring_number2 (S (S O))) (addn (expn n (S (S (S (S O))))) (expn n (S (S O)))) *) rewrite (burnside_formula [:: id1; sh]) => [||p]; last first. (* Goal: @eq nat (@BigOp.bigop nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) O (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) sh (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))) (fun p : Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) => @BigBody nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p addn true (@card (finfun_of_finType square_finType colors_finType) (@mem (Finite.sort (finfun_of_finType square_finType colors_finType)) (predPredType (Finite.sort (finfun_of_finType square_finType colors_finType))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@afix (perm_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (Phant (FinGroup.arg_sort (FinGroup.base (perm_finGroupType square_finType))))) (finfun_of_finType square_finType colors_finType) to (@set1 (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) p))))))) (addn (expn n (S (S (S (S O))))) (expn n (S (S O)))) *) (* Goal: is_true (@uniq (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) sh (@nil (@perm_of square_finType (Phant (Finite.sort square_finType))))))) *) (* Goal: @eq bool (@in_mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p (@mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) (seq_predType (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) sh (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))))) (@in_mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (@gval (perm_finGroupType square_finType) iso2_group)))) *) - (* Goal: @eq nat (@BigOp.bigop nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) O (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) sh (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))) (fun p : Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) => @BigBody nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p addn true (@card (finfun_of_finType square_finType colors_finType) (@mem (Finite.sort (finfun_of_finType square_finType colors_finType)) (predPredType (Finite.sort (finfun_of_finType square_finType colors_finType))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@afix (perm_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (Phant (FinGroup.arg_sort (FinGroup.base (perm_finGroupType square_finType))))) (finfun_of_finType square_finType colors_finType) to (@set1 (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) p))))))) (addn (expn n (S (S (S (S O))))) (expn n (S (S O)))) *) (* Goal: is_true (@uniq (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) sh (@nil (@perm_of square_finType (Phant (Finite.sort square_finType))))))) *) (* Goal: @eq bool (@in_mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p (@mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) (seq_predType (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) sh (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))))) (@in_mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (@gval (perm_finGroupType square_finType) iso2_group)))) *) by rewrite !inE. (* Goal: @eq nat (@BigOp.bigop nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) O (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) sh (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))) (fun p : Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) => @BigBody nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p addn true (@card (finfun_of_finType square_finType colors_finType) (@mem (Finite.sort (finfun_of_finType square_finType colors_finType)) (predPredType (Finite.sort (finfun_of_finType square_finType colors_finType))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@afix (perm_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (Phant (FinGroup.arg_sort (FinGroup.base (perm_finGroupType square_finType))))) (finfun_of_finType square_finType colors_finType) to (@set1 (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) p))))))) (addn (expn n (S (S (S (S O))))) (expn n (S (S O)))) *) (* Goal: is_true (@uniq (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) sh (@nil (@perm_of square_finType (Phant (Finite.sort square_finType))))))) *) - (* Goal: @eq nat (@BigOp.bigop nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) O (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) sh (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))) (fun p : Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) => @BigBody nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p addn true (@card (finfun_of_finType square_finType colors_finType) (@mem (Finite.sort (finfun_of_finType square_finType colors_finType)) (predPredType (Finite.sort (finfun_of_finType square_finType colors_finType))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@afix (perm_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (Phant (FinGroup.arg_sort (FinGroup.base (perm_finGroupType square_finType))))) (finfun_of_finType square_finType colors_finType) to (@set1 (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) p))))))) (addn (expn n (S (S (S (S O))))) (expn n (S (S O)))) *) (* Goal: is_true (@uniq (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) sh (@nil (@perm_of square_finType (Phant (Finite.sort square_finType))))))) *) by rewrite /= inE diff_id_sh. (* Goal: @eq nat (@BigOp.bigop nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) O (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) sh (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))) (fun p : Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) => @BigBody nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p addn true (@card (finfun_of_finType square_finType colors_finType) (@mem (Finite.sort (finfun_of_finType square_finType colors_finType)) (predPredType (Finite.sort (finfun_of_finType square_finType colors_finType))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@afix (perm_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (Phant (FinGroup.arg_sort (FinGroup.base (perm_finGroupType square_finType))))) (finfun_of_finType square_finType colors_finType) to (@set1 (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) p))))))) (addn (expn n (S (S (S (S O))))) (expn n (S (S O)))) *) by rewrite 2!big_cons big_nil addn0 {1}card_Fid F_Sh card_n2. Qed. Lemma burnside_app_rot : (square_coloring_number4 * 4 = n ^ 4 + n ^ 2 + 2 * n)%N. Proof. (* Goal: @eq nat (muln square_coloring_number4 (S (S (S (S O))))) (addn (addn (expn n (S (S (S (S O))))) (expn n (S (S O)))) (muln (S (S O)) n)) *) rewrite (burnside_formula [:: id1; r1; r2; r3]) => [||p]; last first. (* Goal: @eq nat (@BigOp.bigop nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) O (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))))) (fun p : Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) => @BigBody nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p addn true (@card (finfun_of_finType square_finType colors_finType) (@mem (Finite.sort (finfun_of_finType square_finType colors_finType)) (predPredType (Finite.sort (finfun_of_finType square_finType colors_finType))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@afix (perm_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (Phant (FinGroup.arg_sort (FinGroup.base (perm_finGroupType square_finType))))) (finfun_of_finType square_finType colors_finType) to (@set1 (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) p))))))) (addn (addn (expn n (S (S (S (S O))))) (expn n (S (S O)))) (muln (S (S O)) n)) *) (* Goal: is_true (@uniq (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType))))))))) *) (* Goal: @eq bool (@in_mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p (@mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) (seq_predType (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))))))) (@in_mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (@gval (perm_finGroupType square_finType) rotations_group)))) *) - (* Goal: @eq nat (@BigOp.bigop nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) O (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))))) (fun p : Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) => @BigBody nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p addn true (@card (finfun_of_finType square_finType colors_finType) (@mem (Finite.sort (finfun_of_finType square_finType colors_finType)) (predPredType (Finite.sort (finfun_of_finType square_finType colors_finType))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@afix (perm_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (Phant (FinGroup.arg_sort (FinGroup.base (perm_finGroupType square_finType))))) (finfun_of_finType square_finType colors_finType) to (@set1 (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) p))))))) (addn (addn (expn n (S (S (S (S O))))) (expn n (S (S O)))) (muln (S (S O)) n)) *) (* Goal: is_true (@uniq (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType))))))))) *) (* Goal: @eq bool (@in_mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p (@mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) (seq_predType (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))))))) (@in_mem (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (@gval (perm_finGroupType square_finType) rotations_group)))) *) by rewrite !inE !orbA. (* Goal: @eq nat (@BigOp.bigop nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) O (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))))) (fun p : Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) => @BigBody nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p addn true (@card (finfun_of_finType square_finType colors_finType) (@mem (Finite.sort (finfun_of_finType square_finType colors_finType)) (predPredType (Finite.sort (finfun_of_finType square_finType colors_finType))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@afix (perm_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (Phant (FinGroup.arg_sort (FinGroup.base (perm_finGroupType square_finType))))) (finfun_of_finType square_finType colors_finType) to (@set1 (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) p))))))) (addn (addn (expn n (S (S (S (S O))))) (expn n (S (S O)))) (muln (S (S O)) n)) *) (* Goal: is_true (@uniq (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType))))))))) *) - (* Goal: @eq nat (@BigOp.bigop nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) O (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))))) (fun p : Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) => @BigBody nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p addn true (@card (finfun_of_finType square_finType colors_finType) (@mem (Finite.sort (finfun_of_finType square_finType colors_finType)) (predPredType (Finite.sort (finfun_of_finType square_finType colors_finType))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@afix (perm_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (Phant (FinGroup.arg_sort (FinGroup.base (perm_finGroupType square_finType))))) (finfun_of_finType square_finType colors_finType) to (@set1 (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) p))))))) (addn (addn (expn n (S (S (S (S O))))) (expn n (S (S O)))) (muln (S (S O)) n)) *) (* Goal: is_true (@uniq (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType))))))))) *) by apply: map_uniq (fun p : {perm square} => p c0) _ _; rewrite /= !permE. (* Goal: @eq nat (@BigOp.bigop nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) O (@cons (@perm_of square_finType (Phant square)) id1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r1 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r2 (@cons (@perm_of square_finType (Phant (Finite.sort square_finType))) r3 (@nil (@perm_of square_finType (Phant (Finite.sort square_finType)))))))) (fun p : Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType)))) => @BigBody nat (Equality.sort (Finite.eqType (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))))) p addn true (@card (finfun_of_finType square_finType colors_finType) (@mem (Finite.sort (finfun_of_finType square_finType colors_finType)) (predPredType (Finite.sort (finfun_of_finType square_finType colors_finType))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@afix (perm_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) (Phant (FinGroup.arg_sort (FinGroup.base (perm_finGroupType square_finType))))) (finfun_of_finType square_finType colors_finType) to (@set1 (FinGroup.arg_finType (FinGroup.base (perm_finGroupType square_finType))) p))))))) (addn (addn (expn n (S (S (S (S O))))) (expn n (S (S O)))) (muln (S (S O)) n)) *) rewrite !big_cons big_nil /= addn0 {1}card_Fid F_r1 F_r2 F_r3. (* Goal: @eq nat (addn (expn n (S (S (S (S O))))) (addn (@card (finfun_of_finType square_finType colors_finType) (@mem (@finfun_of square_finType colors (Phant (forall _ : square, colors))) (predPredType (@finfun_of square_finType colors (Phant (forall _ : square, colors)))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@SetDef.finset (finfun_of_finType square_finType colors_finType) (fun x : Finite.sort (finfun_of_finType square_finType colors_finType) => andb (andb (@eq_op colors_eqType (coin0 x) (coin1 x)) (@eq_op colors_eqType (coin1 x) (coin2 x))) (@eq_op colors_eqType (coin2 x) (coin3 x))))))) (addn (@card (finfun_of_finType square_finType colors_finType) (@mem (@finfun_of square_finType colors (Phant (forall _ : square, colors))) (predPredType (@finfun_of square_finType colors (Phant (forall _ : square, colors)))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@SetDef.finset (finfun_of_finType square_finType colors_finType) (fun x : Finite.sort (finfun_of_finType square_finType colors_finType) => andb (@eq_op colors_eqType (coin0 x) (coin2 x)) (@eq_op colors_eqType (coin1 x) (coin3 x))))))) (@card (finfun_of_finType square_finType colors_finType) (@mem (@finfun_of square_finType colors (Phant (forall _ : square, colors))) (predPredType (@finfun_of square_finType colors (Phant (forall _ : square, colors)))) (@SetDef.pred_of_set (finfun_of_finType square_finType colors_finType) (@SetDef.finset (finfun_of_finType square_finType colors_finType) (fun x : Finite.sort (finfun_of_finType square_finType colors_finType) => andb (andb (@eq_op colors_eqType (coin0 x) (coin1 x)) (@eq_op colors_eqType (coin1 x) (coin2 x))) (@eq_op colors_eqType (coin2 x) (coin3 x)))))))))) (addn (addn (expn n (S (S (S (S O))))) (expn n (S (S O)))) (muln (S (S O)) n)) *) by rewrite card_n card_n2 //=; ring. Qed. Lemma F_Sd1 : 'Fix_to[sd1] = [set x | coin1 x == coin3 x]. Proof. (* Goal: @eq (@set_of (finfun_of_finType square_finType colors_finType) (Phant (Finite.sort (finfun_of_finType square_finType colors_finType)))) (@afix (perm_of_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))))) (finfun_of_finType square_finType colors_finType) to (@set1 (perm_for_finType square_finType) sd1)) (@SetDef.finset (finfun_of_finType square_finType colors_finType) (fun x : Finite.sort (finfun_of_finType square_finType colors_finType) => @eq_op colors_eqType (coin1 x) (coin3 x))) *) apply/setP => x; rewrite (sameP afix1P eqP) !inE eqperm_map /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sd1) c0) (@FunFinfun.fun_of_fin square_finType colors x c0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sd1) c1) (@FunFinfun.fun_of_fin square_finType colors x c1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sd1) c2) (@FunFinfun.fun_of_fin square_finType colors x c2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sd1) c3) (@FunFinfun.fun_of_fin square_finType colors x c3)) true)))) (@eq_op colors_eqType (coin1 x) (coin3 x)) *) rewrite /act_f sd1_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (Sd1 c0)) (@FunFinfun.fun_of_fin square_finType colors x c0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (Sd1 c1)) (@FunFinfun.fun_of_fin square_finType colors x c1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (Sd1 c2)) (@FunFinfun.fun_of_fin square_finType colors x c2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors x (Sd1 c3)) (@FunFinfun.fun_of_fin square_finType colors x c3)) true)))) (@eq_op colors_eqType (coin1 x) (coin3 x)) *) by rewrite !eqxx !andbT eq_sym /= andbb. Qed. Lemma card_n3 : forall x y : square, x != y -> #|[set k : col_squares | k x == k y]| = (n ^ 3)%N. Lemma F_Sd2 : 'Fix_to[sd2] = [set x | coin0 x == coin2 x]. Proof. (* Goal: @eq (@set_of (finfun_of_finType square_finType colors_finType) (Phant (Finite.sort (finfun_of_finType square_finType colors_finType)))) (@afix (perm_of_finGroupType square_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType square_finType)))))) (finfun_of_finType square_finType colors_finType) to (@set1 (perm_for_finType square_finType) sd2)) (@SetDef.finset (finfun_of_finType square_finType colors_finType) (fun x : Finite.sort (finfun_of_finType square_finType colors_finType) => @eq_op colors_eqType (coin0 x) (coin2 x))) *) apply/setP => x; rewrite (sameP afix1P eqP) !inE eqperm_map /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sd2) c0) (@FunFinfun.fun_of_fin square_finType colors x c0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sd2) c1) (@FunFinfun.fun_of_fin square_finType colors x c1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sd2) c2) (@FunFinfun.fun_of_fin square_finType colors x c2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin square_finType colors (act_f x sd2) c3) (@FunFinfun.fun_of_fin square_finType colors x c3)) true)))) (@eq_op colors_eqType (coin0 x) (coin2 x)) *) by rewrite /act_f sd2_inv !ffunE !permE /= !eqxx !andbT eq_sym /= andbb. Qed. Lemma burnside_app_iso : (square_coloring_number8 * 8 = n ^ 4 + 2 * n ^ 3 + 3 * n ^ 2 + 2 * n)%N. End square_colouring. Section cube_colouring. Definition cube := 'I_6. Canonical cube_eqType := Eval hnf in [eqType of cube]. Canonical cube_choiceType := Eval hnf in [choiceType of cube]. Canonical cube_countType := Eval hnf in [countType of cube]. Canonical cube_finType := Eval hnf in [finType of cube]. Canonical cube_subType := Eval hnf in [subType of cube]. Canonical cube_subCountType := Eval hnf in [subCountType of cube]. Canonical cube_subFinType := Eval hnf in [subFinType of cube]. Definition mkFcube i : cube := Sub (i %% 6) (ltn_mod i 6). Definition F0 := mkFcube 0. Definition F1 := mkFcube 1. Definition F2 := mkFcube 2. Definition F3 := mkFcube 3. Definition F4 := mkFcube 4. Definition F5 := mkFcube 5. Definition S05 := [:: F0; F4; F3; F2; F1; F5]. Definition S05f (sc : cube) : cube := tnth [tuple of S05] sc. Definition S14 := [:: F5; F1; F3; F2; F4; F0]. Definition S14f (sc : cube) : cube := tnth [tuple of S14] sc. Definition S23 := [:: F5; F4; F2; F3; F1; F0]. Definition S23f (sc : cube) : cube := tnth [tuple of S23] sc. Definition R05 := [:: F0; F2; F4; F1; F3; F5]. Definition R05f (sc : cube) : cube := tnth [tuple of R05] sc. Definition R50 := [:: F0; F3; F1; F4; F2; F5]. Definition R50f (sc : cube) : cube := tnth [tuple of R50] sc. Definition R14 := [:: F3; F1; F0; F5; F4; F2]. Definition R14f (sc : cube) : cube := tnth [tuple of R14] sc. Definition R41 := [:: F2; F1; F5; F0; F4; F3]. Definition R41f (sc : cube) : cube := tnth [tuple of R41] sc. Definition R23 := [:: F1; F5; F2; F3; F0; F4]. Definition R23f (sc : cube) : cube := tnth [tuple of R23] sc. Definition R32 := [:: F4; F0; F2; F3; F5; F1]. Definition R32f (sc : cube) : cube := tnth [tuple of R32] sc. Definition R024 := [:: F2; F5; F4; F1; F0; F3]. Definition R024f (sc : cube) : cube := tnth [tuple of R024] sc. Definition R042 := [:: F4; F3; F0; F5; F2; F1]. Definition R042f (sc : cube) : cube := tnth [tuple of R042] sc. Definition R012 := [:: F1; F2; F0; F5; F3; F4]. Definition R012f (sc : cube) : cube := tnth [tuple of R012] sc. Definition R021 := [:: F2; F0; F1; F4; F5; F3]. Definition R021f (sc : cube) : cube := tnth [tuple of R021] sc. Definition R031 := [:: F3; F0; F4; F1; F5; F2]. Definition R031f (sc : cube) : cube := tnth [tuple of R031] sc. Definition R013 := [:: F1; F3; F5; F0; F2; F4]. Definition R013f (sc : cube) : cube := tnth [tuple of R013] sc. Definition R043 := [:: F4; F2; F5; F0; F3; F1]. Definition R043f (sc : cube) : cube := tnth [tuple of R043] sc. Definition R034 := [:: F3; F5; F1; F4; F0; F2]. Definition R034f (sc : cube) : cube := tnth [tuple of R034] sc. Definition S1 := [:: F5; F2; F1; F4; F3; F0]. Definition S1f (sc : cube) : cube := tnth [tuple of S1] sc. Definition S2 := [:: F5; F3; F4; F1; F2; F0]. Definition S2f (sc : cube) : cube := tnth [tuple of S2] sc. Definition S3 := [:: F1; F0; F3; F2; F5; F4]. Definition S3f (sc : cube) : cube := tnth [tuple of S3] sc. Definition S4 := [:: F4; F5; F3; F2; F0; F1]. Definition S4f (sc : cube) : cube := tnth [tuple of S4] sc. Definition S5 := [:: F2; F4; F0; F5; F1; F3]. Definition S5f (sc : cube) : cube := tnth [tuple of S5] sc. Definition S6 := [::F3; F4; F5; F0; F1; F2]. Definition S6f (sc : cube) : cube := tnth [tuple of S6] sc. Lemma S1_inv : involutive S1f. Proof. (* Goal: @involutive cube S1f *) by move=> z; apply/eqP; case: z; do 6?case. Qed. Lemma S2_inv : involutive S2f. Proof. (* Goal: @involutive cube S2f *) by move=> z; apply/eqP; case: z; do 6?case. Qed. Lemma S3_inv : involutive S3f. Proof. (* Goal: @involutive cube S3f *) by move=> z; apply/eqP; case: z; do 6?case. Qed. Lemma S4_inv : involutive S4f. Proof. (* Goal: @involutive cube S4f *) by move=> z; apply/eqP; case: z; do 6?case. Qed. Lemma S5_inv : involutive S5f. Proof. (* Goal: @involutive cube S5f *) by move=> z; apply/eqP; case: z; do 6?case. Qed. Lemma S6_inv : involutive S6f. Lemma S05_inj : injective S05f. Proof. (* Goal: @injective cube cube S05f *) by apply: can_inj S05f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma S14_inj : injective S14f. Proof. (* Goal: @injective cube cube S14f *) by apply: can_inj S14f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma S23_inv : involutive S23f. Proof. (* Goal: @involutive cube S23f *) by move=> z; apply/eqP; case: z; do 6?case. Qed. Lemma R05_inj : injective R05f. Proof. (* Goal: @injective cube cube R05f *) by apply: can_inj R50f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma R14_inj : injective R14f. Proof. (* Goal: @injective cube cube R14f *) by apply: can_inj R41f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma R23_inj : injective R23f. Proof. (* Goal: @injective cube cube R23f *) by apply: can_inj R32f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma R50_inj : injective R50f. Proof. (* Goal: @injective cube cube R50f *) by apply: can_inj R05f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma R41_inj : injective R41f. Proof. (* Goal: @injective cube cube R41f *) by apply: can_inj R14f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma R32_inj : injective R32f. Proof. (* Goal: @injective cube cube R32f *) by apply: can_inj R23f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma R024_inj : injective R024f. Proof. (* Goal: @injective cube cube R024f *) by apply: can_inj R042f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma R042_inj : injective R042f. Proof. (* Goal: @injective cube cube R042f *) by apply: can_inj R024f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma R012_inj : injective R012f. Proof. (* Goal: @injective cube cube R012f *) by apply: can_inj R021f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma R021_inj : injective R021f. Proof. (* Goal: @injective cube cube R021f *) by apply: can_inj R012f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma R031_inj : injective R031f. Proof. (* Goal: @injective cube cube R031f *) by apply: can_inj R013f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma R013_inj : injective R013f. Proof. (* Goal: @injective cube cube R013f *) by apply: can_inj R031f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma R043_inj : injective R043f. Proof. (* Goal: @injective cube cube R043f *) by apply: can_inj R034f _ => z; apply/eqP; case: z; do 6?case. Qed. Lemma R034_inj : injective R034f. Proof. (* Goal: @injective cube cube R034f *) by apply: can_inj R043f _ => z; apply/eqP; case: z; do 6?case. Qed. Definition id3 := 1 : {perm cube}. Definition s05 := (perm S05_inj). Definition s14 : {perm cube}. Definition s23 := (perm (inv_inj S23_inv)). Definition r05 := (perm R05_inj). Definition r14 := (perm R14_inj). Definition r23 := (perm R23_inj). Definition r50 := (perm R50_inj). Definition r41 := (perm R41_inj). Definition r32 := (perm R32_inj). Definition r024 := (perm R024_inj). Definition r042 := (perm R042_inj). Definition r012 := (perm R012_inj). Definition r021 := (perm R021_inj). Definition r031 := (perm R031_inj). Definition r013 := (perm R013_inj). Definition r043 := (perm R043_inj). Definition r034 := (perm R034_inj). Definition s1 := (perm (inv_inj S1_inv)). Definition s2 := (perm (inv_inj S2_inv)). Definition s3 := (perm (inv_inj S3_inv)). Definition s4 := (perm (inv_inj S4_inv)). Definition s5 := (perm (inv_inj S5_inv)). Definition s6 := (perm (inv_inj S6_inv)). Definition dir_iso3 := [set p | [|| id3 == p, s05 == p, s14 == p, s23 == p, r05 == p, r14 == p, r23 == p, r50 == p, r41 == p, r32 == p, r024 == p, r042 == p, r012 == p, r021 == p, r031 == p, r013 == p, r043 == p, r034 == p, s1 == p, s2 == p, s3 == p, s4 == p, s5 == p | s6 == p]]. Definition dir_iso3l := [:: id3; s05; s14; s23; r05; r14; r23; r50; r41; r32; r024; r042; r012; r021; r031; r013; r043; r034; s1; s2; s3; s4; s5; s6]. Definition S0 := [:: F5; F4; F3; F2; F1; F0]. Definition S0f (sc : cube) : cube := tnth [tuple of S0] sc. Lemma S0_inv : involutive S0f. Proof. (* Goal: @involutive cube S0f *) by move=> z; apply/eqP; case: z; do 6?case. Qed. Definition s0 := (perm (inv_inj S0_inv)). Definition is_iso3 (p : {perm cube}) := forall fi, p (s0 fi) = s0 (p fi). Lemma dir_iso_iso3 : forall p, p \in dir_iso3 -> is_iso3 p. Proof. (* Goal: forall (p : Finite.sort (perm_for_finType cube_finType)) (_ : is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) p (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)))), is_iso3 p *) move=> p; rewrite inE. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 p) (orb (@eq_op (perm_for_eqType cube_finType) s05 p) (orb (@eq_op (perm_for_eqType cube_finType) s14 p) (orb (@eq_op (perm_for_eqType cube_finType) s23 p) (orb (@eq_op (perm_for_eqType cube_finType) r05 p) (orb (@eq_op (perm_for_eqType cube_finType) r14 p) (orb (@eq_op (perm_for_eqType cube_finType) r23 p) (orb (@eq_op (perm_for_eqType cube_finType) r50 p) (orb (@eq_op (perm_for_eqType cube_finType) r41 p) (orb (@eq_op (perm_for_eqType cube_finType) r32 p) (orb (@eq_op (perm_for_eqType cube_finType) r024 p) (orb (@eq_op (perm_for_eqType cube_finType) r042 p) (orb (@eq_op (perm_for_eqType cube_finType) r012 p) (orb (@eq_op (perm_for_eqType cube_finType) r021 p) (orb (@eq_op (perm_for_eqType cube_finType) r031 p) (orb (@eq_op (perm_for_eqType cube_finType) r013 p) (orb (@eq_op (perm_for_eqType cube_finType) r043 p) (orb (@eq_op (perm_for_eqType cube_finType) r034 p) (orb (@eq_op (perm_for_eqType cube_finType) s1 p) (orb (@eq_op (perm_for_eqType cube_finType) s2 p) (orb (@eq_op (perm_for_eqType cube_finType) s3 p) (orb (@eq_op (perm_for_eqType cube_finType) s4 p) (orb (@eq_op (perm_for_eqType cube_finType) s5 p) (@eq_op (perm_for_eqType cube_finType) s6 p)))))))))))))))))))))))), is_iso3 p *) by do ?case/orP; move/eqP=> <- a; rewrite !permE; case: a; do 6?case. Qed. Lemma iso3_ndir : forall p, p \in dir_iso3 -> is_iso3 (s0 * p). Proof. (* Goal: forall (p : Finite.sort (perm_for_finType cube_finType)) (_ : is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) p (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)))), is_iso3 (@mulg (perm_of_baseFinGroupType cube_finType) s0 p) *) move=> p; rewrite inE. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 p) (orb (@eq_op (perm_for_eqType cube_finType) s05 p) (orb (@eq_op (perm_for_eqType cube_finType) s14 p) (orb (@eq_op (perm_for_eqType cube_finType) s23 p) (orb (@eq_op (perm_for_eqType cube_finType) r05 p) (orb (@eq_op (perm_for_eqType cube_finType) r14 p) (orb (@eq_op (perm_for_eqType cube_finType) r23 p) (orb (@eq_op (perm_for_eqType cube_finType) r50 p) (orb (@eq_op (perm_for_eqType cube_finType) r41 p) (orb (@eq_op (perm_for_eqType cube_finType) r32 p) (orb (@eq_op (perm_for_eqType cube_finType) r024 p) (orb (@eq_op (perm_for_eqType cube_finType) r042 p) (orb (@eq_op (perm_for_eqType cube_finType) r012 p) (orb (@eq_op (perm_for_eqType cube_finType) r021 p) (orb (@eq_op (perm_for_eqType cube_finType) r031 p) (orb (@eq_op (perm_for_eqType cube_finType) r013 p) (orb (@eq_op (perm_for_eqType cube_finType) r043 p) (orb (@eq_op (perm_for_eqType cube_finType) r034 p) (orb (@eq_op (perm_for_eqType cube_finType) s1 p) (orb (@eq_op (perm_for_eqType cube_finType) s2 p) (orb (@eq_op (perm_for_eqType cube_finType) s3 p) (orb (@eq_op (perm_for_eqType cube_finType) s4 p) (orb (@eq_op (perm_for_eqType cube_finType) s5 p) (@eq_op (perm_for_eqType cube_finType) s6 p)))))))))))))))))))))))), is_iso3 (@mulg (perm_of_baseFinGroupType cube_finType) s0 p) *) by do ?case/orP; move/eqP=> <- a; rewrite !(permM, permE); case: a; do 6?case. Qed. Definition sop (p : {perm cube}) : seq cube := val (val (val p)). Lemma sop_inj : injective sop. Proof. (* Goal: @injective (list cube) (@perm_of cube_finType (Phant cube)) sop *) by do 2!apply: (inj_comp val_inj); apply: val_inj. Qed. Definition prod_tuple (t1 t2 : seq cube) := map (fun n : 'I_6 => nth F0 t2 n) t1. Lemma sop_spec : forall x (n0 : 'I_6), nth F0 (sop x) n0 = x n0. Proof. (* Goal: forall (x : @perm_of cube_finType (Phant cube)) (n0 : ordinal (S (S (S (S (S (S O))))))), @eq cube (@nth cube F0 (sop x) (@nat_of_ord (S (S (S (S (S (S O)))))) n0)) (@PermDef.fun_of_perm cube_finType x n0) *) by move=> x n0; rewrite -pvalE unlock enum_rank_ord (tnth_nth F0). Qed. Lemma prod_t_correct : forall (x y : {perm cube}) (i : cube), (x * y) i = nth F0 (prod_tuple (sop x) (sop y)) i. Proof. (* Goal: forall (x y : @perm_of cube_finType (Phant cube)) (i : cube), @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType (@mulg (perm_of_baseFinGroupType cube_finType) x y) i) (@nth cube F0 (prod_tuple (sop x) (sop y)) (@nat_of_ord (S (S (S (S (S (S O)))))) i)) *) move=> x y i; rewrite permM -!sop_spec (nth_map F0) // size_tuple /=. (* Goal: is_true (leq (S (@nat_of_ord (S (S (S (S (S (S O)))))) i)) (@card cube_finType (@mem cube (predPredType cube) (@sort_of_simpl_pred cube (pred_of_argType cube))))) *) by rewrite card_ord ltn_ord. Qed. Lemma sop_morph : {morph sop : x y / x * y >-> prod_tuple x y}. Definition ecubes : seq cube := [:: F0; F1; F2; F3; F4; F5]. Lemma ecubes_def : ecubes = enum (@predT cube). Proof. (* Goal: @eq (list cube) ecubes (@enum_mem cube_finType (@mem cube (simplPredType cube) (@predT cube))) *) by apply: (inj_map val_inj); rewrite val_enum_ord. Qed. Definition seq_iso_L := [:: [:: F0; F1; F2; F3; F4; F5]; S05; S14; S23; R05; R14; R23; R50; R41; R32; R024; R042; R012; R021; R031; R013; R043; R034; S1; S2; S3; S4; S5; S6]. Lemma seqs1 : forall f injf, sop (@perm _ f injf) = map f ecubes. Proof. (* Goal: forall (f : forall _ : Finite.sort cube_finType, Finite.sort cube_finType) (injf : @injective (Finite.sort cube_finType) (Finite.sort cube_finType) f), @eq (list cube) (sop (@PermDef.perm cube_finType f injf)) (@map (Finite.sort cube_finType) (Finite.sort cube_finType) f ecubes) *) move=> f ?; rewrite ecubes_def /sop /= -codom_ffun pvalE. (* Goal: @eq (list cube) (@codom cube_finType cube (@PermDef.fun_of_perm cube_finType (@PermDef.perm cube_finType f _injf_))) (@map cube cube f (@enum_mem cube_finType (@mem cube (simplPredType cube) (@predT cube)))) *) by apply: eq_codom; apply: permE. Qed. Lemma Lcorrect : seq_iso_L == map sop [:: id3; s05; s14; s23; r05; r14; r23; r50; r41; r32; r024; r042; r012; r021; r031; r013; r043; r034; s1; s2; s3; s4; s5; s6]. Proof. (* Goal: is_true (@eq_op (seq_eqType (seq_eqType cube_eqType)) seq_iso_L (@map (@perm_of cube_finType (Phant cube)) (list cube) sop (@cons (@perm_of cube_finType (Phant cube)) id3 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) s05 (@cons (@perm_of cube_finType (Phant cube)) s14 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) s23 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r05 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r14 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r23 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r50 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r41 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r32 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r024 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r042 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r012 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r021 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r031 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r013 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r043 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) r034 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) s1 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) s2 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) s3 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) s4 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) s5 (@cons (@perm_of cube_finType (Phant (Finite.sort cube_finType))) s6 (@nil (@perm_of cube_finType (Phant (Finite.sort cube_finType)))))))))))))))))))))))))))))) *) by rewrite /= !seqs1. Qed. Lemma iso0_1 : dir_iso3 =i dir_iso3l. Proof. (* Goal: @eq_mem (Finite.sort (perm_for_finType cube_finType)) (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)) (@mem (Equality.sort (perm_for_eqType cube_finType)) (seq_predType (perm_for_eqType cube_finType)) dir_iso3l) *) by move=> p; rewrite /= !inE /= -!(eq_sym p). Qed. Lemma L_iso : forall p, (p \in dir_iso3) = (sop p \in seq_iso_L). Proof. (* Goal: forall p : Finite.sort (perm_for_finType cube_finType), @eq bool (@in_mem (Finite.sort (perm_for_finType cube_finType)) p (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3))) (@in_mem (list cube) (sop p) (@mem (Equality.sort (seq_eqType cube_eqType)) (seq_predType (seq_eqType cube_eqType)) seq_iso_L)) *) by move=> p; rewrite (eqP Lcorrect) mem_map ?iso0_1 //; apply: sop_inj. Qed. Lemma stable : forall x y, x \in dir_iso3 -> y \in dir_iso3 -> x * y \in dir_iso3. Proof. (* Goal: forall (x y : Finite.sort (perm_for_finType cube_finType)) (_ : is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)))) (_ : is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) y (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)))), is_true (@in_mem (FinGroup.sort (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) x y) (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3))) *) move=> x y; rewrite !L_iso sop_morph => Hx Hy. (* Goal: is_true (@in_mem (list cube) (prod_tuple (sop x) (sop y)) (@mem (Equality.sort (seq_eqType cube_eqType)) (seq_predType (seq_eqType cube_eqType)) seq_iso_L)) *) by move/sop: y Hy; apply/allP; move/sop: x Hx; apply/allP; vm_compute. Qed. Lemma iso_eq_F0_F1 : forall r s : {perm cube}, r \in dir_iso3 -> s \in dir_iso3 -> r F0 = s F0 -> r F1 = s F1 -> r = s. Lemma ndir_s0p : forall p, p \in dir_iso3 -> s0 * p \notin dir_iso3. Proof. (* Goal: forall (p : Finite.sort (perm_for_finType cube_finType)) (_ : is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) p (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)))), is_true (negb (@in_mem (FinGroup.sort (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) s0 p) (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)))) *) move=> p; rewrite !L_iso sop_morph seqs1. (* Goal: forall _ : is_true (@in_mem (list cube) (sop p) (@mem (Equality.sort (seq_eqType cube_eqType)) (seq_predType (seq_eqType cube_eqType)) seq_iso_L)), is_true (negb (@in_mem (list cube) (prod_tuple (@map (Finite.sort cube_finType) (Finite.sort cube_finType) S0f ecubes) (sop p)) (@mem (Equality.sort (seq_eqType cube_eqType)) (seq_predType (seq_eqType cube_eqType)) seq_iso_L))) *) by move/sop: p; apply/allP; vm_compute. Qed. Definition indir_iso3l := map (mulg s0) dir_iso3l. Definition iso3l := dir_iso3l ++ indir_iso3l. Definition seq_iso3_L := map sop iso3l. Lemma eqperm : forall p1 p2 : {perm cube}, (p1 == p2) = all (fun s => p1 s == p2 s) ecubes. Proof. (* Goal: forall p1 p2 : @perm_of cube_finType (Phant cube), @eq bool (@eq_op (perm_for_eqType cube_finType) p1 p2) (@all (Finite.sort cube_finType) (fun s : Finite.sort cube_finType => @eq_op (Finite.eqType cube_finType) (@PermDef.fun_of_perm cube_finType p1 s) (@PermDef.fun_of_perm cube_finType p2 s)) ecubes) *) move=> p1 p2; apply/eqP/allP=> [-> // | Ep12]; apply/permP=> x. (* Goal: @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType p1 x) (@PermDef.fun_of_perm cube_finType p2 x) *) by apply/eqP; rewrite Ep12 // ecubes_def mem_enum. Qed. Lemma iso_eq_F0_F1_F2 : forall r s : {perm cube}, is_iso3 r -> is_iso3 s -> r F0 = s F0 -> r F1 = s F1 -> r F2 = s F2 -> r = s. Proof. (* Goal: forall (r s : @perm_of cube_finType (Phant cube)) (_ : is_iso3 r) (_ : is_iso3 s) (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F0) (@PermDef.fun_of_perm cube_finType s F0)) (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F1) (@PermDef.fun_of_perm cube_finType s F1)) (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F2) (@PermDef.fun_of_perm cube_finType s F2)), @eq (@perm_of cube_finType (Phant cube)) r s *) move=> r s hr hs hrs0 hrs1 hrs2. (* Goal: @eq (@perm_of cube_finType (Phant cube)) r s *) have:= hrs0; have:= hrs1; have:= hrs2. (* Goal: forall (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F2) (@PermDef.fun_of_perm cube_finType s F2)) (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F1) (@PermDef.fun_of_perm cube_finType s F1)) (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F0) (@PermDef.fun_of_perm cube_finType s F0)), @eq (@perm_of cube_finType (Phant cube)) r s *) have e23: F2 = s0 F3 by apply/eqP; rewrite permE /S0f (tnth_nth F0). (* Goal: forall (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F2) (@PermDef.fun_of_perm cube_finType s F2)) (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F1) (@PermDef.fun_of_perm cube_finType s F1)) (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F0) (@PermDef.fun_of_perm cube_finType s F0)), @eq (@perm_of cube_finType (Phant cube)) r s *) have e14: F1 = s0 F4 by apply/eqP; rewrite permE /S0f (tnth_nth F0). (* Goal: forall (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F2) (@PermDef.fun_of_perm cube_finType s F2)) (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F1) (@PermDef.fun_of_perm cube_finType s F1)) (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F0) (@PermDef.fun_of_perm cube_finType s F0)), @eq (@perm_of cube_finType (Phant cube)) r s *) have e05: F0 = s0 F5 by apply/eqP; rewrite permE /S0f (tnth_nth F0). (* Goal: forall (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F2) (@PermDef.fun_of_perm cube_finType s F2)) (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F1) (@PermDef.fun_of_perm cube_finType s F1)) (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType r F0) (@PermDef.fun_of_perm cube_finType s F0)), @eq (@perm_of cube_finType (Phant cube)) r s *) rewrite e23 e14 e05; rewrite !hr !hs. (* Goal: forall (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType s0 (@PermDef.fun_of_perm cube_finType r F3)) (@PermDef.fun_of_perm cube_finType s0 (@PermDef.fun_of_perm cube_finType s F3))) (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType s0 (@PermDef.fun_of_perm cube_finType r F4)) (@PermDef.fun_of_perm cube_finType s0 (@PermDef.fun_of_perm cube_finType s F4))) (_ : @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType s0 (@PermDef.fun_of_perm cube_finType r F5)) (@PermDef.fun_of_perm cube_finType s0 (@PermDef.fun_of_perm cube_finType s F5))), @eq (@perm_of cube_finType (Phant cube)) r s *) move/perm_inj=> hrs3; move/perm_inj=> hrs4; move/perm_inj=> hrs5. (* Goal: @eq (@perm_of cube_finType (Phant cube)) r s *) by apply/eqP; rewrite eqperm /= hrs0 hrs1 hrs2 hrs3 hrs4 hrs5 !eqxx. Qed. Ltac iso_tac := let a := fresh "a" in apply/permP => a; apply/eqP; rewrite !permM !permE; case: a; do 6?case. Ltac inv_tac := apply: esym (etrans _ (mul1g _)); apply: canRL (mulgK _) _; iso_tac. Lemma dir_s0p : forall p, (s0 * p) \in dir_iso3 -> p \notin dir_iso3. Proof. (* Goal: forall (p : FinGroup.arg_sort (perm_of_baseFinGroupType cube_finType)) (_ : is_true (@in_mem (FinGroup.sort (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) s0 p) (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)))), is_true (negb (@in_mem (FinGroup.arg_sort (perm_of_baseFinGroupType cube_finType)) p (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)))) *) move=> p Hs0p; move: (ndir_s0p Hs0p); rewrite mulgA. (* Goal: forall _ : is_true (negb (@in_mem (FinGroup.sort (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) s0 s0) p) (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)))), is_true (negb (@in_mem (FinGroup.arg_sort (perm_of_baseFinGroupType cube_finType)) p (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)))) *) have e: (s0^-1=s0) by inv_tac. (* Goal: forall _ : is_true (negb (@in_mem (FinGroup.sort (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) s0 s0) p) (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)))), is_true (negb (@in_mem (FinGroup.arg_sort (perm_of_baseFinGroupType cube_finType)) p (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)))) *) by rewrite -{1}e mulVg mul1g. Qed. Definition is_iso3b p := (p * s0 == s0 * p). Definition iso3 := [set p | is_iso3b p]. Lemma is_iso3P : forall p, reflect (is_iso3 p) (p \in iso3). Proof. (* Goal: forall p : @perm_of cube_finType (Phant cube), Bool.reflect (is_iso3 p) (@in_mem (@perm_of cube_finType (Phant cube)) p (@mem (Finite.sort (FinGroup.arg_finType (perm_of_baseFinGroupType cube_finType))) (predPredType (Finite.sort (FinGroup.arg_finType (perm_of_baseFinGroupType cube_finType)))) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_of_baseFinGroupType cube_finType)) iso3))) *) move=> p; apply: (iffP idP); rewrite inE /iso3 /is_iso3b /is_iso3 => e. (* Goal: is_true (@eq_op (FinGroup.eqType (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) p s0) (@mulg (perm_of_baseFinGroupType cube_finType) s0 p)) *) (* Goal: forall fi : Finite.sort cube_finType, @eq (Finite.sort cube_finType) (@PermDef.fun_of_perm cube_finType p (@PermDef.fun_of_perm cube_finType s0 fi)) (@PermDef.fun_of_perm cube_finType s0 (@PermDef.fun_of_perm cube_finType p fi)) *) by move=> fi; rewrite -!permM (eqP e). (* Goal: is_true (@eq_op (FinGroup.eqType (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) p s0) (@mulg (perm_of_baseFinGroupType cube_finType) s0 p)) *) by apply/eqP; apply/permP=> z; rewrite !permM (e z). Qed. Lemma group_set_iso3 : group_set iso3. Proof. (* Goal: is_true (@group_set (perm_of_finGroupType cube_finType) iso3) *) apply/group_setP; split. (* Goal: @prop_in11 (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) iso3)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) iso3)) (fun x y : FinGroup.arg_sort (FinGroup.base (perm_of_finGroupType cube_finType)) => is_true (@in_mem (FinGroup.sort (FinGroup.base (perm_of_finGroupType cube_finType))) (@mulg (FinGroup.base (perm_of_finGroupType cube_finType)) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) iso3)))) (inPhantom (forall x y : FinGroup.arg_sort (FinGroup.base (perm_of_finGroupType cube_finType)), is_true (@in_mem (FinGroup.sort (FinGroup.base (perm_of_finGroupType cube_finType))) (@mulg (FinGroup.base (perm_of_finGroupType cube_finType)) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) iso3))))) *) (* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base (perm_of_finGroupType cube_finType))) (oneg (FinGroup.base (perm_of_finGroupType cube_finType))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) iso3))) *) by apply/is_iso3P => fi; rewrite -!permM mulg1 mul1g. (* Goal: @prop_in11 (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) iso3)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) iso3)) (fun x y : FinGroup.arg_sort (FinGroup.base (perm_of_finGroupType cube_finType)) => is_true (@in_mem (FinGroup.sort (FinGroup.base (perm_of_finGroupType cube_finType))) (@mulg (FinGroup.base (perm_of_finGroupType cube_finType)) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) iso3)))) (inPhantom (forall x y : FinGroup.arg_sort (FinGroup.base (perm_of_finGroupType cube_finType)), is_true (@in_mem (FinGroup.sort (FinGroup.base (perm_of_finGroupType cube_finType))) (@mulg (FinGroup.base (perm_of_finGroupType cube_finType)) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) iso3))))) *) move=> x1 y; rewrite /iso3 !inE /= /is_iso3. (* Goal: forall (_ : is_true (is_iso3b x1)) (_ : is_true (is_iso3b y)), is_true (is_iso3b (@mulg (perm_of_baseFinGroupType cube_finType) x1 y)) *) rewrite /is_iso3b. (* Goal: forall (_ : is_true (@eq_op (FinGroup.eqType (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) x1 s0) (@mulg (perm_of_baseFinGroupType cube_finType) s0 x1))) (_ : is_true (@eq_op (FinGroup.eqType (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) y s0) (@mulg (perm_of_baseFinGroupType cube_finType) s0 y))), is_true (@eq_op (FinGroup.eqType (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) x1 y) s0) (@mulg (perm_of_baseFinGroupType cube_finType) s0 (@mulg (perm_of_baseFinGroupType cube_finType) x1 y))) *) rewrite -mulgA. (* Goal: forall (_ : is_true (@eq_op (FinGroup.eqType (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) x1 s0) (@mulg (perm_of_baseFinGroupType cube_finType) s0 x1))) (_ : is_true (@eq_op (FinGroup.eqType (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) y s0) (@mulg (perm_of_baseFinGroupType cube_finType) s0 y))), is_true (@eq_op (FinGroup.eqType (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) x1 (@mulg (perm_of_baseFinGroupType cube_finType) y s0)) (@mulg (perm_of_baseFinGroupType cube_finType) s0 (@mulg (perm_of_baseFinGroupType cube_finType) x1 y))) *) move/eqP => hx1; move/eqP => hy. (* Goal: is_true (@eq_op (FinGroup.eqType (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) x1 (@mulg (perm_of_baseFinGroupType cube_finType) y s0)) (@mulg (perm_of_baseFinGroupType cube_finType) s0 (@mulg (perm_of_baseFinGroupType cube_finType) x1 y))) *) rewrite hy !mulgA. (* Goal: is_true (@eq_op (FinGroup.eqType (perm_of_baseFinGroupType cube_finType)) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) x1 s0) y) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) s0 x1) y)) *) by rewrite -hx1. Qed. Canonical iso_group3 := Group group_set_iso3. Lemma group_set_diso3 : group_set dir_iso3. Proof. (* Goal: is_true (@group_set (perm_of_finGroupType cube_finType) dir_iso3) *) apply/group_setP; split; first by rewrite inE eqxx /=. (* Goal: @prop_in11 (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) dir_iso3)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) dir_iso3)) (fun x y : FinGroup.arg_sort (FinGroup.base (perm_of_finGroupType cube_finType)) => is_true (@in_mem (FinGroup.sort (FinGroup.base (perm_of_finGroupType cube_finType))) (@mulg (FinGroup.base (perm_of_finGroupType cube_finType)) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) dir_iso3)))) (inPhantom (forall x y : FinGroup.arg_sort (FinGroup.base (perm_of_finGroupType cube_finType)), is_true (@in_mem (FinGroup.sort (FinGroup.base (perm_of_finGroupType cube_finType))) (@mulg (FinGroup.base (perm_of_finGroupType cube_finType)) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) dir_iso3))))) *) by apply: stable. Qed. Canonical diso_group3 := Group group_set_diso3. Lemma gen_diso3 : dir_iso3 = <<[set r05; r14]>>. Proof. (* Goal: @eq (@set_of (perm_for_finType cube_finType) (Phant (Finite.sort (perm_for_finType cube_finType)))) dir_iso3 (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14))) *) apply/setP; apply/subset_eqP; apply/andP; split; first last. (* Goal: is_true (@subset (perm_for_finType cube_finType) (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)) (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) (* Goal: is_true (@subset (perm_for_finType cube_finType) (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14))))) (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3))) *) by rewrite gen_subG; apply/subsetP => x; rewrite !inE; case/orP; move/eqP ->; rewrite eqxx !orbT. (* Goal: is_true (@subset (perm_for_finType cube_finType) (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) dir_iso3)) (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) apply/subsetP => x; rewrite !inE. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) s05 x) (orb (@eq_op (perm_for_eqType cube_finType) s14 x) (orb (@eq_op (perm_for_eqType cube_finType) s23 x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) r23 x) (orb (@eq_op (perm_for_eqType cube_finType) r50 x) (orb (@eq_op (perm_for_eqType cube_finType) r41 x) (orb (@eq_op (perm_for_eqType cube_finType) r32 x) (orb (@eq_op (perm_for_eqType cube_finType) r024 x) (orb (@eq_op (perm_for_eqType cube_finType) r042 x) (orb (@eq_op (perm_for_eqType cube_finType) r012 x) (orb (@eq_op (perm_for_eqType cube_finType) r021 x) (orb (@eq_op (perm_for_eqType cube_finType) r031 x) (orb (@eq_op (perm_for_eqType cube_finType) r013 x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : s05 = r05 * r05 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) s14 x) (orb (@eq_op (perm_for_eqType cube_finType) s23 x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) r23 x) (orb (@eq_op (perm_for_eqType cube_finType) r50 x) (orb (@eq_op (perm_for_eqType cube_finType) r41 x) (orb (@eq_op (perm_for_eqType cube_finType) r32 x) (orb (@eq_op (perm_for_eqType cube_finType) r024 x) (orb (@eq_op (perm_for_eqType cube_finType) r042 x) (orb (@eq_op (perm_for_eqType cube_finType) r012 x) (orb (@eq_op (perm_for_eqType cube_finType) r021 x) (orb (@eq_op (perm_for_eqType cube_finType) r031 x) (orb (@eq_op (perm_for_eqType cube_finType) r013 x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : s14 = r14 * r14 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) s23 x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) r23 x) (orb (@eq_op (perm_for_eqType cube_finType) r50 x) (orb (@eq_op (perm_for_eqType cube_finType) r41 x) (orb (@eq_op (perm_for_eqType cube_finType) r32 x) (orb (@eq_op (perm_for_eqType cube_finType) r024 x) (orb (@eq_op (perm_for_eqType cube_finType) r042 x) (orb (@eq_op (perm_for_eqType cube_finType) r012 x) (orb (@eq_op (perm_for_eqType cube_finType) r021 x) (orb (@eq_op (perm_for_eqType cube_finType) r031 x) (orb (@eq_op (perm_for_eqType cube_finType) r013 x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : s23 = r14 * r14 * r05 * r05 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) r23 x) (orb (@eq_op (perm_for_eqType cube_finType) r50 x) (orb (@eq_op (perm_for_eqType cube_finType) r41 x) (orb (@eq_op (perm_for_eqType cube_finType) r32 x) (orb (@eq_op (perm_for_eqType cube_finType) r024 x) (orb (@eq_op (perm_for_eqType cube_finType) r042 x) (orb (@eq_op (perm_for_eqType cube_finType) r012 x) (orb (@eq_op (perm_for_eqType cube_finType) r021 x) (orb (@eq_op (perm_for_eqType cube_finType) r031 x) (orb (@eq_op (perm_for_eqType cube_finType) r013 x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : r23 = r05 * r14 * r05 * r14 * r14 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) r50 x) (orb (@eq_op (perm_for_eqType cube_finType) r41 x) (orb (@eq_op (perm_for_eqType cube_finType) r32 x) (orb (@eq_op (perm_for_eqType cube_finType) r024 x) (orb (@eq_op (perm_for_eqType cube_finType) r042 x) (orb (@eq_op (perm_for_eqType cube_finType) r012 x) (orb (@eq_op (perm_for_eqType cube_finType) r021 x) (orb (@eq_op (perm_for_eqType cube_finType) r031 x) (orb (@eq_op (perm_for_eqType cube_finType) r013 x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : r50 = r05 * r05 * r05 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r41 x) (orb (@eq_op (perm_for_eqType cube_finType) r32 x) (orb (@eq_op (perm_for_eqType cube_finType) r024 x) (orb (@eq_op (perm_for_eqType cube_finType) r042 x) (orb (@eq_op (perm_for_eqType cube_finType) r012 x) (orb (@eq_op (perm_for_eqType cube_finType) r021 x) (orb (@eq_op (perm_for_eqType cube_finType) r031 x) (orb (@eq_op (perm_for_eqType cube_finType) r013 x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : r41 = r14 * r14 * r14 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) r32 x) (orb (@eq_op (perm_for_eqType cube_finType) r024 x) (orb (@eq_op (perm_for_eqType cube_finType) r042 x) (orb (@eq_op (perm_for_eqType cube_finType) r012 x) (orb (@eq_op (perm_for_eqType cube_finType) r021 x) (orb (@eq_op (perm_for_eqType cube_finType) r031 x) (orb (@eq_op (perm_for_eqType cube_finType) r013 x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : r32 = r14 * r14 * r14 * r05* r14 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) r024 x) (orb (@eq_op (perm_for_eqType cube_finType) r042 x) (orb (@eq_op (perm_for_eqType cube_finType) r012 x) (orb (@eq_op (perm_for_eqType cube_finType) r021 x) (orb (@eq_op (perm_for_eqType cube_finType) r031 x) (orb (@eq_op (perm_for_eqType cube_finType) r013 x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : r024 = r05 * r14 * r14 * r14 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) r042 x) (orb (@eq_op (perm_for_eqType cube_finType) r012 x) (orb (@eq_op (perm_for_eqType cube_finType) r021 x) (orb (@eq_op (perm_for_eqType cube_finType) r031 x) (orb (@eq_op (perm_for_eqType cube_finType) r013 x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : r042 = r14 * r05 * r05 * r05 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r012 x) (orb (@eq_op (perm_for_eqType cube_finType) r021 x) (orb (@eq_op (perm_for_eqType cube_finType) r031 x) (orb (@eq_op (perm_for_eqType cube_finType) r013 x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : r012 = r14 * r05 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r021 x) (orb (@eq_op (perm_for_eqType cube_finType) r031 x) (orb (@eq_op (perm_for_eqType cube_finType) r013 x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : r021 = r05 * r14 * r05 * r05 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r031 x) (orb (@eq_op (perm_for_eqType cube_finType) r013 x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : r031 = r05 * r14 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) r013 x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : r013 = r05 * r05 * r14 * r05 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r043 x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : r043 = r14 * r14 * r14 * r05 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r034 x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : r034 = r05 * r05 * r05 * r14 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) s1 x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : s1 = r14 * r14 * r05 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) s2 x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : s2 = r05 * r14 * r14 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) s3 x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : s3 = r05 * r14 * r05 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) s4 x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : s4 = r05 * r14 * r14 * r14 * r05 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) s5 x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : s5 = r14 * r05 * r05 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) x) (@eq_op (perm_for_eqType cube_finType) s6 x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) have -> : s6 = r05 * r05 * r14 by iso_tac. (* Goal: forall _ : is_true (orb (@eq_op (perm_for_eqType cube_finType) id3 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) r05 x) (orb (@eq_op (perm_for_eqType cube_finType) r14 x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r05) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r14) r14) r14) r05) x) (orb (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r14 r05) r05) x) (@eq_op (perm_for_eqType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) (@mulg (perm_of_baseFinGroupType cube_finType) r05 r05) r14) x)))))))))))))))))))))))), is_true (@in_mem (Finite.sort (perm_for_finType cube_finType)) x (@mem (Finite.sort (perm_for_finType cube_finType)) (predPredType (Finite.sort (perm_for_finType cube_finType))) (@SetDef.pred_of_set (perm_for_finType cube_finType) (@generated (perm_of_finGroupType cube_finType) (@setU (perm_for_finType cube_finType) (@set1 (perm_for_finType cube_finType) r05) (@set1 (perm_for_finType cube_finType) r14)))))) *) by do ?case/predU1P=> [<-|]; first exact: group1; last (move/eqP => <-); rewrite ?groupMl ?mem_gen // !inE eqxx ?orbT. Qed. Notation col_cubes := {ffun cube -> colors}. Definition act_g (sc : col_cubes) (p : {perm cube}) : col_cubes := [ffun z => sc (p^-1 z)]. Lemma act_g_1 : forall k, act_g k 1 = k. Proof. (* Goal: forall k : @finfun_of cube_finType colors (Phant (forall _ : cube, colors)), @eq (@finfun_of cube_finType colors (Phant (forall _ : cube, colors))) (act_g k (oneg (perm_of_baseFinGroupType cube_finType))) k *) by move=> k; apply/ffunP=> a; rewrite ffunE invg1 permE. Qed. Lemma act_g_morph : forall k x y, act_g k (x * y) = act_g (act_g k x) y. Proof. (* Goal: forall (k : @finfun_of cube_finType colors (Phant (forall _ : cube, colors))) (x y : FinGroup.arg_sort (perm_of_baseFinGroupType cube_finType)), @eq (@finfun_of cube_finType colors (Phant (forall _ : cube, colors))) (act_g k (@mulg (perm_of_baseFinGroupType cube_finType) x y)) (act_g (act_g k x) y) *) by move=> k x y; apply/ffunP=> a; rewrite !ffunE invMg permE. Qed. Definition to_g := TotalAction act_g_1 act_g_morph. Definition cube_coloring_number24 := #|orbit to_g diso_group3 @: setT|. Lemma Fid3 : 'Fix_to_g[1] = setT. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (FinGroup.finType (FinGroup.base (perm_of_finGroupType cube_finType))) (oneg (FinGroup.base (perm_of_finGroupType cube_finType))))) (@setTfor (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) *) by apply/setP=> x /=; rewrite (sameP afix1P eqP) !inE act1 eqxx. Qed. Lemma card_Fid3 : #|'Fix_to_g[1]| = (n ^ 6)%N. Proof. (* Goal: @eq nat (@card (finfun_of_finType cube_finType colors_finType) (@mem (Finite.sort (finfun_of_finType cube_finType colors_finType)) (predPredType (Finite.sort (finfun_of_finType cube_finType colors_finType))) (@SetDef.pred_of_set (finfun_of_finType cube_finType colors_finType) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (FinGroup.finType (FinGroup.base (perm_of_finGroupType cube_finType))) (oneg (FinGroup.base (perm_of_finGroupType cube_finType)))))))) (expn n (S (S (S (S (S (S O))))))) *) rewrite -[6]card_ord -[n]card_ord -card_ffun_on Fid3 cardsT. (* Goal: @eq nat (@card (finfun_of_finType cube_finType colors_finType) (@mem (Equality.sort (Finite.eqType (finfun_of_finType cube_finType colors_finType))) (predPredType (Equality.sort (Finite.eqType (finfun_of_finType cube_finType colors_finType)))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType (finfun_of_finType cube_finType colors_finType))) (pred_of_argType (Equality.sort (Finite.eqType (finfun_of_finType cube_finType colors_finType))))))) (@card (finfun_of_finType (ordinal_finType (S (S (S (S (S (S O))))))) (ordinal_finType n)) (@mem (@finfun_of (ordinal_finType (S (S (S (S (S (S O))))))) (Finite.sort (ordinal_finType n)) (Phant (forall _ : Finite.sort (ordinal_finType (S (S (S (S (S (S O))))))), Finite.sort (ordinal_finType n)))) (simplPredType (@finfun_of (ordinal_finType (S (S (S (S (S (S O))))))) (Finite.sort (ordinal_finType n)) (Phant (forall _ : Finite.sort (ordinal_finType (S (S (S (S (S (S O))))))), Finite.sort (ordinal_finType n))))) (@ffun_on_mem (ordinal_finType (S (S (S (S (S (S O))))))) (Finite.sort (ordinal_finType n)) (@mem (Finite.sort (ordinal_finType n)) (predPredType (Finite.sort (ordinal_finType n))) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n))))))) *) by symmetry; apply: eq_card => ff; apply/ffun_onP. Qed. Definition col0 (sc : col_cubes) : colors := sc F0. Definition col1 (sc : col_cubes) : colors := sc F1. Definition col2 (sc : col_cubes) : colors := sc F2. Definition col3 (sc : col_cubes) : colors := sc F3. Definition col4 (sc : col_cubes) : colors := sc F4. Definition col5 (sc : col_cubes) : colors := sc F5. Lemma eqperm_map2 : forall p1 p2 : col_cubes, (p1 == p2) = all (fun s => p1 s == p2 s) [:: F0; F1; F2; F3; F4; F5]. Proof. (* Goal: forall p1 p2 : @finfun_of cube_finType colors (Phant (forall _ : cube, colors)), @eq bool (@eq_op (finfun_of_eqType cube_finType colors_eqType) p1 p2) (@all (Finite.sort cube_finType) (fun s : Finite.sort cube_finType => @eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors p1 s) (@FunFinfun.fun_of_fin cube_finType colors p2 s)) (@cons cube F0 (@cons cube F1 (@cons cube F2 (@cons cube F3 (@cons cube F4 (@cons cube F5 (@nil cube)))))))) *) move=> p1 p2; apply/eqP/allP=> [-> // | Ep12]; apply/ffunP=> x. (* Goal: @eq (Equality.sort colors_eqType) (@FunFinfun.fun_of_fin cube_finType (Equality.sort colors_eqType) p1 x) (@FunFinfun.fun_of_fin cube_finType (Equality.sort colors_eqType) p2 x) *) by apply/eqP; apply Ep12; case: x; do 6?case. Qed. Notation infE := (sameP afix1P eqP). Lemma F_s05 : 'Fix_to_g[s05] = [set x | (col1 x == col4 x) && (col2 x == col3 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s05)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (@eq_op colors_eqType (col1 x) (col4 x)) (@eq_op colors_eqType (col2 x) (col3 x)))) *) have s05_inv: s05^-1=s05 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s05)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (@eq_op colors_eqType (col1 x) (col4 x)) (@eq_op colors_eqType (col2 x) (col3 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g s05_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S05f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S05f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S05f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S05f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S05f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S05f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (@eq_op colors_eqType (col1 x) (col4 x)) (@eq_op colors_eqType (col2 x) (col3 x))) *) apply sym_equal; rewrite !eqxx /= andbT/col1/col2/col3/col4/col5/col0. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F3))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S05f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S05f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S05f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S05f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4))))) *) by do 2![rewrite eq_sym; case: {+}(_ == _)=> //= ]. Qed. Lemma F_s14 : 'Fix_to_g[s14]= [set x | (col0 x == col5 x) && (col2 x == col3 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s14)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (@eq_op colors_eqType (col0 x) (col5 x)) (@eq_op colors_eqType (col2 x) (col3 x)))) *) have s14_inv: s14^-1=s14 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s14)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (@eq_op colors_eqType (col0 x) (col5 x)) (@eq_op colors_eqType (col2 x) (col3 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g s14_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S14f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S14f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S14f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S14f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S14f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S14f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (@eq_op colors_eqType (col0 x) (col5 x)) (@eq_op colors_eqType (col2 x) (col3 x))) *) apply sym_equal; rewrite !eqxx /= andbT/col1/col2/col3/col4/col5/col0. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F5)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F3))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S14f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S14f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S14f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S14f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))) *) by do 2![rewrite eq_sym; case: {+}(_ == _)=> //= ]. Qed. Lemma r05_inv : r05^-1 = r50. Proof. (* Goal: @eq (FinGroup.sort (perm_of_baseFinGroupType cube_finType)) (@invg (perm_of_baseFinGroupType cube_finType) r05) r50 *) by inv_tac. Qed. Lemma r50_inv : r50^-1 = r05. Proof. (* Goal: @eq (FinGroup.sort (perm_of_baseFinGroupType cube_finType)) (@invg (perm_of_baseFinGroupType cube_finType) r50) r05 *) by inv_tac. Qed. Lemma r14_inv : r14^-1 = r41. Proof. (* Goal: @eq (FinGroup.sort (perm_of_baseFinGroupType cube_finType)) (@invg (perm_of_baseFinGroupType cube_finType) r14) r41 *) by inv_tac. Qed. Lemma r41_inv : r41^-1 = r14. Proof. (* Goal: @eq (FinGroup.sort (perm_of_baseFinGroupType cube_finType)) (@invg (perm_of_baseFinGroupType cube_finType) r41) r14 *) by inv_tac. Qed. Lemma s23_inv : s23^-1 = s23. Proof. (* Goal: @eq (FinGroup.sort (perm_of_baseFinGroupType cube_finType)) (@invg (perm_of_baseFinGroupType cube_finType) s23) s23 *) by inv_tac. Qed. Lemma F_s23 : 'Fix_to_g[s23] = [set x | (col0 x == col5 x) && (col1 x == col4 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s23)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (@eq_op colors_eqType (col0 x) (col5 x)) (@eq_op colors_eqType (col1 x) (col4 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g s23_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S23f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S23f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S23f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S23f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S23f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S23f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (@eq_op colors_eqType (col0 x) (col5 x)) (@eq_op colors_eqType (col1 x) (col4 x))) *) apply sym_equal; rewrite !eqxx /= andbT/col1/col2/col3/col4/col5/col0. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F5)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F4))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S23f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S23f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S23f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S23f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))) *) by do 2![rewrite eq_sym; case: {+}(_ == _)=> //=]. Qed. Lemma F_r05 : 'Fix_to_g[r05]= [set x | (col1 x == col2 x) && (col2 x == col3 x) && (col3 x == col4 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r05)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col1 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col4 x)))) *) apply sym_equal. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col1 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col4 x)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r05)) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r05_inv !ffunE !permE /=. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (col1 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col4 x))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R50f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R50f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R50f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R50f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R50f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R50f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) *) rewrite !eqxx /= !andbT /col1/col2/col3/col4/col5/col0. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F3))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F3) (@FunFinfun.fun_of_fin cube_finType colors x F4))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R50f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R50f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R50f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R50f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4))))) *) by do 3![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // {E}(eqP E) ]. Qed. Lemma F_r50 : 'Fix_to_g[r50]= [set x | (col1 x == col2 x) && (col2 x == col3 x) && (col3 x == col4 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r50)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col1 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col4 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r50_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R05f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R05f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R05f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R05f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R05f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R05f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (@eq_op colors_eqType (col1 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col4 x))) *) apply sym_equal; rewrite !eqxx /= !andbT /col1/col2/col3/col4. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F3))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F3) (@FunFinfun.fun_of_fin cube_finType colors x F4))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R05f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R05f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R05f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R05f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4))))) *) by do 3![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // {E}(eqP E) ]. Qed. Lemma F_r23 : 'Fix_to_g[r23] = [set x | (col0 x == col1 x) && (col1 x == col4 x) && (col4 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r23)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col1 x)) (@eq_op colors_eqType (col1 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) have r23_inv: r23^-1 = r32 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r23)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col1 x)) (@eq_op colors_eqType (col1 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r23_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R32f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R32f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R32f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R32f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R32f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R32f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (@eq_op colors_eqType (col0 x) (col1 x)) (@eq_op colors_eqType (col1 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x))) *) apply sym_equal; rewrite !eqxx /= !andbT /col1/col0/col5/col4. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F4))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F4) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R32f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R32f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R32f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R32f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))) *) by do 3![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // {E}(eqP E)]. Qed. Lemma F_r32 : 'Fix_to_g[r32] = [set x | (col0 x == col1 x) && (col1 x == col4 x) && (col4 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r32)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col1 x)) (@eq_op colors_eqType (col1 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) have r32_inv: r32^-1 = r23 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r32)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col1 x)) (@eq_op colors_eqType (col1 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r32_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R23f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R23f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R23f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R23f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R23f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R23f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (@eq_op colors_eqType (col0 x) (col1 x)) (@eq_op colors_eqType (col1 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x))) *) apply sym_equal; rewrite !eqxx /= !andbT /col1/col0/col5/col4. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F4))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F4) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R23f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R23f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R23f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R23f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))) *) by do 3![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // {E}(eqP E)]. Qed. Lemma F_r14 : 'Fix_to_g[r14] = [set x | (col0 x == col2 x) && (col2 x == col3 x) && (col3 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r14)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r14_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R41f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R41f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R41f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R41f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R41f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R41f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (@eq_op colors_eqType (col0 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col5 x))) *) apply sym_equal; rewrite !eqxx /= !andbT /col2/col0/col5/col3. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F3))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F3) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R41f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R41f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R41f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R41f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))) *) by do 3![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // {E}(eqP E)]. Qed. Lemma F_r41 : 'Fix_to_g[r41] = [set x | (col0 x == col2 x) && (col2 x == col3 x) && (col3 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r41)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r41_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R14f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R14f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R14f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R14f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R14f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R14f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (@eq_op colors_eqType (col0 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col5 x))) *) apply sym_equal; rewrite !eqxx /= !andbT /col2/col0/col5/col3. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F3))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F3) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R14f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R14f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R14f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R14f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))) *) by do 3![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // {E}(eqP E)]. Qed. Lemma F_r024 : 'Fix_to_g[r024] = [set x | (col0 x == col4 x) && (col4 x == col2 x) && (col1 x == col3 x) && (col3 x == col5 x) ]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r024)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col4 x) (col2 x))) (@eq_op colors_eqType (col1 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col5 x)))) *) have r024_inv: r024^-1 = r042 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r024)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col4 x) (col2 x))) (@eq_op colors_eqType (col1 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r024_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R042f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R042f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R042f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R042f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R042f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R042f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col4 x) (col2 x))) (@eq_op colors_eqType (col1 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col5 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F4) (@FunFinfun.fun_of_fin cube_finType colors x F2))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F3))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F3) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R042f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R042f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R042f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R042f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R042f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R042f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) by do 4![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma F_r042 : 'Fix_to_g[r042] = [set x | (col0 x == col4 x) && (col4 x == col2 x) && (col1 x == col3 x) && (col3 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r042)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col4 x) (col2 x))) (@eq_op colors_eqType (col1 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col5 x)))) *) have r042_inv: r042^-1 = r024 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r042)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col4 x) (col2 x))) (@eq_op colors_eqType (col1 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r042_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R024f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R024f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R024f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R024f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R024f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R024f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col4 x) (col2 x))) (@eq_op colors_eqType (col1 x) (col3 x))) (@eq_op colors_eqType (col3 x) (col5 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F4) (@FunFinfun.fun_of_fin cube_finType colors x F2))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F3))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F3) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R024f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R024f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R024f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R024f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R024f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R024f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) by do 4![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma F_r012 : 'Fix_to_g[r012] = [set x | (col0 x == col2 x) && (col2 x == col1 x) && (col3 x == col4 x) && (col4 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r012)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col1 x))) (@eq_op colors_eqType (col3 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) have r012_inv: r012^-1 = r021 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r012)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col1 x))) (@eq_op colors_eqType (col3 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r012_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R021f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R021f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R021f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R021f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R021f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R021f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (andb (@eq_op colors_eqType (col0 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col1 x))) (@eq_op colors_eqType (col3 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F1))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F3) (@FunFinfun.fun_of_fin cube_finType colors x F4))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F4) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R021f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R021f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R021f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R021f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R021f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R021f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) by do 4![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma F_r021 : 'Fix_to_g[r021] = [set x | (col0 x == col2 x) && (col2 x == col1 x) && (col3 x == col4 x) && (col4 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r021)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col1 x))) (@eq_op colors_eqType (col3 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) have r021_inv: r021^-1 = r012 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r021)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col1 x))) (@eq_op colors_eqType (col3 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r021_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R012f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R012f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R012f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R012f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R012f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R012f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (andb (@eq_op colors_eqType (col0 x) (col2 x)) (@eq_op colors_eqType (col2 x) (col1 x))) (@eq_op colors_eqType (col3 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F1))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F3) (@FunFinfun.fun_of_fin cube_finType colors x F4))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F4) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R012f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R012f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R012f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R012f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R012f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R012f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) do 4![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma F_r031 : 'Fix_to_g[r031] = [set x | (col0 x == col3 x) && (col3 x == col1 x) && (col2 x == col4 x) && (col4 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r031)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col3 x)) (@eq_op colors_eqType (col3 x) (col1 x))) (@eq_op colors_eqType (col2 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) have r031_inv: r031^-1 = r013 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r031)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col3 x)) (@eq_op colors_eqType (col3 x) (col1 x))) (@eq_op colors_eqType (col2 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r031_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R013f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R013f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R013f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R013f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R013f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R013f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (andb (@eq_op colors_eqType (col0 x) (col3 x)) (@eq_op colors_eqType (col3 x) (col1 x))) (@eq_op colors_eqType (col2 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F3) (@FunFinfun.fun_of_fin cube_finType colors x F1))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F4))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F4) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R013f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R013f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R013f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R013f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R013f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R013f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) by do 4![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma F_r013 : 'Fix_to_g[r013] = [set x | (col0 x == col3 x) && (col3 x == col1 x) && (col2 x == col4 x) && (col4 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r013)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col3 x)) (@eq_op colors_eqType (col3 x) (col1 x))) (@eq_op colors_eqType (col2 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) have r013_inv: r013^-1 = r031 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r013)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col3 x)) (@eq_op colors_eqType (col3 x) (col1 x))) (@eq_op colors_eqType (col2 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r013_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R031f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R031f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R031f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R031f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R031f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R031f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (andb (@eq_op colors_eqType (col0 x) (col3 x)) (@eq_op colors_eqType (col3 x) (col1 x))) (@eq_op colors_eqType (col2 x) (col4 x))) (@eq_op colors_eqType (col4 x) (col5 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F3) (@FunFinfun.fun_of_fin cube_finType colors x F1))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F4))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F4) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R031f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R031f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R031f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R031f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R031f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R031f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) by do 4![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma F_r043 : 'Fix_to_g[r043] = [set x | (col0 x == col4 x) && (col4 x == col3 x) && (col1 x == col2 x) && (col2 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r043)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col4 x) (col3 x))) (@eq_op colors_eqType (col1 x) (col2 x))) (@eq_op colors_eqType (col2 x) (col5 x)))) *) have r043_inv: r043^-1 = r034 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r043)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col4 x) (col3 x))) (@eq_op colors_eqType (col1 x) (col2 x))) (@eq_op colors_eqType (col2 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r043_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R034f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R034f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R034f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R034f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R034f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R034f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col4 x) (col3 x))) (@eq_op colors_eqType (col1 x) (col2 x))) (@eq_op colors_eqType (col2 x) (col5 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F4) (@FunFinfun.fun_of_fin cube_finType colors x F3))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F2))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R034f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R034f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R034f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R034f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R034f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R034f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) by do 4![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma F_r034 : 'Fix_to_g[r034] = [set x | (col0 x == col4 x) && (col4 x == col3 x) && (col1 x == col2 x) && (col2 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r034)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col4 x) (col3 x))) (@eq_op colors_eqType (col1 x) (col2 x))) (@eq_op colors_eqType (col2 x) (col5 x)))) *) have r034_inv: r034^-1 = r043 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) r034)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col4 x) (col3 x))) (@eq_op colors_eqType (col1 x) (col2 x))) (@eq_op colors_eqType (col2 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g r034_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R043f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R043f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R043f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R043f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R043f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R043f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col4 x) (col3 x))) (@eq_op colors_eqType (col1 x) (col2 x))) (@eq_op colors_eqType (col2 x) (col5 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F4) (@FunFinfun.fun_of_fin cube_finType colors x F3))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F2))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R043f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R043f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R043f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R043f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R043f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (R043f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) by do 4![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma F_s1 : 'Fix_to_g[s1] = [set x | (col0 x == col5 x) && (col1 x == col2 x) && (col3 x == col4 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s1)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col5 x)) (@eq_op colors_eqType (col1 x) (col2 x))) (@eq_op colors_eqType (col3 x) (col4 x)))) *) have s1_inv: s1^-1 = s1 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s1)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col5 x)) (@eq_op colors_eqType (col1 x) (col2 x))) (@eq_op colors_eqType (col3 x) (col4 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g s1_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S1f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S1f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S1f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S1f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S1f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S1f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (@eq_op colors_eqType (col0 x) (col5 x)) (@eq_op colors_eqType (col1 x) (col2 x))) (@eq_op colors_eqType (col3 x) (col4 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F5)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F2))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F3) (@FunFinfun.fun_of_fin cube_finType colors x F4))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S1f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S1f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S1f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S1f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S1f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S1f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) by do 3![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma F_s2 : 'Fix_to_g[s2] = [set x | (col0 x == col5 x) && (col1 x == col3 x) && (col2 x == col4 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s2)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col5 x)) (@eq_op colors_eqType (col1 x) (col3 x))) (@eq_op colors_eqType (col2 x) (col4 x)))) *) have s2_inv: s2^-1 = s2 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s2)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col5 x)) (@eq_op colors_eqType (col1 x) (col3 x))) (@eq_op colors_eqType (col2 x) (col4 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g s2_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S2f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S2f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S2f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S2f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S2f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S2f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (@eq_op colors_eqType (col0 x) (col5 x)) (@eq_op colors_eqType (col1 x) (col3 x))) (@eq_op colors_eqType (col2 x) (col4 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F5)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F3))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F4))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S2f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S2f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S2f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S2f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S2f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S2f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) by do 3![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma F_s3 : 'Fix_to_g[s3] = [set x | (col0 x == col1 x) && (col2 x == col3 x) && (col4 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s3)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col1 x)) (@eq_op colors_eqType (col2 x) (col3 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) have s3_inv: s3^-1 = s3 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s3)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col1 x)) (@eq_op colors_eqType (col2 x) (col3 x))) (@eq_op colors_eqType (col4 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g s3_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S3f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S3f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S3f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S3f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S3f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S3f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (@eq_op colors_eqType (col0 x) (col1 x)) (@eq_op colors_eqType (col2 x) (col3 x))) (@eq_op colors_eqType (col4 x) (col5 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F3))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F4) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S3f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S3f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S3f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S3f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S3f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S3f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) by do 3![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma F_s4 : 'Fix_to_g[s4] = [set x | (col0 x == col4 x) && (col1 x == col5 x) && (col2 x == col3 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s4)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col1 x) (col5 x))) (@eq_op colors_eqType (col2 x) (col3 x)))) *) have s4_inv: s4^-1 = s4 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s4)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col1 x) (col5 x))) (@eq_op colors_eqType (col2 x) (col3 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g s4_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S4f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S4f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S4f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S4f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S4f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S4f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (@eq_op colors_eqType (col0 x) (col4 x)) (@eq_op colors_eqType (col1 x) (col5 x))) (@eq_op colors_eqType (col2 x) (col3 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F3))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S4f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S4f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S4f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S4f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S4f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S4f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) by do 3![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma F_s5 : 'Fix_to_g[s5] = [set x | (col0 x == col2 x) && (col1 x == col4 x) && (col3 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s5)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col2 x)) (@eq_op colors_eqType (col1 x) (col4 x))) (@eq_op colors_eqType (col3 x) (col5 x)))) *) have s5_inv: s5^-1 = s5 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s5)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col2 x)) (@eq_op colors_eqType (col1 x) (col4 x))) (@eq_op colors_eqType (col3 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g s5_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S5f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S5f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S5f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S5f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S5f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S5f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (@eq_op colors_eqType (col0 x) (col2 x)) (@eq_op colors_eqType (col1 x) (col4 x))) (@eq_op colors_eqType (col3 x) (col5 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F4))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F3) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S5f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S5f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S5f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S5f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S5f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S5f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) by do 3![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma F_s6 : 'Fix_to_g[s6] = [set x | (col0 x == col3 x) && (col1 x == col4 x) && (col2 x == col5 x)]. Proof. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s6)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col3 x)) (@eq_op colors_eqType (col1 x) (col4 x))) (@eq_op colors_eqType (col2 x) (col5 x)))) *) have s6_inv: s6^-1 = s6 by inv_tac. (* Goal: @eq (@set_of (finfun_of_finType cube_finType colors_finType) (Phant (Finite.sort (finfun_of_finType cube_finType colors_finType)))) (@afix (perm_of_finGroupType cube_finType) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType cube_finType)))))) (finfun_of_finType cube_finType colors_finType) to_g (@set1 (perm_for_finType cube_finType) s6)) (@SetDef.finset (finfun_of_finType cube_finType colors_finType) (fun x : Finite.sort (finfun_of_finType cube_finType colors_finType) => andb (andb (@eq_op colors_eqType (col0 x) (col3 x)) (@eq_op colors_eqType (col1 x) (col4 x))) (@eq_op colors_eqType (col2 x) (col5 x)))) *) apply/setP => x; rewrite infE !inE eqperm_map2 /= /act_g s6_inv !ffunE !permE /=. (* Goal: @eq bool (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S6f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S6f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S6f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S6f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S6f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S6f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5)) true)))))) (andb (andb (@eq_op colors_eqType (col0 x) (col3 x)) (@eq_op colors_eqType (col1 x) (col4 x))) (@eq_op colors_eqType (col2 x) (col5 x))) *) apply sym_equal; rewrite ?eqxx /= !andbT /col0/col1/col2/col3/col4/col5. (* Goal: @eq bool (andb (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F0) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F1) (@FunFinfun.fun_of_fin cube_finType colors x F4))) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x F2) (@FunFinfun.fun_of_fin cube_finType colors x F5))) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S6f F0)) (@FunFinfun.fun_of_fin cube_finType colors x F0)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S6f F1)) (@FunFinfun.fun_of_fin cube_finType colors x F1)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S6f F2)) (@FunFinfun.fun_of_fin cube_finType colors x F2)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S6f F3)) (@FunFinfun.fun_of_fin cube_finType colors x F3)) (andb (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S6f F4)) (@FunFinfun.fun_of_fin cube_finType colors x F4)) (@eq_op colors_eqType (@FunFinfun.fun_of_fin cube_finType colors x (S6f F5)) (@FunFinfun.fun_of_fin cube_finType colors x F5))))))) *) by do 3![rewrite eq_sym; case E: {+}(_ == _); rewrite ?andbF // ?{E}(eqP E)]. Qed. Lemma uniq4_uniq6 : forall x y z t : cube, uniq [:: x; y; z; t] -> exists u, exists v, uniq [:: x; y; z; t; u; v]. Proof. (* Goal: forall (x y z t : cube) (_ : is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@nil cube))))))), @ex cube (fun u : cube => @ex cube (fun v : cube => is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons cube u (@cons cube v (@nil cube)))))))))) *) move=> x y z t Uxt; move: (cardC (mem [:: x; y; z; t])). (* Goal: forall _ : @eq nat (addn (@card cube_finType (@mem (Finite.sort cube_finType) (predPredType (Finite.sort cube_finType)) (@pred_of_simpl (Equality.sort cube_eqType) (@pred_of_mem_pred (Equality.sort cube_eqType) (@mem (Equality.sort cube_eqType) (seq_predType cube_eqType) (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@nil cube)))))))))) (@card cube_finType (@mem (Finite.sort cube_finType) (simplPredType (Finite.sort cube_finType)) (@predC (Finite.sort cube_finType) (@pred_of_simpl (Finite.sort cube_finType) (@pred_of_mem_pred (Finite.sort cube_finType) (@mem (Finite.sort cube_finType) (predPredType (Finite.sort cube_finType)) (@pred_of_simpl (Equality.sort cube_eqType) (@pred_of_mem_pred (Equality.sort cube_eqType) (@mem (Equality.sort cube_eqType) (seq_predType cube_eqType) (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@nil cube))))))))))))))) (@card cube_finType (@mem (Equality.sort (Finite.eqType cube_finType)) (predPredType (Equality.sort (Finite.eqType cube_finType))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType cube_finType)) (pred_of_argType (Equality.sort (Finite.eqType cube_finType)))))), @ex cube (fun u : cube => @ex cube (fun v : cube => is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons cube u (@cons cube v (@nil cube)))))))))) *) rewrite card_ord (card_uniq_tuple Uxt) => hcard. (* Goal: @ex cube (fun u : cube => @ex cube (fun v : cube => is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons cube u (@cons cube v (@nil cube)))))))))) *) have hcard2: #|predC (mem [:: x; y; z; t])| = 2. (* Goal: @ex cube (fun u : cube => @ex cube (fun v : cube => is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons cube u (@cons cube v (@nil cube)))))))))) *) (* Goal: @eq nat (@card cube_finType (@mem (Equality.sort cube_eqType) (simplPredType (Equality.sort cube_eqType)) (@predC (Equality.sort cube_eqType) (@pred_of_simpl (Equality.sort cube_eqType) (@pred_of_mem_pred (Equality.sort cube_eqType) (@mem (Equality.sort cube_eqType) (seq_predType cube_eqType) (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@nil cube))))))))))) (S (S O)) *) by apply: (@addnI 4); rewrite /injective hcard. (* Goal: @ex cube (fun u : cube => @ex cube (fun v : cube => is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons cube u (@cons cube v (@nil cube)))))))))) *) have: #|predC (mem [:: x; y; z; t])| != 0 by rewrite hcard2. (* Goal: forall _ : is_true (negb (@eq_op nat_eqType (@card cube_finType (@mem (Equality.sort cube_eqType) (simplPredType (Equality.sort cube_eqType)) (@predC (Equality.sort cube_eqType) (@pred_of_simpl (Equality.sort cube_eqType) (@pred_of_mem_pred (Equality.sort cube_eqType) (@mem (Equality.sort cube_eqType) (seq_predType cube_eqType) (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@nil cube))))))))))) O)), @ex cube (fun u : cube => @ex cube (fun v : cube => is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons cube u (@cons cube v (@nil cube)))))))))) *) case/existsP=> u Hu; exists u. (* Goal: @ex cube (fun v : cube => is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons cube u (@cons cube v (@nil cube))))))))) *) move: (cardC (mem [:: x; y; z; t; u])); rewrite card_ord => hcard5. (* Goal: @ex cube (fun v : cube => is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons cube u (@cons cube v (@nil cube))))))))) *) have: #|[predC [:: x; y; z; t; u]]| !=0. (* Goal: forall _ : is_true (negb (@eq_op nat_eqType (@card cube_finType (@mem (Equality.sort cube_eqType) (simplPredType (Equality.sort cube_eqType)) (@predC (Equality.sort cube_eqType) (@pred_of_simpl (Equality.sort cube_eqType) (@pred_of_mem_pred (Equality.sort cube_eqType) (@mem (Equality.sort cube_eqType) (seq_predType cube_eqType) (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons (Finite.sort cube_finType) u (@nil (Finite.sort cube_finType))))))))))))) O)), @ex cube (fun v : cube => is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons cube u (@cons cube v (@nil cube))))))))) *) (* Goal: is_true (negb (@eq_op nat_eqType (@card cube_finType (@mem (Equality.sort cube_eqType) (simplPredType (Equality.sort cube_eqType)) (@predC (Equality.sort cube_eqType) (@pred_of_simpl (Equality.sort cube_eqType) (@pred_of_mem_pred (Equality.sort cube_eqType) (@mem (Equality.sort cube_eqType) (seq_predType cube_eqType) (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons (Finite.sort cube_finType) u (@nil (Finite.sort cube_finType))))))))))))) O)) *) rewrite -lt0n -(ltn_add2l #|[:: x; y; z; t; u]|) hcard5 addn0. (* Goal: forall _ : is_true (negb (@eq_op nat_eqType (@card cube_finType (@mem (Equality.sort cube_eqType) (simplPredType (Equality.sort cube_eqType)) (@predC (Equality.sort cube_eqType) (@pred_of_simpl (Equality.sort cube_eqType) (@pred_of_mem_pred (Equality.sort cube_eqType) (@mem (Equality.sort cube_eqType) (seq_predType cube_eqType) (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons (Finite.sort cube_finType) u (@nil (Finite.sort cube_finType))))))))))))) O)), @ex cube (fun v : cube => is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons cube u (@cons cube v (@nil cube))))))))) *) (* Goal: is_true (leq (S (@card cube_finType (@mem (Equality.sort cube_eqType) (seq_predType cube_eqType) (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons (Finite.sort cube_finType) u (@nil (Finite.sort cube_finType)))))))))) (S (S (S (S (S (S O))))))) *) by apply: (leq_ltn_trans (card_size [:: x; y; z; t; u])). (* Goal: forall _ : is_true (negb (@eq_op nat_eqType (@card cube_finType (@mem (Equality.sort cube_eqType) (simplPredType (Equality.sort cube_eqType)) (@predC (Equality.sort cube_eqType) (@pred_of_simpl (Equality.sort cube_eqType) (@pred_of_mem_pred (Equality.sort cube_eqType) (@mem (Equality.sort cube_eqType) (seq_predType cube_eqType) (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons (Finite.sort cube_finType) u (@nil (Finite.sort cube_finType))))))))))))) O)), @ex cube (fun v : cube => is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons cube u (@cons cube v (@nil cube))))))))) *) case/existsP=> v; rewrite inE (mem_cat _ [:: _; _; _; _]). (* Goal: forall _ : is_true (negb (orb (@in_mem (Equality.sort cube_eqType) v (@mem (Equality.sort cube_eqType) (seq_predType cube_eqType) (@cons (Equality.sort cube_eqType) x (@cons (Equality.sort cube_eqType) y (@cons (Equality.sort cube_eqType) z (@cons (Equality.sort cube_eqType) t (@nil (Equality.sort cube_eqType)))))))) (@in_mem (Equality.sort cube_eqType) v (@mem (Equality.sort cube_eqType) (seq_predType cube_eqType) (@cons (Finite.sort cube_finType) u (@nil (Finite.sort cube_finType))))))), @ex cube (fun v : cube => is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons cube u (@cons cube v (@nil cube))))))))) *) case/norP=> Hv Huv; exists v. (* Goal: is_true (@uniq cube_eqType (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@cons cube u (@cons cube v (@nil cube)))))))) *) rewrite (cat_uniq [:: x; y; z; t]) Uxt andTb. (* Goal: is_true (andb (negb (@has (Equality.sort cube_eqType) (@pred_of_simpl (Equality.sort cube_eqType) (@pred_of_mem_pred (Equality.sort cube_eqType) (@mem (Equality.sort cube_eqType) (seq_predType cube_eqType) (@cons cube x (@cons cube y (@cons cube z (@cons cube t (@nil cube)))))))) (@cons cube u (@cons cube v (@nil cube))))) (@uniq cube_eqType (@cons cube u (@cons cube v (@nil cube))))) *) by rewrite -rev_uniq /= negb_or Hu orbF Hv Huv. Qed. Lemma card_n4 : forall x y z t : cube, uniq [:: x; y; z; t] -> #|[set p : col_cubes | (p x == p y) && (p z == p t)]| = (n ^ 4)%N. Lemma card_n3_3 : forall x y z t: cube, uniq [:: x; y; z; t] -> #|[set p : col_cubes | (p x == p y) && (p y == p z)&& (p z == p t)]| = (n ^ 3)%N. Lemma card_n2_3 : forall x y z t u v: cube, uniq [:: x; y; z; t; u; v] -> #|[set p : col_cubes | (p x == p y) && (p y == p z)&& (p t == p u ) && (p u== p v)]| = (n ^ 2)%N. Lemma card_n3s : forall x y z t u v: cube, uniq [:: x; y; z; t; u; v] -> #|[set p : col_cubes | (p x == p y) && (p z == p t)&& (p u == p v )]| = (n ^ 3)%N. Lemma burnside_app_iso3 : (cube_coloring_number24 * 24 = n ^ 6 + 6 * n ^ 3 + 3 * n ^ 4 + 8 * (n ^ 2) + 6 * n ^ 3)%N. End cube_colouring. End colouring. Corollary burnside_app_iso_3_3col: cube_coloring_number24 3 = 57. Proof. (* Goal: @eq nat (cube_coloring_number24 (S (S (S O)))) (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S O))))))))))))))))))))))))))))))))))))))))))))))))))))))))) *) by apply/eqP; rewrite -(@eqn_pmul2r 24) // burnside_app_iso3. Qed. Corollary burnside_app_iso_2_4col: square_coloring_number8 4 = 55. Proof. (* Goal: @eq nat (square_coloring_number8 (S (S (S (S O))))) (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S O))))))))))))))))))))))))))))))))))))))))))))))))))))))) *) by apply/eqP; rewrite -(@eqn_pmul2r 8) // burnside_app_iso. Qed.
Require Export Lib_Exp. Definition Square (n : nat) := n * n. Lemma Square_exp_2 : forall n : nat, Square (exp_2 n) = exp_2 (2 * n). Proof. (* Goal: forall n : nat, @eq nat (Square (exp_2 n)) (exp_2 (Init.Nat.mul (S (S O)) n)) *) intro. (* Goal: @eq nat (Square (exp_2 n)) (exp_2 (Init.Nat.mul (S (S O)) n)) *) unfold Square in |- *. (* Goal: @eq nat (Init.Nat.mul (exp_2 n) (exp_2 n)) (exp_2 (Init.Nat.mul (S (S O)) n)) *) elim exp_2_n_plus_m. (* Goal: @eq nat (exp_2 (Init.Nat.add n n)) (exp_2 (Init.Nat.mul (S (S O)) n)) *) rewrite plus_mult; reflexivity. Qed. Hint Resolve Square_exp_2. Lemma eq_Square_exp_n : forall n : nat, Square n = exp_n n 2. Proof. (* Goal: forall n : nat, @eq nat (Square n) (exp_n n (S (S O))) *) unfold Square in |- *. (* Goal: forall n : nat, @eq nat (Init.Nat.mul n n) (exp_n n (S (S O))) *) simpl in |- *. (* Goal: forall n : nat, @eq nat (Init.Nat.mul n n) (Init.Nat.mul n (Init.Nat.mul n (S O))) *) intro; elim (mult_comm 1 n); simpl in |- *; auto with arith. Qed. Hint Resolve eq_Square_exp_n. Lemma Square_inc : forall n m : nat, n <= m -> Square n <= Square m. Proof. (* Goal: forall (n m : nat) (_ : le n m), le (Square n) (Square m) *) intros. (* Goal: le (Square n) (Square m) *) unfold Square in |- *. (* Goal: le (Init.Nat.mul n n) (Init.Nat.mul m m) *) apply le_mult_csts; assumption. Qed. Hint Resolve Square_inc. Lemma Square_strict_inc : forall n m : nat, n < m -> Square n < Square m. Proof. (* Goal: forall (n m : nat) (_ : lt n m), lt (Square n) (Square m) *) intros. (* Goal: lt (Square n) (Square m) *) unfold Square in |- *. (* Goal: lt (Init.Nat.mul n n) (Init.Nat.mul m m) *) apply lt_mult_csts; assumption. Qed. Hint Resolve Square_strict_inc. Lemma le_n_Square : forall n : nat, n <= Square n. Proof. (* Goal: forall n : nat, le n (Square n) *) simple induction n; auto with arith. (* Goal: forall (n : nat) (_ : le n (Square n)), le (S n) (Square (S n)) *) intros. (* Goal: le (S n0) (Square (S n0)) *) unfold Square in |- *. (* Goal: le (S n0) (Init.Nat.mul (S n0) (S n0)) *) simpl in |- *. (* Goal: le (S n0) (S (Init.Nat.add n0 (Init.Nat.mul n0 (S n0)))) *) apply le_n_S. (* Goal: le n0 (Init.Nat.add n0 (Init.Nat.mul n0 (S n0))) *) elim mult_comm; simpl in |- *. (* Goal: le n0 (Init.Nat.add n0 (Nat.add n0 (Nat.mul n0 n0))) *) change (n0 <= n0 + (n0 + Square n0)) in |- *. (* Goal: le n0 (Init.Nat.add n0 (Init.Nat.add n0 (Square n0))) *) apply le_plus_l. Qed. Hint Resolve le_n_Square.
Require Import Bool. Require Import Arith. Require Import Compare_dec. Require Import Peano_dec. Require Import General. Require Import MyList. Require Import MyRelations. Require Export Main. Require Export SortECC. Section ECC. Definition trm_ecc := term srt_ecc. Definition env_ecc := env srt_ecc. Definition ecc : CTS_spec srt_ecc := Build_CTS_spec _ axiom_ecc rules_ecc univ_ecc (beta_delta_rule _). Definition ecc_pts : PTS_sub_spec srt_ecc := cts_pts_functor _ ecc. Definition le_type : red_rule srt_ecc := Rule _ (Le_type _ (pts_le_type _ ecc_pts)). Definition typ_ecc : env_ecc -> trm_ecc -> trm_ecc -> Prop := typ _ ecc_pts. Definition wft_ecc : env_ecc -> trm_ecc -> Prop := wf_type _ ecc_pts. Definition wf_ecc : env_ecc -> Prop := wf _ ecc_pts. Definition ecc_sn := sn srt_ecc (ctxt _ (Rule _ (head_reduct _ ecc))). Hint Unfold le_type typ_ecc wft_ecc wf_ecc ecc_sn: pts. Lemma whnf : forall (e : env_ecc) (t : trm_ecc), ecc_sn e t -> {u : trm_ecc | red _ (beta_delta _) e t u & head_normal _ (beta_delta _) e u}. Proof beta_delta_whnf srt_ecc. Lemma bd_conv_hnf : forall (e : env_ecc) (x y : trm_ecc), ecc_sn e x -> ecc_sn e y -> decide (conv_hn_inv _ (beta_delta_rule _) e x y). Proof CR_WHNF_convert_hn srt_ecc ecc_sort_dec (beta_delta_rule srt_ecc) (church_rosser_beta_delta srt_ecc) whnf. Theorem ecc_is_subtype_dec : subtype_dec_CTS _ ecc. Proof. (* Goal: subtype_dec_CTS srt_ecc ecc *) apply Build_subtype_dec_CTS. (* Goal: forall s s' : srt_ecc, decide (clos_refl_trans srt_ecc (universes srt_ecc ecc) s s') *) (* Goal: forall (e : env srt_ecc) (x y : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e x) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e y), decide (conv_hn_inv srt_ecc (head_reduct srt_ecc ecc) e x y) *) (* Goal: forall (e : env srt_ecc) (t : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e t), @sig2 (term srt_ecc) (fun u : term srt_ecc => red srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e t u) (fun u : term srt_ecc => head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e u) *) (* Goal: forall (e : env srt_ecc) (A B : term srt_ecc), head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e (Prod srt_ecc A B) *) (* Goal: forall (e : env srt_ecc) (s : srt_ecc), head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e (Srt srt_ecc s) *) (* Goal: church_rosser srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) *) exact (church_rosser_beta_delta srt_ecc). (* Goal: forall s s' : srt_ecc, decide (clos_refl_trans srt_ecc (universes srt_ecc ecc) s s') *) (* Goal: forall (e : env srt_ecc) (x y : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e x) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e y), decide (conv_hn_inv srt_ecc (head_reduct srt_ecc ecc) e x y) *) (* Goal: forall (e : env srt_ecc) (t : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e t), @sig2 (term srt_ecc) (fun u : term srt_ecc => red srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e t u) (fun u : term srt_ecc => head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e u) *) (* Goal: forall (e : env srt_ecc) (A B : term srt_ecc), head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e (Prod srt_ecc A B) *) (* Goal: forall (e : env srt_ecc) (s : srt_ecc), head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e (Srt srt_ecc s) *) exact (bd_hn_sort srt_ecc). (* Goal: forall s s' : srt_ecc, decide (clos_refl_trans srt_ecc (universes srt_ecc ecc) s s') *) (* Goal: forall (e : env srt_ecc) (x y : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e x) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e y), decide (conv_hn_inv srt_ecc (head_reduct srt_ecc ecc) e x y) *) (* Goal: forall (e : env srt_ecc) (t : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e t), @sig2 (term srt_ecc) (fun u : term srt_ecc => red srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e t u) (fun u : term srt_ecc => head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e u) *) (* Goal: forall (e : env srt_ecc) (A B : term srt_ecc), head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e (Prod srt_ecc A B) *) exact (bd_hn_prod srt_ecc). (* Goal: forall s s' : srt_ecc, decide (clos_refl_trans srt_ecc (universes srt_ecc ecc) s s') *) (* Goal: forall (e : env srt_ecc) (x y : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e x) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e y), decide (conv_hn_inv srt_ecc (head_reduct srt_ecc ecc) e x y) *) (* Goal: forall (e : env srt_ecc) (t : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e t), @sig2 (term srt_ecc) (fun u : term srt_ecc => red srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e t u) (fun u : term srt_ecc => head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e u) *) exact whnf. (* Goal: forall s s' : srt_ecc, decide (clos_refl_trans srt_ecc (universes srt_ecc ecc) s s') *) (* Goal: forall (e : env srt_ecc) (x y : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e x) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e y), decide (conv_hn_inv srt_ecc (head_reduct srt_ecc ecc) e x y) *) exact bd_conv_hnf. (* Goal: forall s s' : srt_ecc, decide (clos_refl_trans srt_ecc (universes srt_ecc ecc) s s') *) exact univ_ecc_dec. Qed. Axiom ecc_normalise : forall (e : env_ecc) (t T : trm_ecc), typ_ecc e t T -> ecc_sn e t. Lemma sound_ecc_bd : rule_sound _ ecc_pts (beta_delta _). Proof. (* Goal: rule_sound srt_ecc ecc_pts (beta_delta srt_ecc) *) unfold beta_delta in |- *. (* Goal: rule_sound srt_ecc ecc_pts (Rule srt_ecc (beta_delta_rule srt_ecc)) *) simpl in |- *. (* Goal: rule_sound srt_ecc ecc_pts (reunion srt_ecc (beta srt_ecc) (delta srt_ecc)) *) unfold union in |- *. (* Goal: rule_sound srt_ecc ecc_pts (reunion srt_ecc (beta srt_ecc) (delta srt_ecc)) *) apply union_sound. (* Goal: rule_sound srt_ecc ecc_pts (delta srt_ecc) *) (* Goal: rule_sound srt_ecc ecc_pts (beta srt_ecc) *) apply beta_sound; auto with arith pts. (* Goal: rule_sound srt_ecc ecc_pts (delta srt_ecc) *) (* Goal: product_inversion srt_ecc (Rule srt_ecc (Le_type srt_ecc (pts_le_type srt_ecc ecc_pts))) *) simpl in |- *. (* Goal: rule_sound srt_ecc ecc_pts (delta srt_ecc) *) (* Goal: product_inversion srt_ecc (R_rt srt_ecc (cumul srt_ecc ecc)) *) apply cumul_inv_prod. (* Goal: rule_sound srt_ecc ecc_pts (delta srt_ecc) *) (* Goal: subtype_dec_CTS srt_ecc ecc *) exact ecc_is_subtype_dec. (* Goal: rule_sound srt_ecc ecc_pts (delta srt_ecc) *) apply delta_sound. Qed. Lemma ecc_is_norm_sound : norm_sound_CTS _ ecc. Proof. (* Goal: norm_sound_CTS srt_ecc ecc *) refine (Build_norm_sound_CTS srt_ecc ecc sound_ecc_bd ecc_normalise _ _ _). (* Goal: forall (s1 s2 : srt_ecc) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) s1 s2) (_ : typed_sort srt_ecc (cts_axiom srt_ecc ecc) s2), typed_sort srt_ecc (cts_axiom srt_ecc ecc) s1 *) (* Goal: forall x1 x2 : srt_ecc, @sig2 srt_ecc (fun x3 : srt_ecc => cts_rules srt_ecc ecc x1 x2 x3) (fun x3 : srt_ecc => forall (s1 s2 s3 : srt_ecc) (_ : cts_rules srt_ecc ecc s1 s2 s3) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) x1 s1) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) x2 s2), clos_refl_trans srt_ecc (universes srt_ecc ecc) x3 s3) *) (* Goal: forall s : srt_ecc, @ppal_dec srt_ecc (cts_axiom srt_ecc ecc s) (clos_refl_trans srt_ecc (universes srt_ecc ecc)) *) left. (* Goal: forall (s1 s2 : srt_ecc) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) s1 s2) (_ : typed_sort srt_ecc (cts_axiom srt_ecc ecc) s2), typed_sort srt_ecc (cts_axiom srt_ecc ecc) s1 *) (* Goal: forall x1 x2 : srt_ecc, @sig2 srt_ecc (fun x3 : srt_ecc => cts_rules srt_ecc ecc x1 x2 x3) (fun x3 : srt_ecc => forall (s1 s2 s3 : srt_ecc) (_ : cts_rules srt_ecc ecc s1 s2 s3) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) x1 s1) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) x2 s2), clos_refl_trans srt_ecc (universes srt_ecc ecc) x3 s3) *) (* Goal: @sig srt_ecc (fun x : srt_ecc => @ppal srt_ecc (cts_axiom srt_ecc ecc s) (clos_refl_trans srt_ecc (universes srt_ecc ecc)) x) *) apply ecc_inf_axiom. (* Goal: forall (s1 s2 : srt_ecc) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) s1 s2) (_ : typed_sort srt_ecc (cts_axiom srt_ecc ecc) s2), typed_sort srt_ecc (cts_axiom srt_ecc ecc) s1 *) (* Goal: forall x1 x2 : srt_ecc, @sig2 srt_ecc (fun x3 : srt_ecc => cts_rules srt_ecc ecc x1 x2 x3) (fun x3 : srt_ecc => forall (s1 s2 s3 : srt_ecc) (_ : cts_rules srt_ecc ecc s1 s2 s3) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) x1 s1) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) x2 s2), clos_refl_trans srt_ecc (universes srt_ecc ecc) x3 s3) *) exact ecc_inf_rule. (* Goal: forall (s1 s2 : srt_ecc) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) s1 s2) (_ : typed_sort srt_ecc (cts_axiom srt_ecc ecc) s2), typed_sort srt_ecc (cts_axiom srt_ecc ecc) s1 *) intros. (* Goal: typed_sort srt_ecc (cts_axiom srt_ecc ecc) s1 *) elim ecc_inf_axiom with s1; intros. (* Goal: typed_sort srt_ecc (cts_axiom srt_ecc ecc) s1 *) split with x. (* Goal: cts_axiom srt_ecc ecc s1 x *) apply (pp_ok p). Qed. Theorem ecc_algorithms : PTS_TC _ ecc_pts. Proof full_cts_type_checker srt_ecc ecc ecc_is_subtype_dec ecc_is_norm_sound. Lemma infer_type : forall (e : env_ecc) (t : trm_ecc), wf_ecc e -> infer_ppal_type _ ecc_pts e t. Proof ptc_inf_ppal_type _ _ ecc_algorithms. Lemma check_wf_type : forall (e : env_ecc) (t : trm_ecc), wf_ecc e -> wft_dec _ ecc_pts e t. Proof ptc_chk_wft _ _ ecc_algorithms. Lemma check_type : forall (e : env_ecc) (t T : trm_ecc), wf_ecc e -> check_dec _ ecc_pts e t T. Proof ptc_chk_typ _ _ ecc_algorithms. Lemma add_type : forall (e : env_ecc) (t : trm_ecc), wf_ecc e -> decl_dec _ ecc_pts e (Ax _ t). Proof ptc_add_typ _ _ ecc_algorithms. Lemma add_def : forall (e : env_ecc) (t T : trm_ecc), wf_ecc e -> decl_dec _ ecc_pts e (Def _ t T). Proof ptc_add_def _ _ ecc_algorithms. End ECC.
Set Implicit Arguments. Unset Strict Implicit. Require Export Monoid_util. Require Export Parts2. Section Image_hom. Variable M M' : MONOID. Variable f : Hom M M'. Definition image_monoid_hom : submonoid M'. Proof. (* Goal: submonoid M' *) apply (BUILD_SUB_MONOID (G:=M') (H:=image_map f)). (* Goal: @in_part (sgroup_set (monoid_sgroup M')) (@monoid_unit (monoid_sgroup M') (monoid_on_def M')) (@image_map (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f))) *) (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup M'))) (_ : @in_part (sgroup_set (monoid_sgroup M')) x (@image_map (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)))) (_ : @in_part (sgroup_set (monoid_sgroup M')) y (@image_map (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)))), @in_part (sgroup_set (monoid_sgroup M')) (sgroup_law (monoid_sgroup M') x y) (@image_map (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f))) *) simpl in |- *. (* Goal: @in_part (sgroup_set (monoid_sgroup M')) (@monoid_unit (monoid_sgroup M') (monoid_on_def M')) (@image_map (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f))) *) (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup M'))) (_ : @ex (Carrier (sgroup_set (monoid_sgroup M))) (fun x0 : Carrier (sgroup_set (monoid_sgroup M)) => and True (@Equal (sgroup_set (monoid_sgroup M')) x (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x0)))) (_ : @ex (Carrier (sgroup_set (monoid_sgroup M))) (fun x0 : Carrier (sgroup_set (monoid_sgroup M)) => and True (@Equal (sgroup_set (monoid_sgroup M')) y (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x0)))), @ex (Carrier (sgroup_set (monoid_sgroup M))) (fun x0 : Carrier (sgroup_set (monoid_sgroup M)) => and True (@Equal (sgroup_set (monoid_sgroup M')) (sgroup_law (monoid_sgroup M') x y) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x0))) *) intros x y H' H'0; try assumption. (* Goal: @in_part (sgroup_set (monoid_sgroup M')) (@monoid_unit (monoid_sgroup M') (monoid_on_def M')) (@image_map (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f))) *) (* Goal: @ex (Carrier (sgroup_set (monoid_sgroup M))) (fun x0 : Carrier (sgroup_set (monoid_sgroup M)) => and True (@Equal (sgroup_set (monoid_sgroup M')) (sgroup_law (monoid_sgroup M') x y) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x0))) *) elim H'0; intros x0 E; elim E; intros H'1 H'2; try exact H'1; clear E H'0. (* Goal: @in_part (sgroup_set (monoid_sgroup M')) (@monoid_unit (monoid_sgroup M') (monoid_on_def M')) (@image_map (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f))) *) (* Goal: @ex (Carrier (sgroup_set (monoid_sgroup M))) (fun x0 : Carrier (sgroup_set (monoid_sgroup M)) => and True (@Equal (sgroup_set (monoid_sgroup M')) (sgroup_law (monoid_sgroup M') x y) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x0))) *) elim H'; intros x1 E; elim E; intros H'0 H'3; try exact H'0; clear E H'. (* Goal: @in_part (sgroup_set (monoid_sgroup M')) (@monoid_unit (monoid_sgroup M') (monoid_on_def M')) (@image_map (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f))) *) (* Goal: @ex (Carrier (sgroup_set (monoid_sgroup M))) (fun x0 : Carrier (sgroup_set (monoid_sgroup M)) => and True (@Equal (sgroup_set (monoid_sgroup M')) (sgroup_law (monoid_sgroup M') x y) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x0))) *) exists (sgroup_law M x1 x0); split; [ try assumption | idtac ]. (* Goal: @in_part (sgroup_set (monoid_sgroup M')) (@monoid_unit (monoid_sgroup M') (monoid_on_def M')) (@image_map (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup M')) (sgroup_law (monoid_sgroup M') x y) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) (sgroup_law (monoid_sgroup M) x1 x0)) *) apply Trans with (sgroup_law M' (Ap (sgroup_map (monoid_sgroup_hom f)) x1) (Ap (sgroup_map (monoid_sgroup_hom f)) x0)); auto with algebra. (* Goal: @in_part (sgroup_set (monoid_sgroup M')) (@monoid_unit (monoid_sgroup M') (monoid_on_def M')) (@image_map (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f))) *) simpl in |- *. (* Goal: @ex (Carrier (sgroup_set (monoid_sgroup M))) (fun x : Carrier (sgroup_set (monoid_sgroup M)) => and True (@Equal (sgroup_set (monoid_sgroup M')) (@monoid_unit (monoid_sgroup M') (monoid_on_def M')) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x))) *) exists (monoid_unit M); split; [ try assumption | idtac ]. (* Goal: @Equal (sgroup_set (monoid_sgroup M')) (@monoid_unit (monoid_sgroup M') (monoid_on_def M')) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) (@monoid_unit (monoid_sgroup M) (monoid_on_def M))) *) (* Goal: True *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup M')) (@monoid_unit (monoid_sgroup M') (monoid_on_def M')) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) (@monoid_unit (monoid_sgroup M) (monoid_on_def M))) *) auto with algebra. Qed. Lemma image_monoid_prop : forall x : M, in_part (f x) image_monoid_hom. Proof. (* Goal: forall x : Carrier (sgroup_set (monoid_sgroup M)), @in_part (sgroup_set (monoid_sgroup M')) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x) (@subsgroup_part (monoid_sgroup M') (@submonoid_subsgroup M' image_monoid_hom)) *) simpl in |- *. (* Goal: forall x : Carrier (sgroup_set (monoid_sgroup M)), @ex (Carrier (sgroup_set (monoid_sgroup M))) (fun x0 : Carrier (sgroup_set (monoid_sgroup M)) => and True (@Equal (sgroup_set (monoid_sgroup M')) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x0))) *) intros x; exists x; split; [ try assumption | idtac ]; auto with algebra. Qed. Lemma image_monoid_prop_rev : forall y : M', in_part y image_monoid_hom -> exists x : M, Equal y (f x). Proof. (* Goal: forall (y : Carrier (sgroup_set (monoid_sgroup M'))) (_ : @in_part (sgroup_set (monoid_sgroup M')) y (@subsgroup_part (monoid_sgroup M') (@submonoid_subsgroup M' image_monoid_hom))), @ex (Carrier (sgroup_set (monoid_sgroup M))) (fun x : Carrier (sgroup_set (monoid_sgroup M)) => @Equal (sgroup_set (monoid_sgroup M')) y (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x)) *) simpl in |- *. (* Goal: forall (y : Carrier (sgroup_set (monoid_sgroup M'))) (_ : @ex (Carrier (sgroup_set (monoid_sgroup M))) (fun x : Carrier (sgroup_set (monoid_sgroup M)) => and True (@Equal (sgroup_set (monoid_sgroup M')) y (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x)))), @ex (Carrier (sgroup_set (monoid_sgroup M))) (fun x : Carrier (sgroup_set (monoid_sgroup M)) => @Equal (sgroup_set (monoid_sgroup M')) y (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x)) *) intros y H'; try assumption. (* Goal: @ex (Carrier (sgroup_set (monoid_sgroup M))) (fun x : Carrier (sgroup_set (monoid_sgroup M)) => @Equal (sgroup_set (monoid_sgroup M')) y (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x)) *) elim H'; intros x E; elim E; intros H'0 H'1; try exact H'0; clear E H'. (* Goal: @ex (Carrier (sgroup_set (monoid_sgroup M))) (fun x : Carrier (sgroup_set (monoid_sgroup M)) => @Equal (sgroup_set (monoid_sgroup M')) y (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup M')) (@sgroup_map (monoid_sgroup M) (monoid_sgroup M') (@monoid_sgroup_hom M M' f)) x)) *) exists x; try assumption. Qed. End Image_hom. Hint Resolve image_monoid_prop image_monoid_prop: algebra.
Set Implicit Arguments. Unset Strict Implicit. Require Export Categories. Require Export Parts. Section Subcategory_def. Variable C : category. Variable C' : Type. Variable i : C' -> C. Variable homC' : forall a b : C', subtype_image (Hom (i a) (i b)). Definition subcat_Hom (a b : C') := homC' a b:Setoid. Variable CompC' : forall a b c : C', subcat_Hom b c -> subcat_Hom a b -> subcat_Hom a c. Variable idC' : forall a : C', subcat_Hom a a. Hypothesis idC'ok : forall a : C', Equal (subtype_image_inj (idC' a)) (Hom_id (i a)). Hypothesis CompC'_ok : forall (a b c : C') (g : subcat_Hom b c) (f : subcat_Hom a b), Equal (subtype_image_inj (CompC' g f)) (comp_hom (subtype_image_inj g) (subtype_image_inj f)). Definition subcat_Hom_comp : forall a b c : C', MAP (cart (subcat_Hom b c) (subcat_Hom a b)) (subcat_Hom a c). Proof. (* Goal: forall a b c : C', Carrier (MAP (cart (subcat_Hom b c) (subcat_Hom a b)) (subcat_Hom a c)) *) intros a b c; try assumption. (* Goal: Carrier (MAP (cart (subcat_Hom b c) (subcat_Hom a b)) (subcat_Hom a c)) *) apply (Build_Map (A:=cart (subcat_Hom b c) (subcat_Hom a b)) (B:= subcat_Hom a c) (Ap:=fun x : cart (subcat_Hom b c) (subcat_Hom a b) => CompC' (proj1 x) (proj2 x))). (* Goal: @fun_compatible (cart (subcat_Hom b c) (subcat_Hom a b)) (subcat_Hom a c) (fun x : Carrier (cart (subcat_Hom b c) (subcat_Hom a b)) => @CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) x) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x)) *) red in |- *. (* Goal: forall (x y : Carrier (cart (subcat_Hom b c) (subcat_Hom a b))) (_ : @Equal (cart (subcat_Hom b c) (subcat_Hom a b)) x y), @Equal (subcat_Hom a c) (@CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) x) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x)) (@CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) y) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y)) *) intros x y H'; try assumption. (* Goal: @Equal (subcat_Hom a c) (@CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) x) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x)) (@CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) y) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y)) *) simpl in |- *. (* Goal: @subtype_image_equal (@Hom C (i a) (i c)) (@subtype_image_carrier (@Hom C (i a) (i c)) (homC' a c)) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c)) (@CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) x) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x)) (@CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) y) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y)) *) unfold subtype_image_equal in |- *. (* Goal: @Equal (@Hom C (i a) (i c)) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) x) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x))) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) y) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y))) *) apply Trans with (comp_hom (subtype_image_inj (proj1 x)) (subtype_image_inj (proj2 x))); auto with algebra. (* Goal: @Equal (@Hom C (i a) (i c)) (@comp_hom C (i a) (i b) (i c) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x))) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) y) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y))) *) apply Trans with (comp_hom (subtype_image_inj (proj1 y)) (subtype_image_inj (proj2 y))); auto with algebra. (* Goal: @Equal (@Hom C (i a) (i c)) (@comp_hom C (i a) (i b) (i c) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x))) (@comp_hom C (i a) (i b) (i c) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) y)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y))) *) apply comp_hom_compatible. (* Goal: @Equal (@Hom C (i a) (i b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y)) *) (* Goal: @Equal (@Hom C (i b) (i c)) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) y)) *) cut (Equal (proj1 x) (proj1 y)). (* Goal: @Equal (@Hom C (i a) (i b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y)) *) (* Goal: @Equal (subcat_Hom b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) x) (@proj1 (subcat_Hom b c) (subcat_Hom a b) y) *) (* Goal: forall _ : @Equal (subcat_Hom b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) x) (@proj1 (subcat_Hom b c) (subcat_Hom a b) y), @Equal (@Hom C (i b) (i c)) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) y)) *) auto with algebra. (* Goal: @Equal (@Hom C (i a) (i b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y)) *) (* Goal: @Equal (subcat_Hom b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) x) (@proj1 (subcat_Hom b c) (subcat_Hom a b) y) *) auto with algebra. (* Goal: @Equal (@Hom C (i a) (i b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y)) *) cut (Equal (proj2 x) (proj2 y)). (* Goal: @Equal (subcat_Hom a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y) *) (* Goal: forall _ : @Equal (subcat_Hom a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y), @Equal (@Hom C (i a) (i b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y)) *) auto with algebra. (* Goal: @Equal (subcat_Hom a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y) *) auto with algebra. Qed. Definition subcat : category. Proof. (* Goal: category *) apply (Build_category (Ob:=C') (Hom:=subcat_Hom) (Hom_comp:=subcat_Hom_comp) (Hom_id:=idC')). (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Hom_comp_unit_l C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Hom_comp_assoc C' subcat_Hom subcat_Hom_comp *) red in |- *. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Hom_comp_unit_l C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: forall (a b c d : C') (f : Carrier (subcat_Hom a b)) (g : Carrier (subcat_Hom b c)) (h : Carrier (subcat_Hom c d)), @Equal (subcat_Hom a d) (@Ap (cart (subcat_Hom b d) (subcat_Hom a b)) (subcat_Hom a d) (subcat_Hom_comp a b d) (@couple (subcat_Hom b d) (subcat_Hom a b) (@Ap (cart (subcat_Hom c d) (subcat_Hom b c)) (subcat_Hom b d) (subcat_Hom_comp b c d) (@couple (subcat_Hom c d) (subcat_Hom b c) h g)) f)) (@Ap (cart (subcat_Hom c d) (subcat_Hom a c)) (subcat_Hom a d) (subcat_Hom_comp a c d) (@couple (subcat_Hom c d) (subcat_Hom a c) h (@Ap (cart (subcat_Hom b c) (subcat_Hom a b)) (subcat_Hom a c) (subcat_Hom_comp a b c) (@couple (subcat_Hom b c) (subcat_Hom a b) g f)))) *) unfold subcat_Hom_comp in |- *. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Hom_comp_unit_l C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: forall (a b c d : C') (f : Carrier (subcat_Hom a b)) (g : Carrier (subcat_Hom b c)) (h : Carrier (subcat_Hom c d)), @Equal (subcat_Hom a d) (@Ap (cart (subcat_Hom b d) (subcat_Hom a b)) (subcat_Hom a d) (@Build_Map (cart (subcat_Hom b d) (subcat_Hom a b)) (subcat_Hom a d) (fun x : Carrier (cart (subcat_Hom b d) (subcat_Hom a b)) => @CompC' a b d (@proj1 (subcat_Hom b d) (subcat_Hom a b) x) (@proj2 (subcat_Hom b d) (subcat_Hom a b) x)) (fun (x y : Carrier (cart (subcat_Hom b d) (subcat_Hom a b))) (H' : @Equal (cart (subcat_Hom b d) (subcat_Hom a b)) x y) => @Trans (@Hom C (i a) (i d)) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a b d (@proj1 (subcat_Hom b d) (subcat_Hom a b) x) (@proj2 (subcat_Hom b d) (subcat_Hom a b) x))) (@comp_hom C (i a) (i b) (i d) (@subtype_image_inj (@Hom C (i b) (i d)) (homC' b d) (@proj1 (subcat_Hom b d) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b d) (subcat_Hom a b) x))) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a b d (@proj1 (subcat_Hom b d) (subcat_Hom a b) y) (@proj2 (subcat_Hom b d) (subcat_Hom a b) y))) (@CompC'_ok a b d (@proj1 (subcat_Hom b d) (subcat_Hom a b) x) (@proj2 (subcat_Hom b d) (subcat_Hom a b) x)) (@Trans (@Hom C (i a) (i d)) (@comp_hom C (i a) (i b) (i d) (@subtype_image_inj (@Hom C (i b) (i d)) (homC' b d) (@proj1 (subcat_Hom b d) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b d) (subcat_Hom a b) x))) (@comp_hom C (i a) (i b) (i d) (@subtype_image_inj (@Hom C (i b) (i d)) (homC' b d) (@proj1 (subcat_Hom b d) (subcat_Hom a b) y)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b d) (subcat_Hom a b) y))) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a b d (@proj1 (subcat_Hom b d) (subcat_Hom a b) y) (@proj2 (subcat_Hom b d) (subcat_Hom a b) y))) (@comp_hom_compatible C (i a) (i b) (i d) (@subtype_image_inj (@Hom C (i b) (i d)) (homC' b d) (@proj1 (subcat_Hom b d) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i b) (i d)) (homC' b d) (@proj1 (subcat_Hom b d) (subcat_Hom a b) y)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b d) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b d) (subcat_Hom a b) y)) (@proj1_comp (subcat_Hom b d) (subcat_Hom a b) x y H') (@proj2_comp (subcat_Hom b d) (subcat_Hom a b) x y H')) (@Sym (@Hom C (i a) (i d)) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a b d (@proj1 (subcat_Hom b d) (subcat_Hom a b) y) (@proj2 (subcat_Hom b d) (subcat_Hom a b) y))) (@comp_hom C (i a) (i b) (i d) (@subtype_image_inj (@Hom C (i b) (i d)) (homC' b d) (@proj1 (subcat_Hom b d) (subcat_Hom a b) y)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b d) (subcat_Hom a b) y))) (@CompC'_ok a b d (@proj1 (subcat_Hom b d) (subcat_Hom a b) y) (@proj2 (subcat_Hom b d) (subcat_Hom a b) y)))))) (@couple (subcat_Hom b d) (subcat_Hom a b) (@Ap (cart (subcat_Hom c d) (subcat_Hom b c)) (subcat_Hom b d) (@Build_Map (cart (subcat_Hom c d) (subcat_Hom b c)) (subcat_Hom b d) (fun x : Carrier (cart (subcat_Hom c d) (subcat_Hom b c)) => @CompC' b c d (@proj1 (subcat_Hom c d) (subcat_Hom b c) x) (@proj2 (subcat_Hom c d) (subcat_Hom b c) x)) (fun (x y : Carrier (cart (subcat_Hom c d) (subcat_Hom b c))) (H' : @Equal (cart (subcat_Hom c d) (subcat_Hom b c)) x y) => @Trans (@Hom C (i b) (i d)) (@subtype_image_inj (@Hom C (i b) (i d)) (homC' b d) (@CompC' b c d (@proj1 (subcat_Hom c d) (subcat_Hom b c) x) (@proj2 (subcat_Hom c d) (subcat_Hom b c) x))) (@comp_hom C (i b) (i c) (i d) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) (@proj1 (subcat_Hom c d) (subcat_Hom b c) x)) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj2 (subcat_Hom c d) (subcat_Hom b c) x))) (@subtype_image_inj (@Hom C (i b) (i d)) (homC' b d) (@CompC' b c d (@proj1 (subcat_Hom c d) (subcat_Hom b c) y) (@proj2 (subcat_Hom c d) (subcat_Hom b c) y))) (@CompC'_ok b c d (@proj1 (subcat_Hom c d) (subcat_Hom b c) x) (@proj2 (subcat_Hom c d) (subcat_Hom b c) x)) (@Trans (@Hom C (i b) (i d)) (@comp_hom C (i b) (i c) (i d) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) (@proj1 (subcat_Hom c d) (subcat_Hom b c) x)) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj2 (subcat_Hom c d) (subcat_Hom b c) x))) (@comp_hom C (i b) (i c) (i d) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) (@proj1 (subcat_Hom c d) (subcat_Hom b c) y)) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj2 (subcat_Hom c d) (subcat_Hom b c) y))) (@subtype_image_inj (@Hom C (i b) (i d)) (homC' b d) (@CompC' b c d (@proj1 (subcat_Hom c d) (subcat_Hom b c) y) (@proj2 (subcat_Hom c d) (subcat_Hom b c) y))) (@comp_hom_compatible C (i b) (i c) (i d) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) (@proj1 (subcat_Hom c d) (subcat_Hom b c) x)) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) (@proj1 (subcat_Hom c d) (subcat_Hom b c) y)) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj2 (subcat_Hom c d) (subcat_Hom b c) x)) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj2 (subcat_Hom c d) (subcat_Hom b c) y)) (@proj1_comp (subcat_Hom c d) (subcat_Hom b c) x y H') (@proj2_comp (subcat_Hom c d) (subcat_Hom b c) x y H')) (@Sym (@Hom C (i b) (i d)) (@subtype_image_inj (@Hom C (i b) (i d)) (homC' b d) (@CompC' b c d (@proj1 (subcat_Hom c d) (subcat_Hom b c) y) (@proj2 (subcat_Hom c d) (subcat_Hom b c) y))) (@comp_hom C (i b) (i c) (i d) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) (@proj1 (subcat_Hom c d) (subcat_Hom b c) y)) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj2 (subcat_Hom c d) (subcat_Hom b c) y))) (@CompC'_ok b c d (@proj1 (subcat_Hom c d) (subcat_Hom b c) y) (@proj2 (subcat_Hom c d) (subcat_Hom b c) y)))))) (@couple (subcat_Hom c d) (subcat_Hom b c) h g)) f)) (@Ap (cart (subcat_Hom c d) (subcat_Hom a c)) (subcat_Hom a d) (@Build_Map (cart (subcat_Hom c d) (subcat_Hom a c)) (subcat_Hom a d) (fun x : Carrier (cart (subcat_Hom c d) (subcat_Hom a c)) => @CompC' a c d (@proj1 (subcat_Hom c d) (subcat_Hom a c) x) (@proj2 (subcat_Hom c d) (subcat_Hom a c) x)) (fun (x y : Carrier (cart (subcat_Hom c d) (subcat_Hom a c))) (H' : @Equal (cart (subcat_Hom c d) (subcat_Hom a c)) x y) => @Trans (@Hom C (i a) (i d)) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a c d (@proj1 (subcat_Hom c d) (subcat_Hom a c) x) (@proj2 (subcat_Hom c d) (subcat_Hom a c) x))) (@comp_hom C (i a) (i c) (i d) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) (@proj1 (subcat_Hom c d) (subcat_Hom a c) x)) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@proj2 (subcat_Hom c d) (subcat_Hom a c) x))) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a c d (@proj1 (subcat_Hom c d) (subcat_Hom a c) y) (@proj2 (subcat_Hom c d) (subcat_Hom a c) y))) (@CompC'_ok a c d (@proj1 (subcat_Hom c d) (subcat_Hom a c) x) (@proj2 (subcat_Hom c d) (subcat_Hom a c) x)) (@Trans (@Hom C (i a) (i d)) (@comp_hom C (i a) (i c) (i d) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) (@proj1 (subcat_Hom c d) (subcat_Hom a c) x)) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@proj2 (subcat_Hom c d) (subcat_Hom a c) x))) (@comp_hom C (i a) (i c) (i d) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) (@proj1 (subcat_Hom c d) (subcat_Hom a c) y)) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@proj2 (subcat_Hom c d) (subcat_Hom a c) y))) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a c d (@proj1 (subcat_Hom c d) (subcat_Hom a c) y) (@proj2 (subcat_Hom c d) (subcat_Hom a c) y))) (@comp_hom_compatible C (i a) (i c) (i d) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) (@proj1 (subcat_Hom c d) (subcat_Hom a c) x)) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) (@proj1 (subcat_Hom c d) (subcat_Hom a c) y)) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@proj2 (subcat_Hom c d) (subcat_Hom a c) x)) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@proj2 (subcat_Hom c d) (subcat_Hom a c) y)) (@proj1_comp (subcat_Hom c d) (subcat_Hom a c) x y H') (@proj2_comp (subcat_Hom c d) (subcat_Hom a c) x y H')) (@Sym (@Hom C (i a) (i d)) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a c d (@proj1 (subcat_Hom c d) (subcat_Hom a c) y) (@proj2 (subcat_Hom c d) (subcat_Hom a c) y))) (@comp_hom C (i a) (i c) (i d) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) (@proj1 (subcat_Hom c d) (subcat_Hom a c) y)) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@proj2 (subcat_Hom c d) (subcat_Hom a c) y))) (@CompC'_ok a c d (@proj1 (subcat_Hom c d) (subcat_Hom a c) y) (@proj2 (subcat_Hom c d) (subcat_Hom a c) y)))))) (@couple (subcat_Hom c d) (subcat_Hom a c) h (@Ap (cart (subcat_Hom b c) (subcat_Hom a b)) (subcat_Hom a c) (@Build_Map (cart (subcat_Hom b c) (subcat_Hom a b)) (subcat_Hom a c) (fun x : Carrier (cart (subcat_Hom b c) (subcat_Hom a b)) => @CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) x) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x)) (fun (x y : Carrier (cart (subcat_Hom b c) (subcat_Hom a b))) (H' : @Equal (cart (subcat_Hom b c) (subcat_Hom a b)) x y) => @Trans (@Hom C (i a) (i c)) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) x) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x))) (@comp_hom C (i a) (i b) (i c) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x))) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) y) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y))) (@CompC'_ok a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) x) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x)) (@Trans (@Hom C (i a) (i c)) (@comp_hom C (i a) (i b) (i c) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x))) (@comp_hom C (i a) (i b) (i c) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) y)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y))) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) y) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y))) (@comp_hom_compatible C (i a) (i b) (i c) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) y)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y)) (@proj1_comp (subcat_Hom b c) (subcat_Hom a b) x y H') (@proj2_comp (subcat_Hom b c) (subcat_Hom a b) x y H')) (@Sym (@Hom C (i a) (i c)) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@CompC' a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) y) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y))) (@comp_hom C (i a) (i b) (i c) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) (@proj1 (subcat_Hom b c) (subcat_Hom a b) y)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y))) (@CompC'_ok a b c (@proj1 (subcat_Hom b c) (subcat_Hom a b) y) (@proj2 (subcat_Hom b c) (subcat_Hom a b) y)))))) (@couple (subcat_Hom b c) (subcat_Hom a b) g f)))) *) simpl in |- *. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Hom_comp_unit_l C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: forall (a b c d : C') (f : @subtype_image_carrier (@Hom C (i a) (i b)) (homC' a b)) (g : @subtype_image_carrier (@Hom C (i b) (i c)) (homC' b c)) (h : @subtype_image_carrier (@Hom C (i c) (i d)) (homC' c d)), @subtype_image_equal (@Hom C (i a) (i d)) (@subtype_image_carrier (@Hom C (i a) (i d)) (homC' a d)) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d)) (@CompC' a b d (@CompC' b c d h g) f) (@CompC' a c d h (@CompC' a b c g f)) *) unfold subtype_image_equal in |- *. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Hom_comp_unit_l C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: forall (a b c d : C') (f : @subtype_image_carrier (@Hom C (i a) (i b)) (homC' a b)) (g : @subtype_image_carrier (@Hom C (i b) (i c)) (homC' b c)) (h : @subtype_image_carrier (@Hom C (i c) (i d)) (homC' c d)), @Equal (@Hom C (i a) (i d)) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a b d (@CompC' b c d h g) f)) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a c d h (@CompC' a b c g f))) *) intros a b c d f g h; try assumption. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Hom_comp_unit_l C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Equal (@Hom C (i a) (i d)) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a b d (@CompC' b c d h g) f)) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a c d h (@CompC' a b c g f))) *) apply Trans with (comp_hom (subtype_image_inj (CompC' h g)) (subtype_image_inj f)); auto with algebra. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Hom_comp_unit_l C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Equal (@Hom C (i a) (i d)) (@comp_hom C (i a) (i b) (i d) (@subtype_image_inj (@Hom C (i b) (i d)) (homC' b d) (@CompC' b c d h g)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) f)) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a c d h (@CompC' a b c g f))) *) apply Trans with (comp_hom (comp_hom (subtype_image_inj h) (subtype_image_inj g)) (subtype_image_inj f)); auto with algebra. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Hom_comp_unit_l C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Equal (@Hom C (i a) (i d)) (@comp_hom C (i a) (i b) (i d) (@comp_hom C (i b) (i c) (i d) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) h) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) g)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) f)) (@subtype_image_inj (@Hom C (i a) (i d)) (homC' a d) (@CompC' a c d h (@CompC' a b c g f))) *) apply Trans with (comp_hom (subtype_image_inj h) (subtype_image_inj (CompC' g f))); auto with algebra. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Hom_comp_unit_l C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Equal (@Hom C (i a) (i d)) (@comp_hom C (i a) (i b) (i d) (@comp_hom C (i b) (i c) (i d) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) h) (@subtype_image_inj (@Hom C (i b) (i c)) (homC' b c) g)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) f)) (@comp_hom C (i a) (i c) (i d) (@subtype_image_inj (@Hom C (i c) (i d)) (homC' c d) h) (@subtype_image_inj (@Hom C (i a) (i c)) (homC' a c) (@CompC' a b c g f))) *) apply Trans with (comp_hom (subtype_image_inj h) (comp_hom (subtype_image_inj g) (subtype_image_inj f))); auto with algebra. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Hom_comp_unit_l C' subcat_Hom subcat_Hom_comp idC' *) red in |- *. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: forall (a b : C') (f : Carrier (subcat_Hom a b)), @Equal (subcat_Hom a b) (@Ap (cart (subcat_Hom b b) (subcat_Hom a b)) (subcat_Hom a b) (subcat_Hom_comp a b b) (@couple (subcat_Hom b b) (subcat_Hom a b) (idC' b) f)) f *) unfold subcat_Hom_comp in |- *. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: forall (a b : C') (f : Carrier (subcat_Hom a b)), @Equal (subcat_Hom a b) (@Ap (cart (subcat_Hom b b) (subcat_Hom a b)) (subcat_Hom a b) (@Build_Map (cart (subcat_Hom b b) (subcat_Hom a b)) (subcat_Hom a b) (fun x : Carrier (cart (subcat_Hom b b) (subcat_Hom a b)) => @CompC' a b b (@proj1 (subcat_Hom b b) (subcat_Hom a b) x) (@proj2 (subcat_Hom b b) (subcat_Hom a b) x)) (fun (x y : Carrier (cart (subcat_Hom b b) (subcat_Hom a b))) (H' : @Equal (cart (subcat_Hom b b) (subcat_Hom a b)) x y) => @Trans (@Hom C (i a) (i b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@CompC' a b b (@proj1 (subcat_Hom b b) (subcat_Hom a b) x) (@proj2 (subcat_Hom b b) (subcat_Hom a b) x))) (@comp_hom C (i a) (i b) (i b) (@subtype_image_inj (@Hom C (i b) (i b)) (homC' b b) (@proj1 (subcat_Hom b b) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b b) (subcat_Hom a b) x))) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@CompC' a b b (@proj1 (subcat_Hom b b) (subcat_Hom a b) y) (@proj2 (subcat_Hom b b) (subcat_Hom a b) y))) (@CompC'_ok a b b (@proj1 (subcat_Hom b b) (subcat_Hom a b) x) (@proj2 (subcat_Hom b b) (subcat_Hom a b) x)) (@Trans (@Hom C (i a) (i b)) (@comp_hom C (i a) (i b) (i b) (@subtype_image_inj (@Hom C (i b) (i b)) (homC' b b) (@proj1 (subcat_Hom b b) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b b) (subcat_Hom a b) x))) (@comp_hom C (i a) (i b) (i b) (@subtype_image_inj (@Hom C (i b) (i b)) (homC' b b) (@proj1 (subcat_Hom b b) (subcat_Hom a b) y)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b b) (subcat_Hom a b) y))) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@CompC' a b b (@proj1 (subcat_Hom b b) (subcat_Hom a b) y) (@proj2 (subcat_Hom b b) (subcat_Hom a b) y))) (@comp_hom_compatible C (i a) (i b) (i b) (@subtype_image_inj (@Hom C (i b) (i b)) (homC' b b) (@proj1 (subcat_Hom b b) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i b) (i b)) (homC' b b) (@proj1 (subcat_Hom b b) (subcat_Hom a b) y)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b b) (subcat_Hom a b) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b b) (subcat_Hom a b) y)) (@proj1_comp (subcat_Hom b b) (subcat_Hom a b) x y H') (@proj2_comp (subcat_Hom b b) (subcat_Hom a b) x y H')) (@Sym (@Hom C (i a) (i b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@CompC' a b b (@proj1 (subcat_Hom b b) (subcat_Hom a b) y) (@proj2 (subcat_Hom b b) (subcat_Hom a b) y))) (@comp_hom C (i a) (i b) (i b) (@subtype_image_inj (@Hom C (i b) (i b)) (homC' b b) (@proj1 (subcat_Hom b b) (subcat_Hom a b) y)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj2 (subcat_Hom b b) (subcat_Hom a b) y))) (@CompC'_ok a b b (@proj1 (subcat_Hom b b) (subcat_Hom a b) y) (@proj2 (subcat_Hom b b) (subcat_Hom a b) y)))))) (@couple (subcat_Hom b b) (subcat_Hom a b) (idC' b) f)) f *) simpl in |- *. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: forall (a b : C') (f : @subtype_image_carrier (@Hom C (i a) (i b)) (homC' a b)), @subtype_image_equal (@Hom C (i a) (i b)) (@subtype_image_carrier (@Hom C (i a) (i b)) (homC' a b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b)) (@CompC' a b b (idC' b) f) f *) unfold subtype_image_equal in |- *. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: forall (a b : C') (f : @subtype_image_carrier (@Hom C (i a) (i b)) (homC' a b)), @Equal (@Hom C (i a) (i b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@CompC' a b b (idC' b) f)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) f) *) intros a b f; try assumption. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Equal (@Hom C (i a) (i b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@CompC' a b b (idC' b) f)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) f) *) apply Trans with (comp_hom (subtype_image_inj (idC' b)) (subtype_image_inj f)); auto with algebra. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) (* Goal: @Equal (@Hom C (i a) (i b)) (@comp_hom C (i a) (i b) (i b) (@subtype_image_inj (@Hom C (i b) (i b)) (homC' b b) (idC' b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) f)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) f) *) apply Trans with (comp_hom (Hom_id (i b)) (subtype_image_inj f)); auto with algebra. (* Goal: @Hom_comp_unit_r C' subcat_Hom subcat_Hom_comp idC' *) red in |- *. (* Goal: forall (a b : C') (f : Carrier (subcat_Hom a b)), @Equal (subcat_Hom a b) (@Ap (cart (subcat_Hom a b) (subcat_Hom a a)) (subcat_Hom a b) (subcat_Hom_comp a a b) (@couple (subcat_Hom a b) (subcat_Hom a a) f (idC' a))) f *) unfold subcat_Hom_comp in |- *. (* Goal: forall (a b : C') (f : Carrier (subcat_Hom a b)), @Equal (subcat_Hom a b) (@Ap (cart (subcat_Hom a b) (subcat_Hom a a)) (subcat_Hom a b) (@Build_Map (cart (subcat_Hom a b) (subcat_Hom a a)) (subcat_Hom a b) (fun x : Carrier (cart (subcat_Hom a b) (subcat_Hom a a)) => @CompC' a a b (@proj1 (subcat_Hom a b) (subcat_Hom a a) x) (@proj2 (subcat_Hom a b) (subcat_Hom a a) x)) (fun (x y : Carrier (cart (subcat_Hom a b) (subcat_Hom a a))) (H' : @Equal (cart (subcat_Hom a b) (subcat_Hom a a)) x y) => @Trans (@Hom C (i a) (i b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@CompC' a a b (@proj1 (subcat_Hom a b) (subcat_Hom a a) x) (@proj2 (subcat_Hom a b) (subcat_Hom a a) x))) (@comp_hom C (i a) (i a) (i b) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj1 (subcat_Hom a b) (subcat_Hom a a) x)) (@subtype_image_inj (@Hom C (i a) (i a)) (homC' a a) (@proj2 (subcat_Hom a b) (subcat_Hom a a) x))) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@CompC' a a b (@proj1 (subcat_Hom a b) (subcat_Hom a a) y) (@proj2 (subcat_Hom a b) (subcat_Hom a a) y))) (@CompC'_ok a a b (@proj1 (subcat_Hom a b) (subcat_Hom a a) x) (@proj2 (subcat_Hom a b) (subcat_Hom a a) x)) (@Trans (@Hom C (i a) (i b)) (@comp_hom C (i a) (i a) (i b) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj1 (subcat_Hom a b) (subcat_Hom a a) x)) (@subtype_image_inj (@Hom C (i a) (i a)) (homC' a a) (@proj2 (subcat_Hom a b) (subcat_Hom a a) x))) (@comp_hom C (i a) (i a) (i b) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj1 (subcat_Hom a b) (subcat_Hom a a) y)) (@subtype_image_inj (@Hom C (i a) (i a)) (homC' a a) (@proj2 (subcat_Hom a b) (subcat_Hom a a) y))) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@CompC' a a b (@proj1 (subcat_Hom a b) (subcat_Hom a a) y) (@proj2 (subcat_Hom a b) (subcat_Hom a a) y))) (@comp_hom_compatible C (i a) (i a) (i b) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj1 (subcat_Hom a b) (subcat_Hom a a) x)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj1 (subcat_Hom a b) (subcat_Hom a a) y)) (@subtype_image_inj (@Hom C (i a) (i a)) (homC' a a) (@proj2 (subcat_Hom a b) (subcat_Hom a a) x)) (@subtype_image_inj (@Hom C (i a) (i a)) (homC' a a) (@proj2 (subcat_Hom a b) (subcat_Hom a a) y)) (@proj1_comp (subcat_Hom a b) (subcat_Hom a a) x y H') (@proj2_comp (subcat_Hom a b) (subcat_Hom a a) x y H')) (@Sym (@Hom C (i a) (i b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@CompC' a a b (@proj1 (subcat_Hom a b) (subcat_Hom a a) y) (@proj2 (subcat_Hom a b) (subcat_Hom a a) y))) (@comp_hom C (i a) (i a) (i b) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@proj1 (subcat_Hom a b) (subcat_Hom a a) y)) (@subtype_image_inj (@Hom C (i a) (i a)) (homC' a a) (@proj2 (subcat_Hom a b) (subcat_Hom a a) y))) (@CompC'_ok a a b (@proj1 (subcat_Hom a b) (subcat_Hom a a) y) (@proj2 (subcat_Hom a b) (subcat_Hom a a) y)))))) (@couple (subcat_Hom a b) (subcat_Hom a a) f (idC' a))) f *) simpl in |- *. (* Goal: forall (a b : C') (f : @subtype_image_carrier (@Hom C (i a) (i b)) (homC' a b)), @subtype_image_equal (@Hom C (i a) (i b)) (@subtype_image_carrier (@Hom C (i a) (i b)) (homC' a b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b)) (@CompC' a a b f (idC' a)) f *) unfold subtype_image_equal in |- *. (* Goal: forall (a b : C') (f : @subtype_image_carrier (@Hom C (i a) (i b)) (homC' a b)), @Equal (@Hom C (i a) (i b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@CompC' a a b f (idC' a))) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) f) *) intros a b f; try assumption. (* Goal: @Equal (@Hom C (i a) (i b)) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) (@CompC' a a b f (idC' a))) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) f) *) apply Trans with (comp_hom (subtype_image_inj f) (subtype_image_inj (idC' a))); auto with algebra. (* Goal: @Equal (@Hom C (i a) (i b)) (@comp_hom C (i a) (i a) (i b) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) f) (@subtype_image_inj (@Hom C (i a) (i a)) (homC' a a) (idC' a))) (@subtype_image_inj (@Hom C (i a) (i b)) (homC' a b) f) *) apply Trans with (comp_hom (subtype_image_inj f) (Hom_id (i a))); auto with algebra. Qed. End Subcategory_def.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrfun ssrbool eqtype ssrnat choice seq. From mathcomp Require Import fintype finfun bigop ssralg countalg ssrnum poly. Import GRing.Theory Num.Theory. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Delimit Scope int_scope with Z. Local Open Scope int_scope. Variant int : Set := Posz of nat | Negz of nat. Notation "n %:Z" := (Posz n) (at level 2, left associativity, format "n %:Z", only parsing) : int_scope. Notation "n %:Z" := (Posz n) (at level 2, left associativity, format "n %:Z", only parsing) : ring_scope. Notation "n = m :> 'in' 't'" := (Posz n = Posz m) (at level 70, m at next level, format "n = m :> 'in' 't'") : ring_scope. Notation "n == m :> 'in' 't'" := (Posz n == Posz m) (at level 70, m at next level, format "n == m :> 'in' 't'") : ring_scope. Notation "n != m :> 'in' 't'" := (Posz n != Posz m) (at level 70, m at next level, format "n != m :> 'in' 't'") : ring_scope. Notation "n <> m :> 'in' 't'" := (Posz n <> Posz m) (at level 70, m at next level, format "n <> m :> 'in' 't'") : ring_scope. Definition natsum_of_int (m : int) : nat + nat := match m with Posz p => inl _ p | Negz n => inr _ n end. Definition int_of_natsum (m : nat + nat) := match m with inl p => Posz p | inr n => Negz n end. Lemma natsum_of_intK : cancel natsum_of_int int_of_natsum. Proof. (* Goal: @cancel (sum nat nat) int natsum_of_int int_of_natsum *) by case. Qed. Definition int_eqMixin := CanEqMixin natsum_of_intK. Definition int_countMixin := CanCountMixin natsum_of_intK. Definition int_choiceMixin := CountChoiceMixin int_countMixin. Module intZmod. Section intZmod. Definition addz (m n : int) := match m, n with | Posz m', Posz n' => Posz (m' + n') | Negz m', Negz n' => Negz (m' + n').+1 | Posz m', Negz n' => if n' < m' then Posz (m' - n'.+1) else Negz (n' - m') | Negz n', Posz m' => if n' < m' then Posz (m' - n'.+1) else Negz (n' - m') end. Definition oppz m := nosimpl match m with | Posz n => if n is (n'.+1)%N then Negz n' else Posz 0 | Negz n => Posz (n.+1)%N end. Local Notation "0" := (Posz 0) : int_scope. Local Notation "-%Z" := (@oppz) : int_scope. Local Notation "- x" := (oppz x) : int_scope. Local Notation "+%Z" := (@addz) : int_scope. Local Notation "x + y" := (addz x y) : int_scope. Local Notation "x - y" := (x + - y) : int_scope. Lemma PoszD : {morph Posz : m n / (m + n)%N >-> m + n}. Proof. by []. Qed. Proof. (* Goal: @morphism_2 nat int Posz (fun m n : nat => addn m n) (fun m n : int => addz m n) *) by []. Qed. Lemma int_rect (P : int -> Type) : P 0 -> (forall n : nat, P n -> P (n.+1)) Proof. (* Goal: forall (_ : P (Posz O)) (_ : forall (n : nat) (_ : P (Posz n)), P (Posz (S n))) (_ : forall (n : nat) (_ : P (oppz (Posz n))), P (oppz (Posz (S n)))) (n : int), P n *) by move=> P0 hPp hPn []; elim=> [|n ihn]//; do ?[apply: hPn | apply: hPp]. Qed. Definition int_rec := int_rect. Definition int_ind := int_rect. Lemma addzC : commutative addz. Proof. (* Goal: @commutative int int addz *) by move=> [] m [] n //=; rewrite addnC. Qed. Lemma add0z : left_id 0 addz. Proof. by move=> [] [|]. Qed. Proof. (* Goal: @left_id int int (Posz O) addz *) by move=> [] [|]. Qed. Lemma oppz_add : {morph oppz : m n / m + n}. Proof. (* Goal: @morphism_2 int int oppz (fun m n : int => addz m n) (fun m n : int => addz m n) *) move=> [[|n]|n] [[|m]|m] /=; rewrite ?NegzE ?oppzK ?addnS ?addn0 ?subn0 //; rewrite ?ltnS[m <= n]leqNgt [n <= m]leqNgt; case: ltngtP=> hmn /=; by rewrite ?hmn ?subnn // ?oppzK ?subSS ?subnS ?prednK // ?subn_gt0. Qed. Lemma add1Pz (n : int) : 1 + (n - 1) = n. Proof. (* Goal: @eq int (addz (Posz (S O)) (addz n (oppz (Posz (S O))))) n *) by case: (intP n)=> // n' /= _; rewrite ?(subn1, addn0). Qed. Lemma subSz1 (n : int) : 1 + n - 1 = n. Proof. (* Goal: @eq int (addz (addz (Posz (S O)) n) (oppz (Posz (S O)))) n *) by apply: (inv_inj oppzK); rewrite addzC !oppz_add oppzK [_ - n]addzC add1Pz. Qed. Lemma addSnz (m : nat) (n : int) : (m.+1%N) + n = 1 + (m + n). Proof. (* Goal: @eq int (addz (Posz (S m)) n) (addz (Posz (S O)) (addz (Posz m) n)) *) move: m n=> [|m] [] [|n] //=; rewrite ?add1n ?subn1 // !(ltnS, subSS). (* Goal: @eq int (if leq n m then Posz (subn m n) else Negz (subn n (S m))) match (if leq (S n) m then Posz (subn m (S n)) else Negz (subn n m)) with | Posz n' => Posz (addn (S O) n') | Negz n' => if leq (S n') (S O) then Posz (subn (S O) (S n')) else Negz (subn n' (S O)) end *) rewrite [n <= m]leqNgt; case: ltngtP=> hmn /=; rewrite ?hmn ?subnn //. (* Goal: @eq int (Negz (subn n (S m))) (if leq (S (subn n m)) (S O) then Posz (subn (S O) (S (subn n m))) else Negz (subn (subn n m) (S O))) *) (* Goal: @eq int (Posz (subn m n)) (Posz (addn (S O) (subn m (S n)))) *) by rewrite subnS add1n prednK ?subn_gt0. (* Goal: @eq int (Negz (subn n (S m))) (if leq (S (subn n m)) (S O) then Posz (subn (S O) (S (subn n m))) else Negz (subn (subn n m) (S O))) *) by rewrite ltnS leqn0 subn_eq0 leqNgt hmn /= subnS subn1. Qed. Lemma addSz (m n : int) : (1 + m) + n = 1 + (m + n). Lemma addPz (m n : int) : (m - 1) + n = (m + n) - 1. Proof. (* Goal: @eq int (addz (addz m (oppz (Posz (S O)))) n) (addz (addz m n) (oppz (Posz (S O)))) *) by apply: (inv_inj oppzK); rewrite !oppz_add oppzK [_ + 1]addzC addSz addzC. Qed. Lemma addzA : associative addz. Proof. (* Goal: @associative int addz *) elim=> [|m ihm|m ihm] n p; first by rewrite !add0z. (* Goal: @eq int (addz (oppz (Posz (S m))) (addz n p)) (addz (addz (oppz (Posz (S m))) n) p) *) (* Goal: @eq int (addz (Posz (S m)) (addz n p)) (addz (addz (Posz (S m)) n) p) *) by rewrite -add1n PoszD !addSz ihm. (* Goal: @eq int (addz (oppz (Posz (S m))) (addz n p)) (addz (addz (oppz (Posz (S m))) n) p) *) by rewrite -add1n addnC PoszD oppz_add !addPz ihm. Qed. Lemma predn_int (n : nat) : 0 < n -> n.-1%:Z = n - 1. Proof. (* Goal: forall _ : is_true (leq (S O) n), @eq int (Posz (Nat.pred n)) (addz (Posz n) (oppz (Posz (S O)))) *) by case: n=> // n _ /=; rewrite subn1. Qed. Definition Mixin := ZmodMixin addzA addzC add0z addNz. End intZmod. End intZmod. Canonical int_ZmodType := ZmodType int intZmod.Mixin. Local Open Scope ring_scope. Section intZmoduleTheory. Local Coercion Posz : nat >-> int. Lemma PoszD : {morph Posz : n m / (n + m)%N >-> n + m}. Proof. by []. Qed. Lemma int_rect (P : int -> Type) : P 0 -> (forall n : nat, P n -> P (n.+1)%N) Definition int_rec := int_rect. Definition int_ind := int_rect. Variant int_spec (x : int) : int -> Type := | ZintNull : int_spec x 0 | ZintPos n : int_spec x n.+1 | ZintNeg n : int_spec x (- (n.+1)%:Z). Lemma intP x : int_spec x x. Proof. (* Goal: int_spec x x *) by move: x=> [] []; constructor. Qed. Definition oppz_add := (@opprD [zmodType of int]). Lemma subzn (m n : nat) : (n <= m)%N -> m%:Z - n%:Z = (m - n)%N. Proof. (* Goal: forall _ : is_true (leq n m), @eq (GRing.Zmodule.sort int_ZmodType) (@GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n))) (Posz (subn m n)) *) elim: n=> //= [|n ihn] hmn; first by rewrite subr0 subn0. (* Goal: @eq int (@GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz (S n)))) (Posz (subn m (S n))) *) rewrite subnS -addn1 !PoszD opprD addrA ihn 1?ltnW //. (* Goal: @eq int (@GRing.add int_ZmodType (Posz (subn m n)) (@GRing.opp int_ZmodType (Posz (S O)))) (Posz (Nat.pred (subn m n))) *) by rewrite intZmod.predn_int // subn_gt0. Qed. Lemma subzSS (m n : nat) : m.+1%:Z - n.+1%:Z = m%:Z - n%:Z. Proof. (* Goal: @eq (GRing.Zmodule.sort int_ZmodType) (@GRing.add int_ZmodType (Posz (S m)) (@GRing.opp int_ZmodType (Posz (S n)))) (@GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n))) *) by elim: n m=> [|n ihn] m //; rewrite !subzn. Qed. End intZmoduleTheory. Module intRing. Section intRing. Local Coercion Posz : nat >-> int. Definition mulz (m n : int) := match m, n with | Posz m', Posz n' => (m' * n')%N%:Z | Negz m', Negz n' => (m'.+1%N * n'.+1%N)%N%:Z | Posz m', Negz n' => - (m' * (n'.+1%N))%N%:Z | Negz n', Posz m' => - (m' * (n'.+1%N))%N%:Z end. Local Notation "1" := (1%N:int) : int_scope. Local Notation "*%Z" := (@mulz) : int_scope. Local Notation "x * y" := (mulz x y) : int_scope. Lemma mul0z : left_zero 0 *%Z. Proof. (* Goal: @left_zero (GRing.Zmodule.sort int_ZmodType) int (GRing.zero int_ZmodType) mulz *) by case=> [n|[|n]] //=; rewrite muln0. Qed. Lemma mulzC : commutative mulz. Proof. (* Goal: @commutative int int mulz *) by move=> [] m [] n //=; rewrite mulnC. Qed. Lemma mulz0 : right_zero 0 *%Z. Proof. (* Goal: @right_zero int (GRing.Zmodule.sort int_ZmodType) (GRing.zero int_ZmodType) mulz *) by move=> x; rewrite mulzC mul0z. Qed. Lemma mulzN (m n : int) : (m * (- n))%Z = - (m * n)%Z. Proof. (* Goal: @eq int (mulz m (@GRing.opp int_ZmodType n)) (@GRing.opp int_ZmodType (mulz m n)) *) by case: (intP m)=> {m} [|m|m]; rewrite ?mul0z //; case: (intP n)=> {n} [|n|n]; rewrite ?mulz0 //= mulnC. Qed. Lemma mulNz (m n : int) : ((- m) * n)%Z = - (m * n)%Z. Proof. (* Goal: @eq int (mulz (@GRing.opp int_ZmodType m) n) (@GRing.opp int_ZmodType (mulz m n)) *) by rewrite mulzC mulzN mulzC. Qed. Lemma mulzA : associative mulz. Proof. (* Goal: @associative int mulz *) by move=> [] m [] n [] p; rewrite ?NegzE ?(mulnA,mulNz,mulzN,opprK) //= ?mulnA. Qed. Lemma mul1z : left_id 1%Z mulz. Proof. (* Goal: @left_id int int (Posz (S O) : int) mulz *) by case=> [[|n]|n] //=; rewrite ?mul1n// plusE addn0. Qed. Lemma mulzS (x : int) (n : nat) : (x * n.+1%:Z)%Z = x + (x * n)%Z. Proof. (* Goal: @eq int (mulz x (Posz (S n))) (@GRing.add int_ZmodType x (mulz x (Posz n))) *) by case: (intP x)=> [|m'|m'] //=; [rewrite mulnS|rewrite mulSn -opprD]. Qed. Lemma mulz_addl : left_distributive mulz (+%R). Proof. (* Goal: @left_distributive int int mulz (@GRing.add int_ZmodType) *) move=> x y z; elim: z=> [|n|n]; first by rewrite !(mul0z,mulzC). (* Goal: forall _ : @eq int (mulz (@GRing.add int_ZmodType x y) (@GRing.opp int_ZmodType (Posz n))) (@GRing.add int_ZmodType (mulz x (@GRing.opp int_ZmodType (Posz n))) (mulz y (@GRing.opp int_ZmodType (Posz n)))), @eq int (mulz (@GRing.add int_ZmodType x y) (@GRing.opp int_ZmodType (Posz (S n)))) (@GRing.add int_ZmodType (mulz x (@GRing.opp int_ZmodType (Posz (S n)))) (mulz y (@GRing.opp int_ZmodType (Posz (S n))))) *) (* Goal: forall _ : @eq int (mulz (@GRing.add int_ZmodType x y) (Posz n)) (@GRing.add int_ZmodType (mulz x (Posz n)) (mulz y (Posz n))), @eq int (mulz (@GRing.add int_ZmodType x y) (Posz (S n))) (@GRing.add int_ZmodType (mulz x (Posz (S n))) (mulz y (Posz (S n)))) *) by rewrite !mulzS=> ->; rewrite !addrA [X in X + _]addrAC. (* Goal: forall _ : @eq int (mulz (@GRing.add int_ZmodType x y) (@GRing.opp int_ZmodType (Posz n))) (@GRing.add int_ZmodType (mulz x (@GRing.opp int_ZmodType (Posz n))) (mulz y (@GRing.opp int_ZmodType (Posz n)))), @eq int (mulz (@GRing.add int_ZmodType x y) (@GRing.opp int_ZmodType (Posz (S n)))) (@GRing.add int_ZmodType (mulz x (@GRing.opp int_ZmodType (Posz (S n)))) (mulz y (@GRing.opp int_ZmodType (Posz (S n))))) *) rewrite !mulzN !mulzS -!opprD=> /oppr_inj->. (* Goal: @eq int (@GRing.opp int_ZmodType (@GRing.add int_ZmodType (@GRing.add int_ZmodType x y) (@GRing.add int_ZmodType (mulz x (Posz n)) (mulz y (Posz n))))) (@GRing.opp int_ZmodType (@GRing.add int_ZmodType (@GRing.add int_ZmodType x (mulz x (Posz n))) (@GRing.add int_ZmodType y (mulz y (Posz n))))) *) by rewrite !addrA [X in X + _]addrAC. Qed. Definition comMixin := ComRingMixin mulzA mulzC mul1z mulz_addl nonzero1z. End intRing. End intRing. Canonical int_Ring := Eval hnf in RingType int intRing.comMixin. Canonical int_comRing := Eval hnf in ComRingType int intRing.mulzC. Section intRingTheory. Implicit Types m n : int. Local Coercion Posz : nat >-> int. Lemma PoszM : {morph Posz : n m / (n * m)%N >-> n * m}. Proof. by []. Qed. Proof. (* Goal: @morphism_2 nat int Posz (fun n m : nat => muln n m) (fun n m : int => @GRing.mul int_Ring n m) *) by []. Qed. Lemma predn_int (n : nat) : (0 < n)%N -> n.-1%:Z = n%:Z - 1. End intRingTheory. Module intUnitRing. Section intUnitRing. Implicit Types m n : int. Local Coercion Posz : nat >-> int. Definition unitz := [qualify a n : int | (n == 1) || (n == -1)]. Definition invz n : int := n. Lemma mulVz : {in unitz, left_inverse 1%R invz *%R}. Proof. (* Goal: @prop_in1 int (@mem int (predPredType int) (@has_quality (S O) int unitz)) (fun x : int => @eq (GRing.Ring.sort int_Ring) (@GRing.mul int_Ring (invz x) x) (GRing.one int_Ring)) (inPhantom (@left_inverse int int (GRing.Ring.sort int_Ring) (GRing.one int_Ring) invz (@GRing.mul int_Ring))) *) by move=> n /pred2P[] ->. Qed. Lemma mulzn_eq1 m (n : nat) : (m * n == 1) = (m == 1) && (n == 1%N). Proof. (* Goal: @eq bool (@eq_op (GRing.Ring.eqType int_Ring) (@GRing.mul int_Ring m (Posz n)) (GRing.one int_Ring)) (andb (@eq_op int_eqType m (GRing.one int_Ring)) (@eq_op nat_eqType n (S O))) *) by case: m => m /=; [rewrite -PoszM [_==_]muln_eq1 | case: n]. Qed. Lemma unitzPl m n : n * m = 1 -> m \is a unitz. Proof. (* Goal: forall _ : @eq (GRing.Ring.sort int_Ring) (@GRing.mul int_Ring n m) (GRing.one int_Ring), is_true (@in_mem int m (@mem int (predPredType int) (@has_quality (S O) int unitz))) *) rewrite qualifE => /eqP. (* Goal: forall _ : is_true (@eq_op (GRing.Ring.eqType int_Ring) (@GRing.mul int_Ring n m) (GRing.one int_Ring)), is_true (orb (@eq_op int_eqType m (GRing.one int_Ring)) (@eq_op int_eqType m (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)))) *) by case: m => m; rewrite ?NegzE ?mulrN -?mulNr mulzn_eq1 => /andP[_ /eqP->]. Qed. Lemma invz_out : {in [predC unitz], invz =1 id}. Proof. (* Goal: @prop_in1 int (@mem int (simplPredType int) (@predC int (@pred_of_simpl int (@pred_of_mem_pred int (@mem int (predPredType int) (@has_quality (S O) int unitz)))))) (fun x : int => @eq int (invz x) ((fun x0 : int => x0) x)) (inPhantom (@eqfun int int invz (fun x : int => x))) *) exact. Qed. Lemma idomain_axiomz m n : m * n = 0 -> (m == 0) || (n == 0). Proof. (* Goal: forall _ : @eq (GRing.Ring.sort int_Ring) (@GRing.mul int_Ring m n) (GRing.zero (GRing.Ring.zmodType int_Ring)), is_true (orb (@eq_op int_eqType m (GRing.zero int_ZmodType)) (@eq_op int_eqType n (GRing.zero int_ZmodType))) *) by case: m n => m [] n //= /eqP; rewrite ?(NegzE, mulrN, mulNr) ?oppr_eq0 -PoszM [_ == _]muln_eq0. Qed. Definition comMixin := ComUnitRingMixin mulVz unitzPl invz_out. End intUnitRing. End intUnitRing. Canonical int_unitRingType := Eval hnf in UnitRingType int intUnitRing.comMixin. Canonical int_comUnitRing := Eval hnf in [comUnitRingType of int]. Canonical int_iDomain := Eval hnf in IdomainType int intUnitRing.idomain_axiomz. Canonical int_countZmodType := [countZmodType of int]. Canonical int_countRingType := [countRingType of int]. Canonical int_countComRingType := [countComRingType of int]. Canonical int_countUnitRingType := [countUnitRingType of int]. Canonical int_countComUnitRingType := [countComUnitRingType of int]. Canonical int_countIdomainType := [countIdomainType of int]. Definition absz m := match m with Posz p => p | Negz n => n.+1 end. Notation "m - n" := (@GRing.add int_ZmodType m%N (@GRing.opp int_ZmodType n%N)) : distn_scope. Arguments absz m%distn_scope. Local Notation "`| m |" := (absz m) : nat_scope. Module intOrdered. Section intOrdered. Implicit Types m n p : int. Local Coercion Posz : nat >-> int. Local Notation normz m := (absz m)%:Z. Definition lez m n := match m, n with | Posz m', Posz n' => (m' <= n')%N | Posz m', Negz n' => false | Negz m', Posz n' => true | Negz m', Negz n' => (n' <= m')%N end. Definition ltz m n := match m, n with | Posz m', Posz n' => (m' < n')%N | Posz m', Negz n' => false | Negz m', Posz n' => true | Negz m', Negz n' => (n' < m')%N end. Fact lez_norm_add x y : lez (normz (x + y)) (normz x + normz y). Proof. (* Goal: is_true (lez (Posz (absz (@GRing.add int_ZmodType x y))) (@GRing.add int_ZmodType (Posz (absz x)) (Posz (absz y)))) *) move: x y=> [] m [] n; rewrite /= ?addnS //=; rewrite /GRing.add /GRing.Zmodule.add /=; case: ltnP=> //=; rewrite ?addSn ?ltnS ?leq_subLR ?(addnS, addSn) ?(leq_trans _ (leqnSn _)) //; by rewrite 1?addnCA ?leq_addr ?addnA ?leq_addl. Qed. Fact ltz_add x y : ltz 0 x -> ltz 0 y -> ltz 0 (x + y). Proof. (* Goal: forall (_ : is_true (ltz (GRing.zero int_ZmodType) x)) (_ : is_true (ltz (GRing.zero int_ZmodType) y)), is_true (ltz (GRing.zero int_ZmodType) (@GRing.add int_ZmodType x y)) *) by move: x y => [] x [] y //= hx hy; rewrite ltn_addr. Qed. Fact lez_total x y : lez x y || lez y x. Proof. (* Goal: is_true (orb (lez x y) (lez y x)) *) by move: x y => [] x [] y //=; apply: leq_total. Qed. Fact normzM : {morph (fun n => normz n) : x y / x * y}. Proof. (* Goal: @morphism_2 int int (fun n : int => Posz (absz n)) (fun x y : int => @GRing.mul int_Ring x y) (fun x y : int => @GRing.mul int_Ring x y) *) by move=> [] x [] y; rewrite // abszN // mulnC. Qed. Lemma subz_ge0 m n : lez 0 (n - m) = lez m n. Proof. (* Goal: @eq bool (lez (GRing.zero int_ZmodType) (@GRing.add int_ZmodType n (@GRing.opp int_ZmodType m))) (lez m n) *) case: (intP m); case: (intP n)=> // {m n} m n /=; rewrite ?ltnS -?opprD ?opprB ?subzSS; case: leqP=> // hmn; by [ rewrite subzn // | rewrite -opprB subzn ?(ltnW hmn) //; move: hmn; rewrite -subn_gt0; case: (_ - _)%N]. Qed. Fact lez_def x y : (lez x y) = (normz (y - x) == y - x). Proof. (* Goal: @eq bool (lez x y) (@eq_op int_eqType (Posz (absz (@GRing.add int_ZmodType y (@GRing.opp int_ZmodType x)))) (@GRing.add int_ZmodType y (@GRing.opp int_ZmodType x))) *) by rewrite -subz_ge0; move: (_ - _) => [] n //=; rewrite eqxx. Qed. Fact ltz_def x y : (ltz x y) = (y != x) && (lez x y). Proof. (* Goal: @eq bool (ltz x y) (andb (negb (@eq_op int_eqType y x)) (lez x y)) *) by move: x y=> [] x [] y //=; rewrite (ltn_neqAle, leq_eqVlt) // eq_sym. Qed. Definition Mixin := NumMixin lez_norm_add ltz_add eq0_normz (in2W lez_total) normzM lez_def ltz_def. End intOrdered. End intOrdered. Canonical int_numDomainType := NumDomainType int intOrdered.Mixin. Canonical int_realDomainType := RealDomainType int (intOrdered.lez_total 0). Section intOrderedTheory. Local Coercion Posz : nat >-> int. Implicit Types m n p : nat. Implicit Types x y z : int. Lemma lez_nat m n : (m <= n :> int) = (m <= n)%N. Proof. (* Goal: @eq bool (@Num.Def.ler int_numDomainType (Posz m : int) (Posz n : int)) (leq m n) *) by []. Qed. Lemma ltz_nat m n : (m < n :> int) = (m < n)%N. Proof. (* Goal: @eq bool (@Num.Def.ltr int_numDomainType (Posz m : int) (Posz n : int)) (leq (S m) n) *) by rewrite ltnNge ltrNge lez_nat. Qed. Definition ltez_nat := (lez_nat, ltz_nat). Lemma ltNz_nat m n : (- m%:Z < n) = (m != 0%N) || (n != 0%N). Proof. (* Goal: @eq bool (@Num.Def.ltr int_numDomainType (@GRing.opp int_ZmodType (Posz m)) (Posz n)) (orb (negb (@eq_op nat_eqType m O)) (negb (@eq_op nat_eqType n O))) *) by move: m n=> [|?] []. Qed. Definition lteNz_nat := (leNz_nat, ltNz_nat). Lemma lezN_nat m n : (m%:Z <= - n%:Z) = (m == 0%N) && (n == 0%N). Proof. (* Goal: @eq bool (@Num.Def.ler int_numDomainType (Posz m) (@GRing.opp int_ZmodType (Posz n))) (andb (@eq_op nat_eqType m O) (@eq_op nat_eqType n O)) *) by move: m n=> [|?] []. Qed. Lemma ltzN_nat m n : (m%:Z < - n%:Z) = false. Proof. (* Goal: @eq bool (@Num.Def.ltr int_numDomainType (Posz m) (@GRing.opp int_ZmodType (Posz n))) false *) by move: m n=> [|?] []. Qed. Lemma le0z_nat n : 0 <= n :> int. Proof. by []. Qed. Proof. (* Goal: is_true (@Num.Def.ler int_numDomainType (GRing.zero int_ZmodType : int) (Posz n : int)) *) by []. Qed. Definition ltezN_nat := (lezN_nat, ltzN_nat). Definition ltez_natE := (ltez_nat, lteNz_nat, ltezN_nat, le0z_nat, lez0_nat). Lemma lez_add1r x y : (1 + x <= y) = (x < y). Proof. (* Goal: @eq bool (@Num.Def.ler int_numDomainType (@GRing.add (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring) x) y) (@Num.Def.ltr int_numDomainType x y) *) by rewrite -subr_gt0 gtz0_ge1 lter_sub_addr. Qed. Lemma lez_addr1 x y : (x + 1 <= y) = (x < y). Proof. (* Goal: @eq bool (@Num.Def.ler int_numDomainType (@GRing.add int_ZmodType x (GRing.one int_Ring)) y) (@Num.Def.ltr int_numDomainType x y) *) by rewrite addrC lez_add1r. Qed. Lemma ltz_add1r x y : (x < 1 + y) = (x <= y). Proof. (* Goal: @eq bool (@Num.Def.ltr int_numDomainType x (@GRing.add (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring) y)) (@Num.Def.ler int_numDomainType x y) *) by rewrite -lez_add1r ler_add2l. Qed. Lemma ltz_addr1 x y : (x < y + 1) = (x <= y). Proof. (* Goal: @eq bool (@Num.Def.ltr int_numDomainType x (@GRing.add int_ZmodType y (GRing.one int_Ring))) (@Num.Def.ler int_numDomainType x y) *) by rewrite -lez_addr1 ler_add2r. Qed. End intOrderedTheory. Bind Scope ring_scope with int. Definition intmul (R : zmodType) (x : R) (n : int) := nosimpl match n with | Posz n => (x *+ n)%R | Negz n => (x *- (n.+1))%R end. Notation "*~%R" := (@intmul _) (at level 0, format " *~%R") : ring_scope. Notation "x *~ n" := (intmul x n) (at level 40, left associativity, format "x *~ n") : ring_scope. Notation intr := ( *~%R 1). Notation "n %:~R" := (1 *~ n)%R (at level 2, left associativity, format "n %:~R") : ring_scope. Lemma pmulrn (R : zmodType) (x : R) (n : nat) : x *+ n = x *~ n%:Z. Proof. (* Goal: @eq (GRing.Zmodule.sort R) (@GRing.natmul R x n) (@intmul R x (Posz n)) *) by []. Qed. Lemma nmulrn (R : zmodType) (x : R) (n : nat) : x *- n = x *~ - n%:Z. Proof. (* Goal: @eq (GRing.Zmodule.sort R) (@GRing.opp R (@GRing.natmul R x n)) (@intmul R x (@GRing.opp int_ZmodType (Posz n))) *) by case: n=> [] //; rewrite ?oppr0. Qed. Section ZintLmod. Definition zmodule (M : Type) : Type := M. Local Notation "M ^z" := (zmodule M) (at level 2, format "M ^z") : type_scope. Local Coercion Posz : nat >-> int. Variable M : zmodType. Implicit Types m n : int. Implicit Types x y z : M. Fact mulrzA_C m n x : (x *~ n) *~ m = x *~ (m * n). Proof. (* Goal: @eq (GRing.Zmodule.sort M) (@intmul M (@intmul M x n) m) (@intmul M x (@GRing.mul int_Ring m n)) *) elim: m=> [|m _|m _]; elim: n=> [|n _|n _]; rewrite /intmul //=; rewrite ?(muln0, mulr0n, mul0rn, oppr0, mulNrn, opprK) //; do ?by rewrite mulnC mulrnA. (* Goal: @eq (GRing.Zmodule.sort M) (@GRing.opp M (@GRing.natmul M (@GRing.natmul M x (S n)) (S m))) (@GRing.opp M (@GRing.natmul M x (S (Nat.add m (muln_rec n (S m)))))) *) (* Goal: @eq (GRing.Zmodule.sort M) (@GRing.opp M (@GRing.natmul M (@GRing.natmul M x (S n)) (S m))) (@GRing.opp M (@GRing.natmul M x (S (Nat.add n (muln_rec m (S n)))))) *) * (* Goal: @eq (GRing.Zmodule.sort M) (@GRing.opp M (@GRing.natmul M (@GRing.natmul M x (S n)) (S m))) (@GRing.opp M (@GRing.natmul M x (S (Nat.add m (muln_rec n (S m)))))) *) (* Goal: @eq (GRing.Zmodule.sort M) (@GRing.opp M (@GRing.natmul M (@GRing.natmul M x (S n)) (S m))) (@GRing.opp M (@GRing.natmul M x (S (Nat.add n (muln_rec m (S n)))))) *) by rewrite -mulrnA mulnC. (* Goal: @eq (GRing.Zmodule.sort M) (@GRing.opp M (@GRing.natmul M (@GRing.natmul M x (S n)) (S m))) (@GRing.opp M (@GRing.natmul M x (S (Nat.add m (muln_rec n (S m)))))) *) * (* Goal: @eq (GRing.Zmodule.sort M) (@GRing.opp M (@GRing.natmul M (@GRing.natmul M x (S n)) (S m))) (@GRing.opp M (@GRing.natmul M x (S (Nat.add m (muln_rec n (S m)))))) *) by rewrite -mulrnA. Qed. Fact mulrzAC m n x : (x *~ n) *~ m = (x *~ m) *~ n. Proof. (* Goal: @eq (GRing.Zmodule.sort M) (@intmul M (@intmul M x n) m) (@intmul M (@intmul M x m) n) *) by rewrite !mulrzA_C mulrC. Qed. Fact mulrzDr m : {morph ( *~%R^~ m : M -> M) : x y / x + y}. Proof. (* Goal: @morphism_2 (GRing.Zmodule.sort M) (GRing.Zmodule.sort M) ((fun x : GRing.Zmodule.sort M => @intmul M x m) : forall _ : GRing.Zmodule.sort M, GRing.Zmodule.sort M) (fun x y : GRing.Zmodule.sort M => @GRing.add M x y) (fun x y : GRing.Zmodule.sort M => @GRing.add M x y) *) by elim: m=> [|m _|m _] x y; rewrite ?addr0 /intmul //= ?mulrnDl // opprD. Qed. Lemma mulrzBl_nat (m n : nat) x : x *~ (m%:Z - n%:Z) = x *~ m - x *~ n. Proof. (* Goal: @eq (GRing.Zmodule.sort M) (@intmul M x (@GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n)))) (@GRing.add M (@intmul M x (Posz m)) (@GRing.opp M (@intmul M x (Posz n)))) *) case: (leqP m n)=> hmn; rewrite /intmul //=. (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n)) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.add M (@GRing.natmul M x m) (@GRing.opp M (@GRing.natmul M x n))) *) (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n)) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.add M (@GRing.natmul M x m) (@GRing.opp M (@GRing.natmul M x n))) *) rewrite addrC -{1}[m:int]opprK -opprD subzn //. (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n)) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.add M (@GRing.natmul M x m) (@GRing.opp M (@GRing.natmul M x n))) *) (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.opp int_ZmodType (Posz (subn n m)) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.add M (@GRing.natmul M x m) (@GRing.opp M (@GRing.natmul M x n))) *) rewrite -{2}[n](@subnKC m)// mulrnDr opprD addrA subrr sub0r. (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n)) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.add M (@GRing.natmul M x m) (@GRing.opp M (@GRing.natmul M x n))) *) (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.opp int_ZmodType (Posz (subn n m)) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.opp M (@GRing.natmul M x (subn n m))) *) by case hdmn: (_ - _)%N=> [|dmn] /=; first by rewrite mulr0n oppr0. (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n)) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.add M (@GRing.natmul M x m) (@GRing.opp M (@GRing.natmul M x n))) *) have hnm := ltnW hmn. (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n)) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.add M (@GRing.natmul M x m) (@GRing.opp M (@GRing.natmul M x n))) *) rewrite -{2}[m](@subnKC n)// mulrnDr addrAC subrr add0r. (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n)) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.natmul M x (subn m n)) *) by rewrite subzn. Qed. Fact mulrzDl x : {morph *~%R x : m n / m + n}. Proof. (* Goal: @morphism_2 int (GRing.Zmodule.sort M) (@intmul M x) (fun m n : int => @GRing.add int_ZmodType m n) (fun m n : GRing.Zmodule.sort M => @GRing.add M m n) *) elim=> [|m _|m _]; elim=> [|n _|n _]; rewrite /intmul //=; rewrite -?(opprD) ?(add0r, addr0, mulrnDr, subn0) //. (* Goal: @eq (GRing.Zmodule.sort M) (@GRing.opp M (@GRing.natmul M x (S (S (addn m n))))) (@GRing.opp M (@GRing.add M (@GRing.natmul M x (S m)) (@GRing.natmul M x (S n)))) *) (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.add int_ZmodType (@GRing.opp int_ZmodType (Posz (S m))) (Posz (S n)) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.add M (@GRing.opp M (@GRing.natmul M x (S m))) (@GRing.natmul M x (S n))) *) (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.add int_ZmodType (Posz (S m)) (@GRing.opp int_ZmodType (Posz (S n))) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.add M (@GRing.natmul M x (S m)) (@GRing.opp M (@GRing.natmul M x (S n)))) *) * (* Goal: @eq (GRing.Zmodule.sort M) (@GRing.opp M (@GRing.natmul M x (S (S (addn m n))))) (@GRing.opp M (@GRing.add M (@GRing.natmul M x (S m)) (@GRing.natmul M x (S n)))) *) (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.add int_ZmodType (@GRing.opp int_ZmodType (Posz (S m))) (Posz (S n)) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.add M (@GRing.opp M (@GRing.natmul M x (S m))) (@GRing.natmul M x (S n))) *) (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.add int_ZmodType (Posz (S m)) (@GRing.opp int_ZmodType (Posz (S n))) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.add M (@GRing.natmul M x (S m)) (@GRing.opp M (@GRing.natmul M x (S n)))) *) by rewrite -/(intmul _ _) mulrzBl_nat. (* Goal: @eq (GRing.Zmodule.sort M) (@GRing.opp M (@GRing.natmul M x (S (S (addn m n))))) (@GRing.opp M (@GRing.add M (@GRing.natmul M x (S m)) (@GRing.natmul M x (S n)))) *) (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.add int_ZmodType (@GRing.opp int_ZmodType (Posz (S m))) (Posz (S n)) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.add M (@GRing.opp M (@GRing.natmul M x (S m))) (@GRing.natmul M x (S n))) *) * (* Goal: @eq (GRing.Zmodule.sort M) (@GRing.opp M (@GRing.natmul M x (S (S (addn m n))))) (@GRing.opp M (@GRing.add M (@GRing.natmul M x (S m)) (@GRing.natmul M x (S n)))) *) (* Goal: @eq (GRing.Zmodule.sort M) match @GRing.add int_ZmodType (@GRing.opp int_ZmodType (Posz (S m))) (Posz (S n)) with | Posz n => @GRing.natmul M x n | Negz n => @GRing.opp M (@GRing.natmul M x (S n)) end (@GRing.add M (@GRing.opp M (@GRing.natmul M x (S m))) (@GRing.natmul M x (S n))) *) by rewrite -/(intmul _ _) addrC mulrzBl_nat addrC. (* Goal: @eq (GRing.Zmodule.sort M) (@GRing.opp M (@GRing.natmul M x (S (S (addn m n))))) (@GRing.opp M (@GRing.add M (@GRing.natmul M x (S m)) (@GRing.natmul M x (S n)))) *) * (* Goal: @eq (GRing.Zmodule.sort M) (@GRing.opp M (@GRing.natmul M x (S (S (addn m n))))) (@GRing.opp M (@GRing.add M (@GRing.natmul M x (S m)) (@GRing.natmul M x (S n)))) *) by rewrite -addnS -addSn mulrnDr. Qed. Definition Mint_LmodMixin := @LmodMixin _ [zmodType of M] (fun n x => x *~ n) mulrzA_C mulr1z mulrzDr mulrzDl. Lemma mulrzA x m n : x *~ (m * n) = x *~ m *~ n. Proof. (* Goal: @eq (GRing.Zmodule.sort M) (@intmul M x (@GRing.mul int_Ring m n)) (@intmul M (@intmul M x m) n) *) by rewrite -!scalezrE scalerA mulrC. Qed. Lemma mul0rz n : 0 *~ n = 0 :> M. Proof. (* Goal: @eq (GRing.Zmodule.sort M) (@intmul M (GRing.zero M) n) (GRing.zero M) *) by rewrite -scalezrE scaler0. Qed. Lemma mulrNz x n : x *~ (- n) = - (x *~ n). Proof. (* Goal: @eq (GRing.Zmodule.sort M) (@intmul M x (@GRing.opp int_ZmodType n)) (@GRing.opp M (@intmul M x n)) *) by rewrite -scalezrE scaleNr. Qed. Lemma mulNrz x n : (- x) *~ n = - (x *~ n). Proof. (* Goal: @eq (GRing.Zmodule.sort M) (@intmul M (@GRing.opp M x) n) (@GRing.opp M (@intmul M x n)) *) by rewrite -scalezrE scalerN. Qed. Lemma mulrzBr x m n : x *~ (m - n) = x *~ m - x *~ n. Proof. (* Goal: @eq (GRing.Zmodule.sort M) (@intmul M x (@GRing.add int_ZmodType m (@GRing.opp int_ZmodType n))) (@GRing.add M (@intmul M x m) (@GRing.opp M (@intmul M x n))) *) by rewrite -scalezrE scalerBl. Qed. Lemma mulrzBl x y n : (x - y) *~ n = x *~ n - y *~ n. Proof. (* Goal: @eq (GRing.Zmodule.sort M) (@intmul M (@GRing.add M x (@GRing.opp M y)) n) (@GRing.add M (@intmul M x n) (@GRing.opp M (@intmul M y n))) *) by rewrite -scalezrE scalerBr. Qed. Lemma mulrz_nat (n : nat) x : x *~ n%:R = x *+ n. Proof. (* Goal: @eq (GRing.Zmodule.sort M) (@intmul M x (@GRing.natmul (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring) n)) (@GRing.natmul M x n) *) by rewrite -scalezrE scaler_nat. Qed. Lemma mulrz_sumr : forall x I r (P : pred I) F, x *~ (\sum_(i <- r | P i) F i) = \sum_(i <- r | P i) x *~ F i. Proof. (* Goal: forall (x : GRing.Zmodule.sort M) (I : Type) (r : list I) (P : pred I) (F : forall _ : I, GRing.Zmodule.sort int_ZmodType), @eq (GRing.Zmodule.sort M) (@intmul M x (@BigOp.bigop (GRing.Zmodule.sort int_ZmodType) I (GRing.zero int_ZmodType) r (fun i : I => @BigBody (GRing.Zmodule.sort int_ZmodType) I i (@GRing.add int_ZmodType) (P i) (F i)))) (@BigOp.bigop (GRing.Zmodule.sort M) I (GRing.zero M) r (fun i : I => @BigBody (GRing.Zmodule.sort M) I i (@GRing.add M) (P i) (@intmul M x (F i)))) *) by rewrite -/M^z; apply: scaler_suml. Qed. Lemma mulrz_suml : forall n I r (P : pred I) (F : I -> M), (\sum_(i <- r | P i) F i) *~ n= \sum_(i <- r | P i) F i *~ n. Proof. (* Goal: forall (n : int) (I : Type) (r : list I) (P : pred I) (F : forall _ : I, GRing.Zmodule.sort M), @eq (GRing.Zmodule.sort M) (@intmul M (@BigOp.bigop (GRing.Zmodule.sort M) I (GRing.zero M) r (fun i : I => @BigBody (GRing.Zmodule.sort M) I i (@GRing.add M) (P i) (F i))) n) (@BigOp.bigop (GRing.Zmodule.sort M) I (GRing.zero M) r (fun i : I => @BigBody (GRing.Zmodule.sort M) I i (@GRing.add M) (P i) (@intmul M (F i) n))) *) by rewrite -/M^z; apply: scaler_sumr. Qed. Canonical intmul_additive x := Additive (@mulrzBr x). End ZintLmod. Lemma ffunMzE (I : finType) (M : zmodType) (f : {ffun I -> M}) z x : (f *~ z) x = f x *~ z. Proof. (* Goal: @eq (GRing.Zmodule.sort M) (@FunFinfun.fun_of_fin I (GRing.Zmodule.sort M) (@intmul (ffun_zmodType I M) f z) x) (@intmul M (@FunFinfun.fun_of_fin I (GRing.Zmodule.sort M) f x) z) *) by case: z => n; rewrite ?ffunE ffunMnE. Qed. Lemma intz (n : int) : n%:~R = n. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType int_Ring)) (@intmul (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring) n) n *) elim: n=> //= n ihn; rewrite /intmul /=. (* Goal: @eq int (@GRing.opp (GRing.Ring.zmodType int_Ring) (@GRing.natmul (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring) (S n))) (@GRing.opp int_ZmodType (Posz (S n))) *) (* Goal: @eq int (@GRing.natmul (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring) (S n)) (Posz (S n)) *) by rewrite -addn1 mulrnDr /= PoszD -ihn. (* Goal: @eq int (@GRing.opp (GRing.Ring.zmodType int_Ring) (@GRing.natmul (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring) (S n))) (@GRing.opp int_ZmodType (Posz (S n))) *) by rewrite nmulrn intS opprD mulrzDl ihn. Qed. Lemma natz (n : nat) : n%:R = n%:Z :> int. Proof. (* Goal: @eq int (@GRing.natmul (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring) n) (Posz n) *) by rewrite pmulrn intz. Qed. Section RintMod. Local Coercion Posz : nat >-> int. Variable R : ringType. Implicit Types m n : int. Implicit Types x y z : R. Lemma mulrzAl n x y : (x *~ n) * y = (x * y) *~ n. Proof. (* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (@intmul (GRing.Ring.zmodType R) x n) y) (@intmul (GRing.Ring.zmodType R) (@GRing.mul R x y) n) *) by elim: n=> //= *; rewrite ?mul0r ?mulr0z // /intmul /= -mulrnAl -?mulNr. Qed. Lemma mulrzAr n x y : x * (y *~ n) = (x * y) *~ n. Proof. (* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R x (@intmul (GRing.Ring.zmodType R) y n)) (@intmul (GRing.Ring.zmodType R) (@GRing.mul R x y) n) *) by elim: n=> //= *; rewrite ?mulr0 ?mulr0z // /intmul /= -mulrnAr -?mulrN. Qed. Lemma mulrzl x n : n%:~R * x = x *~ n. Proof. (* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (@intmul (GRing.Ring.zmodType R) (GRing.one R) n) x) (@intmul (GRing.Ring.zmodType R) x n) *) by rewrite mulrzAl mul1r. Qed. Lemma mulrzr x n : x * n%:~R = x *~ n. Proof. (* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R x (@intmul (GRing.Ring.zmodType R) (GRing.one R) n)) (@intmul (GRing.Ring.zmodType R) x n) *) by rewrite mulrzAr mulr1. Qed. Lemma mulNrNz n x : (-x) *~ (-n) = x *~ n. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@intmul (GRing.Ring.zmodType R) (@GRing.opp (GRing.Ring.zmodType R) x) (@GRing.opp int_ZmodType n)) (@intmul (GRing.Ring.zmodType R) x n) *) by rewrite mulNrz mulrNz opprK. Qed. Lemma mulrbz x (b : bool) : x *~ b = (if b then x else 0). Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@intmul (GRing.Ring.zmodType R) x (Posz (nat_of_bool b))) (if b then x else GRing.zero (GRing.Ring.zmodType R)) *) by case: b. Qed. Lemma intrD m n : (m + n)%:~R = m%:~R + n%:~R :> R. Proof. (* Goal: @eq (GRing.Ring.sort R) (@intmul (GRing.Ring.zmodType R) (GRing.one R) (@GRing.add int_ZmodType m n)) (@GRing.add (GRing.Ring.zmodType R) (@intmul (GRing.Ring.zmodType R) (GRing.one R) m) (@intmul (GRing.Ring.zmodType R) (GRing.one R) n)) *) exact: mulrzDl. Qed. Lemma intrM m n : (m * n)%:~R = m%:~R * n%:~R :> R. Proof. (* Goal: @eq (GRing.Ring.sort R) (@intmul (GRing.Ring.zmodType R) (GRing.one R) (@GRing.mul int_Ring m n)) (@GRing.mul R (@intmul (GRing.Ring.zmodType R) (GRing.one R) m) (@intmul (GRing.Ring.zmodType R) (GRing.one R) n)) *) by rewrite mulrzA -mulrzr. Qed. Lemma intmul1_is_rmorphism : rmorphism ( *~%R (1 : R)). Proof. (* Goal: @GRing.RMorphism.class_of int_Ring R (@intmul (GRing.Ring.zmodType R) (GRing.one R : GRing.Ring.sort R)) *) by do ?split; move=> // x y /=; rewrite ?intrD ?mulrNz ?intrM. Qed. Canonical intmul1_rmorphism := RMorphism intmul1_is_rmorphism. Lemma mulr2z n : n *~ 2 = n + n. Proof. exact: mulr2n. Qed. Proof. (* Goal: @eq (GRing.Zmodule.sort int_ZmodType) (@intmul int_ZmodType n (Posz (S (S O)))) (@GRing.add int_ZmodType n n) *) exact: mulr2n. Qed. Lemma mulz2 n : n * 2%:Z = n + n. Proof. by rewrite -mulrzz. Qed. Proof. (* Goal: @eq (GRing.Ring.sort int_Ring) (@GRing.mul int_Ring n (Posz (S (S O)))) (@GRing.add (GRing.Ring.zmodType int_Ring) n n) *) by rewrite -mulrzz. Qed. Section LMod. Variable R : ringType. Variable V : (lmodType R). Local Coercion Posz : nat >-> int. Implicit Types m n : int. Implicit Types x y z : R. Implicit Types u v w : V. Lemma scaler_int n v : n%:~R *: v = v *~ n. Proof. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) V)))) (@GRing.scale R V (@intmul (GRing.Ring.zmodType R) (GRing.one R) n) v) (@intmul (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) V) v n) *) elim: n=> [|n ihn|n ihn]; first by rewrite scale0r. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) V)))) (@GRing.scale R V (@intmul (GRing.Ring.zmodType R) (GRing.one R) (@GRing.opp int_ZmodType (Posz (S n)))) v) (@intmul (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) V) v (@GRing.opp int_ZmodType (Posz (S n)))) *) (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) V)))) (@GRing.scale R V (@intmul (GRing.Ring.zmodType R) (GRing.one R) (Posz (S n))) v) (@intmul (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) V) v (Posz (S n))) *) by rewrite intS !mulrzDl scalerDl ihn scale1r. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) V)))) (@GRing.scale R V (@intmul (GRing.Ring.zmodType R) (GRing.one R) (@GRing.opp int_ZmodType (Posz (S n)))) v) (@intmul (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) V) v (@GRing.opp int_ZmodType (Posz (S n)))) *) by rewrite intS opprD !mulrzDl scalerDl ihn scaleN1r. Qed. Lemma scalerMzl a v n : (a *: v) *~ n = (a *~ n) *: v. Proof. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) V)))) (@intmul (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) V))) (@GRing.scale R V a v) n) (@GRing.scale R V (@intmul (GRing.Ring.zmodType R) a n) v) *) by rewrite -mulrzl -scaler_int scalerA. Qed. Lemma scalerMzr a v n : (a *: v) *~ n = a *: (v *~ n). Proof. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) V)))) (@intmul (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) V) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) V))) (@GRing.scale R V a v) n) (@GRing.scale R V a (@intmul (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) V) v n)) *) by rewrite -!scaler_int !scalerA mulrzr mulrzl. Qed. End LMod. Lemma mulrz_int (M : zmodType) (n : int) (x : M) : x *~ n%:~R = x *~ n. Proof. (* Goal: @eq (GRing.Zmodule.sort M) (@intmul M x (@intmul (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring) n)) (@intmul M x n) *) by rewrite -scalezrE scaler_int. Qed. Section MorphTheory. Local Coercion Posz : nat >-> int. Section Additive. Variables (U V : zmodType) (f : {additive U -> V}). Lemma raddfMz n : {morph f : x / x *~ n}. Proof. (* Goal: @morphism_1 (GRing.Zmodule.sort U) (GRing.Zmodule.sort V) (@GRing.Additive.apply U V (Phant (forall _ : GRing.Zmodule.sort U, GRing.Zmodule.sort V)) f) (fun x : GRing.Zmodule.sort U => @intmul U x n) (fun x : GRing.Zmodule.sort V => @intmul V x n) *) case: n=> n x /=; first exact: raddfMn. (* Goal: @eq (GRing.Zmodule.sort V) (@GRing.Additive.apply U V (Phant (forall _ : GRing.Zmodule.sort U, GRing.Zmodule.sort V)) f (@intmul U x (Negz n))) (@intmul V (@GRing.Additive.apply U V (Phant (forall _ : GRing.Zmodule.sort U, GRing.Zmodule.sort V)) f x) (Negz n)) *) by rewrite NegzE !mulrNz; apply: raddfMNn. Qed. Lemma rmorph_int : forall n, f n%:~R = n%:~R. Proof. (* Goal: forall n : int, @eq (GRing.Zmodule.sort (GRing.Ring.zmodType S)) (@GRing.RMorphism.apply R S (Phant (forall _ : GRing.Ring.sort R, GRing.Ring.sort S)) f (@intmul (GRing.Ring.zmodType R) (GRing.one R) n)) (@intmul (GRing.Ring.zmodType S) (GRing.one S) n) *) by move=> n; rewrite rmorphMz rmorph1. Qed. End Linear. Lemma raddf_int_scalable (aV rV : lmodType int) (f : {additive aV -> rV}) : scalable f. Proof. (* Goal: @GRing.Linear.mixin_of int_Ring aV (@GRing.Zmodule.Pack (@GRing.Lmodule.sort int_Ring (Phant (GRing.Ring.sort int_Ring)) rV) (@GRing.Lmodule.base int_Ring (@GRing.Lmodule.sort int_Ring (Phant (GRing.Ring.sort int_Ring)) rV) (@GRing.Lmodule.class int_Ring (Phant (GRing.Ring.sort int_Ring)) rV))) (@GRing.scale int_Ring rV) (@GRing.Additive.apply (@GRing.Lmodule.zmodType int_Ring (Phant int) aV) (@GRing.Lmodule.zmodType int_Ring (Phant int) rV) (Phant (forall _ : @GRing.Lmodule.sort int_Ring (Phant int) aV, @GRing.Lmodule.sort int_Ring (Phant int) rV)) f) *) by move=> z u; rewrite -[z]intz !scaler_int raddfMz. Qed. Section Zintmul1rMorph. Variable R : ringType. Lemma commrMz (x y : R) n : GRing.comm x y -> GRing.comm x (y *~ n). Proof. (* Goal: forall _ : @GRing.comm R x y, @GRing.comm R x (@intmul (GRing.Ring.zmodType R) y n) *) by rewrite /GRing.comm=> com_xy; rewrite mulrzAr mulrzAl com_xy. Qed. Lemma commr_int (x : R) n : GRing.comm x n%:~R. Proof. (* Goal: @GRing.comm R x (@intmul (GRing.Ring.zmodType R) (GRing.one R) n) *) by apply: commrMz; apply: commr1. Qed. End Zintmul1rMorph. Section ZintBigMorphism. Variable R : ringType. Lemma sumMz : forall I r (P : pred I) F, (\sum_(i <- r | P i) F i)%N%:~R = \sum_(i <- r | P i) ((F i)%:~R) :> R. Proof. (* Goal: forall (I : Type) (r : list I) (P : pred I) (F : forall _ : I, nat), @eq (GRing.Ring.sort R) (@intmul (GRing.Ring.zmodType R) (GRing.one R) (Posz (@BigOp.bigop nat I O r (fun i : I => @BigBody nat I i addn (P i) (F i))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) I (GRing.zero (GRing.Ring.zmodType R)) r (fun i : I => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) I i (@GRing.add (GRing.Ring.zmodType R)) (P i) (@intmul (GRing.Ring.zmodType R) (GRing.one R) (Posz (F i))))) *) by apply: big_morph=> // x y; rewrite !pmulrn -rmorphD. Qed. Lemma prodMz : forall I r (P : pred I) F, (\prod_(i <- r | P i) F i)%N%:~R = \prod_(i <- r | P i) ((F i)%:~R) :> R. Proof. (* Goal: forall (I : Type) (r : list I) (P : pred I) (F : forall _ : I, nat), @eq (GRing.Ring.sort R) (@intmul (GRing.Ring.zmodType R) (GRing.one R) (Posz (@BigOp.bigop nat I (S O) r (fun i : I => @BigBody nat I i muln (P i) (F i))))) (@BigOp.bigop (GRing.Ring.sort R) I (GRing.one R) r (fun i : I => @BigBody (GRing.Ring.sort R) I i (@GRing.mul R) (P i) (@intmul (GRing.Ring.zmodType R) (GRing.one R) (Posz (F i))))) *) by apply: big_morph=> // x y; rewrite !pmulrn PoszM -rmorphM. Qed. End ZintBigMorphism. Section Frobenius. Variable R : ringType. Implicit Types x y : R. Variable p : nat. Hypothesis charFp : p \in [char R]. Local Notation "x ^f" := (Frobenius_aut charFp x). Lemma Frobenius_autMz x n : (x *~ n)^f = x^f *~ n. Proof. (* Goal: @eq (GRing.Ring.sort R) (@GRing.Frobenius_aut R p charFp (@intmul (GRing.Ring.zmodType R) x n)) (@intmul (GRing.Ring.zmodType R) (@GRing.Frobenius_aut R p charFp x) n) *) case: n=> n /=; first exact: Frobenius_autMn. (* Goal: @eq (GRing.Ring.sort R) (@GRing.Frobenius_aut R p charFp (@intmul (GRing.Ring.zmodType R) x (Negz n))) (@intmul (GRing.Ring.zmodType R) (@GRing.Frobenius_aut R p charFp x) (Negz n)) *) by rewrite !NegzE !mulrNz Frobenius_autN Frobenius_autMn. Qed. Lemma Frobenius_aut_int n : (n%:~R)^f = n%:~R. Proof. (* Goal: @eq (GRing.Ring.sort R) (@GRing.Frobenius_aut R p charFp (@intmul (GRing.Ring.zmodType R) (GRing.one R) n)) (@intmul (GRing.Ring.zmodType R) (GRing.one R) n) *) by rewrite Frobenius_autMz Frobenius_aut1. Qed. End Frobenius. Section NumMorphism. Section PO. Variables (R : numDomainType). Implicit Types n m : int. Implicit Types x y : R. Lemma rmorphzP (f : {rmorphism int -> R}) : f =1 ( *~%R 1). Proof. (* Goal: @eqfun (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.NumDomain.ringType R))) (GRing.Zmodule.sort (GRing.Ring.zmodType int_Ring)) (@GRing.RMorphism.apply int_Ring (Num.NumDomain.ringType R) (Phant (forall _ : int, Num.NumDomain.sort R)) f) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R))) *) move=> n; wlog : n / 0 <= n; case: n=> [] n //; do ?exact. (* Goal: forall _ : is_true (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) (Posz n)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.NumDomain.ringType R))) (@GRing.RMorphism.apply int_Ring (Num.NumDomain.ringType R) (Phant (forall _ : int, Num.NumDomain.sort R)) f (Posz n)) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) (Posz n)) *) (* Goal: forall _ : forall (n : GRing.Zmodule.sort (GRing.Ring.zmodType int_Ring)) (_ : is_true (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) n)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.NumDomain.ringType R))) (@GRing.RMorphism.apply int_Ring (Num.NumDomain.ringType R) (Phant (forall _ : int, Num.NumDomain.sort R)) f n) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.NumDomain.ringType R))) (@GRing.RMorphism.apply int_Ring (Num.NumDomain.ringType R) (Phant (forall _ : int, Num.NumDomain.sort R)) f (Negz n)) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) (Negz n)) *) by rewrite NegzE !rmorphN=>->. (* Goal: forall _ : is_true (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) (Posz n)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.NumDomain.ringType R))) (@GRing.RMorphism.apply int_Ring (Num.NumDomain.ringType R) (Phant (forall _ : int, Num.NumDomain.sort R)) f (Posz n)) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) (Posz n)) *) move=> _; elim: n=> [|n ihn]; first by rewrite rmorph0. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.NumDomain.ringType R))) (@GRing.RMorphism.apply int_Ring (Num.NumDomain.ringType R) (Phant (forall _ : int, Num.NumDomain.sort R)) f (Posz (S n))) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) (Posz (S n))) *) by rewrite intS !rmorphD !rmorph1 ihn. Qed. Lemma ler_pmulz2r n (hn : 0 < n) : {mono *~%R^~ n :x y / x <= y :> R}. Proof. (* Goal: @monomorphism_2 (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) bool (fun x : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @intmul (Num.NumDomain.zmodType R) x n) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @Num.Def.ler R (x : Num.NumDomain.sort R) (y : Num.NumDomain.sort R)) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @Num.Def.ler R (x : Num.NumDomain.sort R) (y : Num.NumDomain.sort R)) *) by move=> x y; case: n hn=> [[]|] // n _; rewrite ler_pmuln2r. Qed. Lemma ltr_pmulz2r n (hn : 0 < n) : {mono *~%R^~ n : x y / x < y :> R}. Proof. (* Goal: @monomorphism_2 (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) bool (fun x : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @intmul (Num.NumDomain.zmodType R) x n) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @Num.Def.ltr R (x : Num.NumDomain.sort R) (y : Num.NumDomain.sort R)) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @Num.Def.ltr R (x : Num.NumDomain.sort R) (y : Num.NumDomain.sort R)) *) exact: lerW_mono (ler_pmulz2r _). Qed. Lemma ler_nmulz2r n (hn : n < 0) : {mono *~%R^~ n : x y /~ x <= y :> R}. Proof. (* Goal: @monomorphism_2 (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) bool (fun x : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @intmul (Num.NumDomain.zmodType R) x n) (fun y x : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @Num.Def.ler R (x : Num.NumDomain.sort R) (y : Num.NumDomain.sort R)) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @Num.Def.ler R (x : Num.NumDomain.sort R) (y : Num.NumDomain.sort R)) *) move=> x y /=; rewrite -![_ *~ n]mulNrNz. (* Goal: @eq bool (@Num.Def.ler R (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (@GRing.opp (GRing.Ring.zmodType (Num.NumDomain.ringType R)) x) (@GRing.opp int_ZmodType n)) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (@GRing.opp (GRing.Ring.zmodType (Num.NumDomain.ringType R)) y) (@GRing.opp int_ZmodType n))) (@Num.Def.ler R y x) *) by rewrite ler_pmulz2r (oppr_cp0, ler_opp2). Qed. Lemma ltr_nmulz2r n (hn : n < 0) : {mono *~%R^~ n : x y /~ x < y :> R}. Proof. (* Goal: @monomorphism_2 (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) bool (fun x : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @intmul (Num.NumDomain.zmodType R) x n) (fun y x : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @Num.Def.ltr R (x : Num.NumDomain.sort R) (y : Num.NumDomain.sort R)) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @Num.Def.ltr R (x : Num.NumDomain.sort R) (y : Num.NumDomain.sort R)) *) exact: lerW_nmono (ler_nmulz2r _). Qed. Lemma ler_wpmulz2r n (hn : 0 <= n) : {homo *~%R^~ n : x y / x <= y :> R}. Proof. (* Goal: @homomorphism_2 (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (fun x : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @intmul (Num.NumDomain.zmodType R) x n) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => is_true (@Num.Def.ler R (x : Num.NumDomain.sort R) (y : Num.NumDomain.sort R))) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => is_true (@Num.Def.ler R (x : Num.NumDomain.sort R) (y : Num.NumDomain.sort R))) *) by move=> x y xy; case: n hn=> [] // n _; rewrite ler_wmuln2r. Qed. Lemma ler_wnmulz2r n (hn : n <= 0) : {homo *~%R^~ n : x y /~ x <= y :> R}. Proof. (* Goal: @homomorphism_2 (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (fun x : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @intmul (Num.NumDomain.zmodType R) x n) (fun y x : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => is_true (@Num.Def.ler R (x : Num.NumDomain.sort R) (y : Num.NumDomain.sort R))) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => is_true (@Num.Def.ler R (x : Num.NumDomain.sort R) (y : Num.NumDomain.sort R))) *) by move=> x y xy /=; rewrite -ler_opp2 -!mulrNz ler_wpmulz2r // oppr_ge0. Qed. Lemma mulrz_ge0 x n (x0 : 0 <= x) (n0 : 0 <= n) : 0 <= x *~ n. Proof. (* Goal: is_true (@Num.Def.ler R (GRing.zero (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x n)) *) by rewrite -(mul0rz _ n) ler_wpmulz2r. Qed. Lemma mulrz_le0 x n (x0 : x <= 0) (n0 : n <= 0) : 0 <= x *~ n. Proof. (* Goal: is_true (@Num.Def.ler R (GRing.zero (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x n)) *) by rewrite -(mul0rz _ n) ler_wnmulz2r. Qed. Lemma mulrz_ge0_le0 x n (x0 : 0 <= x) (n0 : n <= 0) : x *~ n <= 0. Proof. (* Goal: is_true (@Num.Def.ler R (@intmul (Num.NumDomain.zmodType R) x n) (GRing.zero (Num.NumDomain.zmodType R))) *) by rewrite -(mul0rz _ n) ler_wnmulz2r. Qed. Lemma mulrz_le0_ge0 x n (x0 : x <= 0) (n0 : 0 <= n) : x *~ n <= 0. Proof. (* Goal: is_true (@Num.Def.ler R (@intmul (Num.NumDomain.zmodType R) x n) (GRing.zero (Num.NumDomain.zmodType R))) *) by rewrite -(mul0rz _ n) ler_wpmulz2r. Qed. Lemma pmulrz_lgt0 x n (n0 : 0 < n) : 0 < x *~ n = (0 < x). Proof. (* Goal: @eq bool (@Num.Def.ltr R (GRing.zero (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x n)) (@Num.Def.ltr R (GRing.zero (Num.NumDomain.zmodType R)) x) *) by rewrite -(mul0rz _ n) ltr_pmulz2r // mul0rz. Qed. Lemma nmulrz_lgt0 x n (n0 : n < 0) : 0 < x *~ n = (x < 0). Proof. (* Goal: @eq bool (@Num.Def.ltr R (GRing.zero (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x n)) (@Num.Def.ltr R x (GRing.zero (Num.NumDomain.zmodType R))) *) by rewrite -(mul0rz _ n) ltr_nmulz2r // mul0rz. Qed. Lemma pmulrz_llt0 x n (n0 : 0 < n) : x *~ n < 0 = (x < 0). Proof. (* Goal: @eq bool (@Num.Def.ltr R (@intmul (Num.NumDomain.zmodType R) x n) (GRing.zero (Num.NumDomain.zmodType R))) (@Num.Def.ltr R x (GRing.zero (Num.NumDomain.zmodType R))) *) by rewrite -(mul0rz _ n) ltr_pmulz2r // mul0rz. Qed. Lemma nmulrz_llt0 x n (n0 : n < 0) : x *~ n < 0 = (0 < x). Proof. (* Goal: @eq bool (@Num.Def.ltr R (@intmul (Num.NumDomain.zmodType R) x n) (GRing.zero (Num.NumDomain.zmodType R))) (@Num.Def.ltr R (GRing.zero (Num.NumDomain.zmodType R)) x) *) by rewrite -(mul0rz _ n) ltr_nmulz2r // mul0rz. Qed. Lemma pmulrz_lge0 x n (n0 : 0 < n) : 0 <= x *~ n = (0 <= x). Proof. (* Goal: @eq bool (@Num.Def.ler R (GRing.zero (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x n)) (@Num.Def.ler R (GRing.zero (Num.NumDomain.zmodType R)) x) *) by rewrite -(mul0rz _ n) ler_pmulz2r // mul0rz. Qed. Lemma nmulrz_lge0 x n (n0 : n < 0) : 0 <= x *~ n = (x <= 0). Proof. (* Goal: @eq bool (@Num.Def.ler R (GRing.zero (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x n)) (@Num.Def.ler R x (GRing.zero (Num.NumDomain.zmodType R))) *) by rewrite -(mul0rz _ n) ler_nmulz2r // mul0rz. Qed. Lemma pmulrz_lle0 x n (n0 : 0 < n) : x *~ n <= 0 = (x <= 0). Proof. (* Goal: @eq bool (@Num.Def.ler R (@intmul (Num.NumDomain.zmodType R) x n) (GRing.zero (Num.NumDomain.zmodType R))) (@Num.Def.ler R x (GRing.zero (Num.NumDomain.zmodType R))) *) by rewrite -(mul0rz _ n) ler_pmulz2r // mul0rz. Qed. Lemma nmulrz_lle0 x n (n0 : n < 0) : x *~ n <= 0 = (0 <= x). Proof. (* Goal: @eq bool (@Num.Def.ler R (@intmul (Num.NumDomain.zmodType R) x n) (GRing.zero (Num.NumDomain.zmodType R))) (@Num.Def.ler R (GRing.zero (Num.NumDomain.zmodType R)) x) *) by rewrite -(mul0rz _ n) ler_nmulz2r // mul0rz. Qed. Lemma ler_wpmulz2l x (hx : 0 <= x) : {homo *~%R x : x y / x <= y}. Proof. (* Goal: @homomorphism_2 int (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x) (fun x y : int => is_true (@Num.Def.ler int_numDomainType x y)) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => is_true (@Num.Def.ler R x y)) *) by move=> m n /= hmn; rewrite -subr_ge0 -mulrzBr mulrz_ge0 // subr_ge0. Qed. Lemma ler_wnmulz2l x (hx : x <= 0) : {homo *~%R x : x y /~ x <= y}. Proof. (* Goal: @homomorphism_2 int (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x) (fun y x : int => is_true (@Num.Def.ler int_numDomainType x y)) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => is_true (@Num.Def.ler R x y)) *) by move=> m n /= hmn; rewrite -subr_ge0 -mulrzBr mulrz_le0 // subr_le0. Qed. Lemma ler_pmulz2l x (hx : 0 < x) : {mono *~%R x : x y / x <= y}. Proof. (* Goal: @monomorphism_2 int (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) bool (@intmul (Num.NumDomain.zmodType R) x) (fun x y : int => @Num.Def.ler int_numDomainType x y) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @Num.Def.ler R x y) *) move=> m n /=; rewrite real_mono ?num_real // => {m n}. (* Goal: @homomorphism_2 (Num.NumDomain.sort int_numDomainType) (Num.NumDomain.sort R) (@intmul (Num.NumDomain.zmodType R) x) (fun x y : Num.NumDomain.sort int_numDomainType => is_true (@Num.Def.ltr int_numDomainType x y)) (fun x y : Num.NumDomain.sort R => is_true (@Num.Def.ltr R x y)) *) by move=> m n /= hmn; rewrite -subr_gt0 -mulrzBr pmulrz_lgt0 // subr_gt0. Qed. Lemma ler_nmulz2l x (hx : x < 0) : {mono *~%R x : x y /~ x <= y}. Lemma ltr_pmulz2l x (hx : 0 < x) : {mono *~%R x : x y / x < y}. Proof. (* Goal: @monomorphism_2 int (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) bool (@intmul (Num.NumDomain.zmodType R) x) (fun x y : int => @Num.Def.ltr int_numDomainType x y) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @Num.Def.ltr R x y) *) exact: lerW_mono (ler_pmulz2l _). Qed. Lemma ltr_nmulz2l x (hx : x < 0) : {mono *~%R x : x y /~ x < y}. Proof. (* Goal: @monomorphism_2 int (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) bool (@intmul (Num.NumDomain.zmodType R) x) (fun y x : int => @Num.Def.ltr int_numDomainType x y) (fun x y : GRing.Zmodule.sort (Num.NumDomain.zmodType R) => @Num.Def.ltr R x y) *) exact: lerW_nmono (ler_nmulz2l _). Qed. Lemma pmulrz_rgt0 x n (x0 : 0 < x) : 0 < x *~ n = (0 < n). Proof. (* Goal: @eq bool (@Num.Def.ltr R (GRing.zero (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x n)) (@Num.Def.ltr int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) n) *) by rewrite -(mulr0z x) ltr_pmulz2l. Qed. Lemma nmulrz_rgt0 x n (x0 : x < 0) : 0 < x *~ n = (n < 0). Proof. (* Goal: @eq bool (@Num.Def.ltr R (GRing.zero (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x n)) (@Num.Def.ltr int_numDomainType n (GRing.zero (Num.NumDomain.zmodType int_numDomainType))) *) by rewrite -(mulr0z x) ltr_nmulz2l. Qed. Lemma pmulrz_rlt0 x n (x0 : 0 < x) : x *~ n < 0 = (n < 0). Proof. (* Goal: @eq bool (@Num.Def.ltr R (@intmul (Num.NumDomain.zmodType R) x n) (GRing.zero (Num.NumDomain.zmodType R))) (@Num.Def.ltr int_numDomainType n (GRing.zero (Num.NumDomain.zmodType int_numDomainType))) *) by rewrite -(mulr0z x) ltr_pmulz2l. Qed. Lemma nmulrz_rlt0 x n (x0 : x < 0) : x *~ n < 0 = (0 < n). Proof. (* Goal: @eq bool (@Num.Def.ltr R (@intmul (Num.NumDomain.zmodType R) x n) (GRing.zero (Num.NumDomain.zmodType R))) (@Num.Def.ltr int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) n) *) by rewrite -(mulr0z x) ltr_nmulz2l. Qed. Lemma pmulrz_rge0 x n (x0 : 0 < x) : 0 <= x *~ n = (0 <= n). Proof. (* Goal: @eq bool (@Num.Def.ler R (GRing.zero (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x n)) (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) n) *) by rewrite -(mulr0z x) ler_pmulz2l. Qed. Lemma nmulrz_rge0 x n (x0 : x < 0) : 0 <= x *~ n = (n <= 0). Proof. (* Goal: @eq bool (@Num.Def.ler R (GRing.zero (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x n)) (@Num.Def.ler int_numDomainType n (GRing.zero (Num.NumDomain.zmodType int_numDomainType))) *) by rewrite -(mulr0z x) ler_nmulz2l. Qed. Lemma pmulrz_rle0 x n (x0 : 0 < x) : x *~ n <= 0 = (n <= 0). Proof. (* Goal: @eq bool (@Num.Def.ler R (@intmul (Num.NumDomain.zmodType R) x n) (GRing.zero (Num.NumDomain.zmodType R))) (@Num.Def.ler int_numDomainType n (GRing.zero (Num.NumDomain.zmodType int_numDomainType))) *) by rewrite -(mulr0z x) ler_pmulz2l. Qed. Lemma nmulrz_rle0 x n (x0 : x < 0) : x *~ n <= 0 = (0 <= n). Proof. (* Goal: @eq bool (@Num.Def.ler R (@intmul (Num.NumDomain.zmodType R) x n) (GRing.zero (Num.NumDomain.zmodType R))) (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) n) *) by rewrite -(mulr0z x) ler_nmulz2l. Qed. Lemma mulrIz x (hx : x != 0) : injective ( *~%R x). Proof. (* Goal: @injective (GRing.Zmodule.sort (Num.NumDomain.zmodType R)) int (@intmul (Num.NumDomain.zmodType R) x) *) move=> y z; rewrite -![x *~ _]mulrzr => /(mulfI hx). (* Goal: forall _ : @eq (GRing.Ring.sort (GRing.IntegralDomain.ringType (Num.NumDomain.idomainType R))) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) y) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) z), @eq int y z *) by apply: incr_inj y z; apply: ler_pmulz2l. Qed. Lemma ler_int m n : (m%:~R <= n%:~R :> R) = (m <= n). Proof. (* Goal: @eq bool (@Num.Def.ler R (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) m : Num.NumDomain.sort R) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n : Num.NumDomain.sort R)) (@Num.Def.ler int_numDomainType m n) *) by rewrite ler_pmulz2l. Qed. Lemma ltr_int m n : (m%:~R < n%:~R :> R) = (m < n). Proof. (* Goal: @eq bool (@Num.Def.ltr R (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) m : Num.NumDomain.sort R) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n : Num.NumDomain.sort R)) (@Num.Def.ltr int_numDomainType m n) *) by rewrite ltr_pmulz2l. Qed. Lemma eqr_int m n : (m%:~R == n%:~R :> R) = (m == n). Proof. (* Goal: @eq bool (@eq_op (Num.NumDomain.eqType R) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) m : Num.NumDomain.sort R) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n : Num.NumDomain.sort R)) (@eq_op int_eqType m n) *) by rewrite (inj_eq (mulrIz _)) ?oner_eq0. Qed. Lemma ler0z n : (0 <= n%:~R :> R) = (0 <= n). Proof. (* Goal: @eq bool (@Num.Def.ler R (GRing.zero (Num.NumDomain.zmodType R) : Num.NumDomain.sort R) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n : Num.NumDomain.sort R)) (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) n) *) by rewrite pmulrz_rge0. Qed. Lemma ltr0z n : (0 < n%:~R :> R) = (0 < n). Proof. (* Goal: @eq bool (@Num.Def.ltr R (GRing.zero (Num.NumDomain.zmodType R) : Num.NumDomain.sort R) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n : Num.NumDomain.sort R)) (@Num.Def.ltr int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) n) *) by rewrite pmulrz_rgt0. Qed. Lemma lerz0 n : (n%:~R <= 0 :> R) = (n <= 0). Proof. (* Goal: @eq bool (@Num.Def.ler R (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n : Num.NumDomain.sort R) (GRing.zero (Num.NumDomain.zmodType R) : Num.NumDomain.sort R)) (@Num.Def.ler int_numDomainType n (GRing.zero (Num.NumDomain.zmodType int_numDomainType))) *) by rewrite pmulrz_rle0. Qed. Lemma ltrz0 n : (n%:~R < 0 :> R) = (n < 0). Proof. (* Goal: @eq bool (@Num.Def.ltr R (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n : Num.NumDomain.sort R) (GRing.zero (Num.NumDomain.zmodType R) : Num.NumDomain.sort R)) (@Num.Def.ltr int_numDomainType n (GRing.zero (Num.NumDomain.zmodType int_numDomainType))) *) by rewrite pmulrz_rlt0. Qed. Lemma ler1z (n : int) : (1 <= n%:~R :> R) = (1 <= n). Proof. (* Goal: @eq bool (@Num.Def.ler R (GRing.one (Num.NumDomain.ringType R) : Num.NumDomain.sort R) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n : Num.NumDomain.sort R)) (@Num.Def.ler int_numDomainType (GRing.one (Num.NumDomain.ringType int_numDomainType)) n) *) by rewrite -[1]/(1%:~R) ler_int. Qed. Lemma ltr1z (n : int) : (1 < n%:~R :> R) = (1 < n). Proof. (* Goal: @eq bool (@Num.Def.ltr R (GRing.one (Num.NumDomain.ringType R) : Num.NumDomain.sort R) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n : Num.NumDomain.sort R)) (@Num.Def.ltr int_numDomainType (GRing.one (Num.NumDomain.ringType int_numDomainType)) n) *) by rewrite -[1]/(1%:~R) ltr_int. Qed. Lemma lerz1 n : (n%:~R <= 1 :> R) = (n <= 1). Proof. (* Goal: @eq bool (@Num.Def.ler R (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n : Num.NumDomain.sort R) (GRing.one (Num.NumDomain.ringType R) : Num.NumDomain.sort R)) (@Num.Def.ler int_numDomainType n (GRing.one (Num.NumDomain.ringType int_numDomainType))) *) by rewrite -[1]/(1%:~R) ler_int. Qed. Lemma ltrz1 n : (n%:~R < 1 :> R) = (n < 1). Proof. (* Goal: @eq bool (@Num.Def.ltr R (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n : Num.NumDomain.sort R) (GRing.one (Num.NumDomain.ringType R) : Num.NumDomain.sort R)) (@Num.Def.ltr int_numDomainType n (GRing.one (Num.NumDomain.ringType int_numDomainType))) *) by rewrite -[1]/(1%:~R) ltr_int. Qed. Lemma intr_eq0 n : (n%:~R == 0 :> R) = (n == 0). Proof. (* Goal: @eq bool (@eq_op (Num.NumDomain.eqType R) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n : Num.NumDomain.sort R) (GRing.zero (Num.NumDomain.zmodType R) : Num.NumDomain.sort R)) (@eq_op int_eqType n (GRing.zero int_ZmodType)) *) by rewrite -(mulr0z 1) (inj_eq (mulrIz _)) // oner_eq0. Qed. Lemma mulrz_eq0 x n : (x *~ n == 0) = ((n == 0) || (x == 0)). Proof. (* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x n) (GRing.zero (Num.NumDomain.zmodType R))) (orb (@eq_op int_eqType n (GRing.zero int_ZmodType)) (@eq_op (Num.NumDomain.eqType R) x (GRing.zero (Num.NumDomain.zmodType R)))) *) by rewrite -mulrzl mulf_eq0 intr_eq0. Qed. Lemma mulrz_neq0 x n : x *~ n != 0 = ((n != 0) && (x != 0)). Proof. (* Goal: @eq bool (negb (@eq_op (GRing.Zmodule.eqType (Num.NumDomain.zmodType R)) (@intmul (Num.NumDomain.zmodType R) x n) (GRing.zero (Num.NumDomain.zmodType R)))) (andb (negb (@eq_op int_eqType n (GRing.zero int_ZmodType))) (negb (@eq_op (Num.NumDomain.eqType R) x (GRing.zero (Num.NumDomain.zmodType R))))) *) by rewrite mulrz_eq0 negb_or. Qed. Lemma realz n : (n%:~R : R) \in Num.real. Proof. (* Goal: is_true (@in_mem (Num.NumDomain.sort R) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) n : Num.NumDomain.sort R) (@mem (Num.NumDomain.sort R) (predPredType (Num.NumDomain.sort R)) (@has_quality O (Num.NumDomain.sort R) (@Num.Def.Rreal R)))) *) by rewrite -topredE /Num.real /= ler0z lerz0 ler_total. Qed. Hint Resolve realz : core. Definition intr_inj := @mulrIz 1 (oner_neq0 R). End PO. End NumMorphism. End MorphTheory. Arguments intr_inj {R} [x1 x2]. Definition exprz (R : unitRingType) (x : R) (n : int) := nosimpl match n with | Posz n => x ^+ n | Negz n => x ^- (n.+1) Lemma exprnN x (n : nat) : x ^- n = x ^ -n%:Z. Proof. (* Goal: @eq (GRing.UnitRing.sort R) (@GRing.inv R (@GRing.exp (GRing.UnitRing.ringType R) x n)) (@exprz R x (@GRing.opp int_ZmodType (Posz n))) *) by case: n=> //; rewrite oppr0 expr0 invr1. Qed. Lemma expr1z x : x ^ 1 = x. Proof. by []. Qed. Proof. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (GRing.one int_Ring)) x *) by []. Qed. Lemma invr_expz x n : (x ^ n)^-1 = x ^ (- n). Proof. (* Goal: @eq (GRing.UnitRing.sort R) (@GRing.inv R (@exprz R x n)) (@exprz R x (@GRing.opp int_ZmodType n)) *) by case: (intP n)=> // [|m]; rewrite ?opprK ?expr0z ?invr1 // invrK. Qed. Lemma exprz_inv x n : (x^-1) ^ n = x ^ (- n). Proof. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@GRing.inv R x) n) (@exprz R x (@GRing.opp int_ZmodType n)) *) by case: (intP n)=> // m; rewrite -[_ ^ (- _)]exprVn ?opprK ?invrK. Qed. Lemma exp1rz n : 1 ^ n = 1 :> R. Proof. (* Goal: @eq (GRing.UnitRing.sort R) (@exprz R (GRing.one (GRing.UnitRing.ringType R)) n) (GRing.one (GRing.UnitRing.ringType R)) *) by case: (intP n)=> // m; rewrite -?exprz_inv ?invr1; apply: expr1n. Qed. Lemma exprSzr x (n : nat) : x ^ n.+1 = x ^ n * x. Proof. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (Posz (S n))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (Posz n)) x) *) exact: exprSr. Qed. Fact exprzD_nat x (m n : nat) : x ^ (m%:Z + n) = x ^ m * x ^ n. Proof. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.add int_ZmodType (Posz m) (Posz n))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (Posz m)) (@exprz R x (Posz n))) *) exact: exprD. Qed. Fact exprzD_Nnat x (m n : nat) : x ^ (-m%:Z + -n%:Z) = x ^ (-m%:Z) * x ^ (-n%:Z). Proof. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.add int_ZmodType (@GRing.opp int_ZmodType (Posz m)) (@GRing.opp int_ZmodType (Posz n)))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (@GRing.opp int_ZmodType (Posz m))) (@exprz R x (@GRing.opp int_ZmodType (Posz n)))) *) by rewrite -opprD -!exprz_inv exprzD_nat. Qed. Lemma exprzD_ss x m n : (0 <= m) && (0 <= n) || (m <= 0) && (n <= 0) -> x ^ (m + n) = x ^ m * x ^ n. Proof. (* Goal: forall _ : is_true (orb (andb (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) m) (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) n)) (andb (@Num.Def.ler int_numDomainType m (GRing.zero (Num.NumDomain.zmodType int_numDomainType))) (@Num.Def.ler int_numDomainType n (GRing.zero (Num.NumDomain.zmodType int_numDomainType))))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.add int_ZmodType m n)) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x m) (@exprz R x n)) *) case: (intP m)=> {m} [|m|m]; case: (intP n)=> {n} [|n|n] //= _; by rewrite ?expr0z ?mul1r ?exprzD_nat ?exprzD_Nnat ?sub0r ?addr0 ?mulr1. Qed. Lemma exp0rz n : 0 ^ n = (n == 0)%:~R :> R. Proof. (* Goal: @eq (GRing.UnitRing.sort R) (@exprz R (GRing.zero (GRing.UnitRing.zmodType R)) n) (@intmul (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) (GRing.one (GRing.UnitRing.ringType R)) (Posz (nat_of_bool (@eq_op int_eqType n (GRing.zero int_ZmodType))))) *) by case: (intP n)=> // m; rewrite -?exprz_inv ?invr0 exprSz mul0r. Qed. Lemma commrXz x y n : GRing.comm x y -> GRing.comm x (y ^ n). Proof. (* Goal: forall _ : @GRing.comm (GRing.UnitRing.ringType R) x y, @GRing.comm (GRing.UnitRing.ringType R) x (@exprz R y n) *) rewrite /GRing.comm; elim: n x y=> [|n ihn|n ihn] x y com_xy //=. (* Goal: @eq (GRing.UnitRing.sort R) (@GRing.mul (GRing.UnitRing.ringType R) x (@exprz R y (@GRing.opp int_ZmodType (Posz (S n))))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R y (@GRing.opp int_ZmodType (Posz (S n)))) x) *) (* Goal: @eq (GRing.UnitRing.sort R) (@GRing.mul (GRing.UnitRing.ringType R) x (@exprz R y (Posz (S n)))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R y (Posz (S n))) x) *) (* Goal: @eq (GRing.UnitRing.sort R) (@GRing.mul (GRing.UnitRing.ringType R) x (@exprz R y (GRing.zero int_ZmodType))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R y (GRing.zero int_ZmodType)) x) *) * (* Goal: @eq (GRing.UnitRing.sort R) (@GRing.mul (GRing.UnitRing.ringType R) x (@exprz R y (@GRing.opp int_ZmodType (Posz (S n))))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R y (@GRing.opp int_ZmodType (Posz (S n)))) x) *) (* Goal: @eq (GRing.UnitRing.sort R) (@GRing.mul (GRing.UnitRing.ringType R) x (@exprz R y (Posz (S n)))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R y (Posz (S n))) x) *) (* Goal: @eq (GRing.UnitRing.sort R) (@GRing.mul (GRing.UnitRing.ringType R) x (@exprz R y (GRing.zero int_ZmodType))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R y (GRing.zero int_ZmodType)) x) *) by rewrite expr0z mul1r mulr1. (* Goal: @eq (GRing.UnitRing.sort R) (@GRing.mul (GRing.UnitRing.ringType R) x (@exprz R y (@GRing.opp int_ZmodType (Posz (S n))))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R y (@GRing.opp int_ZmodType (Posz (S n)))) x) *) (* Goal: @eq (GRing.UnitRing.sort R) (@GRing.mul (GRing.UnitRing.ringType R) x (@exprz R y (Posz (S n)))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R y (Posz (S n))) x) *) * (* Goal: @eq (GRing.UnitRing.sort R) (@GRing.mul (GRing.UnitRing.ringType R) x (@exprz R y (@GRing.opp int_ZmodType (Posz (S n))))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R y (@GRing.opp int_ZmodType (Posz (S n)))) x) *) (* Goal: @eq (GRing.UnitRing.sort R) (@GRing.mul (GRing.UnitRing.ringType R) x (@exprz R y (Posz (S n)))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R y (Posz (S n))) x) *) by rewrite -exprnP commrX //. (* Goal: @eq (GRing.UnitRing.sort R) (@GRing.mul (GRing.UnitRing.ringType R) x (@exprz R y (@GRing.opp int_ZmodType (Posz (S n))))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R y (@GRing.opp int_ZmodType (Posz (S n)))) x) *) rewrite -exprz_inv -exprnP commrX //. (* Goal: @GRing.comm (GRing.UnitRing.ringType R) x (@GRing.inv R y) *) case: (boolP (y \is a GRing.unit))=> uy; last by rewrite invr_out. (* Goal: @GRing.comm (GRing.UnitRing.ringType R) x (@GRing.inv R y) *) by apply/eqP; rewrite (can2_eq (mulrVK _) (mulrK _)) // -mulrA com_xy mulKr. Qed. Lemma exprMz_comm x y n : x \is a GRing.unit -> y \is a GRing.unit -> Proof. (* Goal: forall (_ : is_true (@in_mem (GRing.UnitRing.sort R) x (@mem (GRing.UnitRing.sort R) (predPredType (GRing.UnitRing.sort R)) (@has_quality (S O) (GRing.UnitRing.sort R) (@GRing.unit R))))) (_ : is_true (@in_mem (GRing.UnitRing.sort R) y (@mem (GRing.UnitRing.sort R) (predPredType (GRing.UnitRing.sort R)) (@has_quality (S O) (GRing.UnitRing.sort R) (@GRing.unit R))))) (_ : @GRing.comm (GRing.UnitRing.ringType R) x y), @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@GRing.mul (GRing.UnitRing.ringType R) x y) n) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x n) (@exprz R y n)) *) move=> ux uy com_xy; elim: n => [|n _|n _]; first by rewrite expr0z mulr1. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@GRing.mul (GRing.UnitRing.ringType R) x y) (@GRing.opp int_ZmodType (Posz (S n)))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (@GRing.opp int_ZmodType (Posz (S n)))) (@exprz R y (@GRing.opp int_ZmodType (Posz (S n))))) *) (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@GRing.mul (GRing.UnitRing.ringType R) x y) (Posz (S n))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (Posz (S n))) (@exprz R y (Posz (S n)))) *) by rewrite -!exprnP exprMn_comm. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@GRing.mul (GRing.UnitRing.ringType R) x y) (@GRing.opp int_ZmodType (Posz (S n)))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (@GRing.opp int_ZmodType (Posz (S n)))) (@exprz R y (@GRing.opp int_ZmodType (Posz (S n))))) *) rewrite -!exprnN -!exprVn com_xy -exprMn_comm ?invrM//. (* Goal: @GRing.comm (GRing.UnitRing.ringType R) (@GRing.inv R x) (@GRing.inv R y) *) exact/commrV/commr_sym/commrV. Qed. Lemma commrXz_wmulls x y n : 0 <= n -> GRing.comm x y -> (x * y) ^ n = x ^ n * y ^ n. Proof. (* Goal: forall (_ : is_true (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) n)) (_ : @GRing.comm (GRing.UnitRing.ringType R) x y), @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@GRing.mul (GRing.UnitRing.ringType R) x y) n) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x n) (@exprz R y n)) *) move=> n0 com_xy; elim: n n0 => [|n _|n _] //; first by rewrite expr0z mulr1. (* Goal: forall _ : is_true (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) (Posz (S n))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@GRing.mul (GRing.UnitRing.ringType R) x y) (Posz (S n))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (Posz (S n))) (@exprz R y (Posz (S n)))) *) by rewrite -!exprnP exprMn_comm. Qed. Lemma unitrXz x n (ux : x \is a GRing.unit) : x ^ n \is a GRing.unit. Proof. (* Goal: is_true (@in_mem (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x n) (@mem (GRing.UnitRing.sort R) (predPredType (GRing.UnitRing.sort R)) (@has_quality (S O) (GRing.UnitRing.sort R) (@GRing.unit R)))) *) case: (intP n)=> {n} [|n|n]; rewrite ?expr0z ?unitr1 ?unitrX //. (* Goal: is_true (@in_mem (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.opp int_ZmodType (Posz (S n)))) (@mem (GRing.UnitRing.sort R) (predPredType (GRing.UnitRing.sort R)) (@has_quality (S O) (GRing.UnitRing.sort R) (@GRing.unit R)))) *) by rewrite -invr_expz unitrV unitrX. Qed. Lemma exprzDr x (ux : x \is a GRing.unit) m n : x ^ (m + n) = x ^ m * x ^ n. Proof. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.add int_ZmodType m n)) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x m) (@exprz R x n)) *) move: n m; apply: wlog_ler=> n m hnm. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.add int_ZmodType m n)) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x m) (@exprz R x n)) *) (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.add int_ZmodType m n)) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x m) (@exprz R x n)) *) by rewrite addrC hnm commrXz //; apply: commr_sym; apply: commrXz. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.add int_ZmodType m n)) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x m) (@exprz R x n)) *) case: (intP m) hnm=> {m} [|m|m]; rewrite ?mul1r ?add0r //; case: (intP n)=> {n} [|n|n _]; rewrite ?mulr1 ?addr0 //; do ?by rewrite exprzD_ss. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.add int_ZmodType (Posz (S m)) (@GRing.opp int_ZmodType (Posz (S n))))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (Posz (S m))) (@exprz R x (@GRing.opp int_ZmodType (Posz (S n))))) *) rewrite -invr_expz subzSS !exprSzr invrM ?unitrX // -mulrA mulVKr //. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n)))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (Posz m)) (@GRing.inv R (@exprz R x (Posz n)))) *) case: (leqP n m)=> [|/ltnW] hmn; rewrite -{2}(subnK hmn) exprzD_nat -subzn //. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n)))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (Posz m)) (@GRing.inv R (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (@GRing.add int_ZmodType (Posz n) (@GRing.opp int_ZmodType (Posz m)))) (@exprz R x (Posz m))))) *) (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n)))) (@GRing.mul (GRing.UnitRing.ringType R) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (@GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n)))) (@exprz R x (Posz n))) (@GRing.inv R (@exprz R x (Posz n)))) *) by rewrite mulrK ?unitrX. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.add int_ZmodType (Posz m) (@GRing.opp int_ZmodType (Posz n)))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (Posz m)) (@GRing.inv R (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R x (@GRing.add int_ZmodType (Posz n) (@GRing.opp int_ZmodType (Posz m)))) (@exprz R x (Posz m))))) *) by rewrite invrM ?unitrXz // mulVKr ?unitrXz // -opprB -invr_expz. Qed. Lemma exprz_exp x m n : (x ^ m) ^ n = (x ^ (m * n)). Proof. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@exprz R x m) n) (@exprz R x (@GRing.mul int_Ring m n)) *) wlog: n / 0 <= n. (* Goal: forall _ : is_true (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) n), @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@exprz R x m) n) (@exprz R x (@GRing.mul int_Ring m n)) *) (* Goal: forall _ : forall (n : int) (_ : is_true (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) n)), @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@exprz R x m) n) (@exprz R x (@GRing.mul int_Ring m n)), @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@exprz R x m) n) (@exprz R x (@GRing.mul int_Ring m n)) *) by case: n=> [n -> //|n]; rewrite ?NegzE mulrN -?invr_expz=> -> /=. (* Goal: forall _ : is_true (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) n), @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@exprz R x m) n) (@exprz R x (@GRing.mul int_Ring m n)) *) elim: n x m=> [|n ihn|n ihn] x m // _; first by rewrite mulr0 !expr0z. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@exprz R x m) (Posz (S n))) (@exprz R x (@GRing.mul int_Ring m (Posz (S n)))) *) rewrite exprSz ihn // intS mulrDr mulr1 exprzD_ss //. (* Goal: is_true (orb (andb (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) m) (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) (@GRing.mul int_Ring m (Posz n)))) (andb (@Num.Def.ler int_numDomainType m (GRing.zero (Num.NumDomain.zmodType int_numDomainType))) (@Num.Def.ler int_numDomainType (@GRing.mul int_Ring m (Posz n)) (GRing.zero (Num.NumDomain.zmodType int_numDomainType))))) *) by case: (intP m)=> // m'; rewrite ?oppr_le0 //. Qed. Lemma exprzAC x m n : (x ^ m) ^ n = (x ^ n) ^ m. Proof. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@exprz R x m) n) (@exprz R (@exprz R x n) m) *) by rewrite !exprz_exp mulrC. Qed. Lemma exprz_out x n (nux : x \isn't a GRing.unit) (hn : 0 <= n) : Proof. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.opp int_ZmodType n)) (@exprz R x n) *) by case: (intP n) hn=> //= m; rewrite -exprnN -exprVn invr_out. Qed. End ExprzUnitRing. Section Exprz_Zint_UnitRing. Variable R : unitRingType. Implicit Types x y : R. Implicit Types m n : int. Local Coercion Posz : nat >-> int. Lemma exprz_pmulzl x m n : 0 <= n -> (x *~ m) ^ n = x ^ n *~ (m ^ n). Proof. (* Goal: forall _ : is_true (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) n), @eq (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R (@intmul (GRing.UnitRing.zmodType R) x m) n) (@intmul (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) (@exprz R x n) (@exprz int_unitRingType m n)) *) by elim: n=> [|n ihn|n _] // _; rewrite !exprSz ihn // mulrzAr mulrzAl -mulrzA. Qed. Lemma exprz_pintl m n (hn : 0 <= n) : m%:~R ^ n = (m ^ n)%:~R :> R. Proof. (* Goal: @eq (GRing.UnitRing.sort R) (@exprz R (@intmul (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) (GRing.one (GRing.UnitRing.ringType R)) m) n) (@intmul (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) (GRing.one (GRing.UnitRing.ringType R)) (@exprz int_unitRingType m n)) *) by rewrite exprz_pmulzl // exp1rz. Qed. Lemma exprzMzl x m n (ux : x \is a GRing.unit) (um : m%:~R \is a @GRing.unit R): Proof. (* Goal: @eq (GRing.UnitRing.sort R) (@exprz R (@intmul (GRing.UnitRing.zmodType R) x m) n) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R (@intmul (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) (GRing.one (GRing.UnitRing.ringType R)) m) n) (@exprz R x n)) *) rewrite -[x *~ _]mulrzl exprMz_comm //. (* Goal: @GRing.comm (GRing.UnitRing.ringType R) (@intmul (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) (GRing.one (GRing.UnitRing.ringType R)) m) x *) by apply: commr_sym; apply: commr_int. Qed. Lemma expNrz x n : (- x) ^ n = (-1) ^ n * x ^ n :> R. Proof. (* Goal: @eq (GRing.UnitRing.sort R) (@exprz R (@GRing.opp (GRing.UnitRing.zmodType R) x) n) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R (@GRing.opp (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) (GRing.one (GRing.UnitRing.ringType R))) n) (@exprz R x n)) *) case: n=> [] n; rewrite ?NegzE; first by apply: exprNn. (* Goal: @eq (GRing.UnitRing.sort R) (@exprz R (@GRing.opp (GRing.UnitRing.zmodType R) x) (@GRing.opp int_ZmodType (Posz (S n)))) (@GRing.mul (GRing.UnitRing.ringType R) (@exprz R (@GRing.opp (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) (GRing.one (GRing.UnitRing.ringType R))) (@GRing.opp int_ZmodType (Posz (S n)))) (@exprz R x (@GRing.opp int_ZmodType (Posz (S n))))) *) by rewrite -!exprz_inv !invrN invr1; apply: exprNn. Qed. Lemma unitr_n0expz x n : n != 0 -> (x ^ n \is a GRing.unit) = (x \is a GRing.unit). Proof. (* Goal: forall _ : is_true (negb (@eq_op int_eqType n (GRing.zero int_ZmodType))), @eq bool (@in_mem (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x n) (@mem (GRing.UnitRing.sort R) (predPredType (GRing.UnitRing.sort R)) (@has_quality (S O) (GRing.UnitRing.sort R) (@GRing.unit R)))) (@in_mem (GRing.UnitRing.sort R) x (@mem (GRing.UnitRing.sort R) (predPredType (GRing.UnitRing.sort R)) (@has_quality (S O) (GRing.UnitRing.sort R) (@GRing.unit R)))) *) by case: n => *; rewrite ?NegzE -?exprz_inv ?unitrX_pos ?unitrV ?lt0n. Qed. Lemma intrV (n : int) : n \in [:: 0; 1; -1] -> n%:~R ^-1 = n%:~R :> R. Proof. (* Goal: forall _ : is_true (@in_mem int n (@mem (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType int_Ring))) (seq_predType (GRing.Zmodule.eqType (GRing.Ring.zmodType int_Ring))) (@cons (GRing.Zmodule.sort (GRing.Ring.zmodType int_Ring)) (GRing.zero (GRing.Ring.zmodType int_Ring)) (@cons (GRing.Ring.sort int_Ring) (GRing.one int_Ring) (@cons (GRing.Zmodule.sort (GRing.Ring.zmodType int_Ring)) (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) (@nil (GRing.Zmodule.sort (GRing.Ring.zmodType int_Ring)))))))), @eq (GRing.UnitRing.sort R) (@GRing.inv R (@intmul (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) (GRing.one (GRing.UnitRing.ringType R)) n)) (@intmul (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) (GRing.one (GRing.UnitRing.ringType R)) n) *) by case: (intP n)=> // [|[]|[]] //; rewrite ?rmorphN ?invrN (invr0, invr1). Qed. Lemma rmorphXz (R' : unitRingType) (f : {rmorphism R -> R'}) n : {in GRing.unit, {morph f : x / x ^ n}}. Proof. (* Goal: @prop_in1 (GRing.UnitRing.sort R) (@mem (GRing.UnitRing.sort R) (predPredType (GRing.UnitRing.sort R)) (@has_quality (S O) (GRing.UnitRing.sort R) (@GRing.unit R))) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType R'))) (@GRing.RMorphism.apply (GRing.UnitRing.ringType R) (GRing.UnitRing.ringType R') (Phant (forall _ : GRing.UnitRing.sort R, GRing.UnitRing.sort R')) f ((fun x0 : GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) => @exprz R x0 n) x)) ((fun x0 : GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType R')) => @exprz R' x0 n) (@GRing.RMorphism.apply (GRing.UnitRing.ringType R) (GRing.UnitRing.ringType R') (Phant (forall _ : GRing.UnitRing.sort R, GRing.UnitRing.sort R')) f x))) (inPhantom (@morphism_1 (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType R))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType R'))) (@GRing.RMorphism.apply (GRing.UnitRing.ringType R) (GRing.UnitRing.ringType R') (Phant (forall _ : GRing.UnitRing.sort R, GRing.UnitRing.sort R')) f) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) => @exprz R x n) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType R')) => @exprz R' x n))) *) by case: n => n x Ux; rewrite ?rmorphV ?rpredX ?rmorphX. Qed. End Exprz_Zint_UnitRing. Section ExprzIdomain. Variable R : idomainType. Implicit Types x y : R. Implicit Types m n : int. Local Coercion Posz : nat >-> int. Lemma expfz_eq0 x n : (x ^ n == 0) = (n != 0) && (x == 0). Proof. (* Goal: @eq bool (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R))) (@exprz (GRing.IntegralDomain.unitRingType R) x n) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R))))) (andb (negb (@eq_op int_eqType n (GRing.zero int_ZmodType))) (@eq_op (GRing.IntegralDomain.eqType R) x (GRing.zero (GRing.IntegralDomain.zmodType R)))) *) by case: n=> n; rewrite ?NegzE -?exprz_inv ?expf_eq0 ?lt0n ?invr_eq0. Qed. Lemma expfz_neq0 x n : x != 0 -> x ^ n != 0. Proof. (* Goal: forall _ : is_true (negb (@eq_op (GRing.IntegralDomain.eqType R) x (GRing.zero (GRing.IntegralDomain.zmodType R)))), is_true (negb (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R))) (@exprz (GRing.IntegralDomain.unitRingType R) x n) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)))))) *) by move=> x_nz; rewrite expfz_eq0; apply/nandP; right. Qed. Lemma exprzMl x y n (ux : x \is a GRing.unit) (uy : y \is a GRing.unit) : Proof. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R))) (@exprz (GRing.IntegralDomain.unitRingType R) (@GRing.mul (GRing.IntegralDomain.ringType R) x y) n) (@GRing.mul (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)) (@exprz (GRing.IntegralDomain.unitRingType R) x n) (@exprz (GRing.IntegralDomain.unitRingType R) y n)) *) by rewrite exprMz_comm //; apply: mulrC. Qed. Lemma expfV (x : R) (i : int) : (x ^ i) ^-1 = (x ^-1) ^ i. Proof. (* Goal: @eq (GRing.UnitRing.sort (GRing.IntegralDomain.unitRingType R)) (@GRing.inv (GRing.IntegralDomain.unitRingType R) (@exprz (GRing.IntegralDomain.unitRingType R) x i)) (@exprz (GRing.IntegralDomain.unitRingType R) (@GRing.inv (GRing.IntegralDomain.unitRingType R) x) i) *) by rewrite invr_expz exprz_inv. Qed. End ExprzIdomain. Section ExprzField. Variable F : fieldType. Implicit Types x y : F. Implicit Types m n : int. Local Coercion Posz : nat >-> int. Lemma expfzDr x m n : x != 0 -> x ^ (m + n) = x ^ m * x ^ n. Proof. (* Goal: forall _ : is_true (negb (@eq_op (GRing.Field.eqType F) x (GRing.zero (GRing.Field.zmodType F)))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@exprz (GRing.Field.unitRingType F) x (@GRing.add int_ZmodType m n)) (@GRing.mul (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@exprz (GRing.Field.unitRingType F) x m) (@exprz (GRing.Field.unitRingType F) x n)) *) by move=> hx; rewrite exprzDr ?unitfE. Qed. Lemma expfz_n0addr x m n : m + n != 0 -> x ^ (m + n) = x ^ m * x ^ n. Proof. (* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType int_ZmodType) (@GRing.add int_ZmodType m n) (GRing.zero int_ZmodType))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@exprz (GRing.Field.unitRingType F) x (@GRing.add int_ZmodType m n)) (@GRing.mul (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@exprz (GRing.Field.unitRingType F) x m) (@exprz (GRing.Field.unitRingType F) x n)) *) have [-> hmn|nx0 _] := eqVneq x 0; last exact: expfzDr. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@exprz (GRing.Field.unitRingType F) (GRing.zero (GRing.Field.zmodType F)) (@GRing.add int_ZmodType m n)) (@GRing.mul (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@exprz (GRing.Field.unitRingType F) (GRing.zero (GRing.Field.zmodType F)) m) (@exprz (GRing.Field.unitRingType F) (GRing.zero (GRing.Field.zmodType F)) n)) *) rewrite !exp0rz (negPf hmn). (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@intmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (Posz (nat_of_bool false))) (@GRing.mul (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@intmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (Posz (nat_of_bool (@eq_op int_eqType m (GRing.zero int_ZmodType))))) (@intmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (Posz (nat_of_bool (@eq_op int_eqType n (GRing.zero int_ZmodType)))))) *) case: (altP (m =P 0)) hmn=> [->|]; rewrite (mul0r, mul1r) //. (* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType int_ZmodType) (@GRing.add int_ZmodType (GRing.zero int_ZmodType) n) (GRing.zero int_ZmodType))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@intmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (Posz (nat_of_bool false))) (@intmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (Posz (nat_of_bool (@eq_op int_eqType n (GRing.zero int_ZmodType))))) *) by rewrite add0r=> /negPf->. Qed. Lemma expfzMl x y n : (x * y) ^ n = x ^ n * y ^ n. Proof. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@exprz (GRing.Field.unitRingType F) (@GRing.mul (GRing.Field.ringType F) x y) n) (@GRing.mul (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@exprz (GRing.Field.unitRingType F) x n) (@exprz (GRing.Field.unitRingType F) y n)) *) have [->|/negPf n0] := eqVneq n 0; first by rewrite !expr0z mulr1. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@exprz (GRing.Field.unitRingType F) (@GRing.mul (GRing.Field.ringType F) x y) n) (@GRing.mul (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@exprz (GRing.Field.unitRingType F) x n) (@exprz (GRing.Field.unitRingType F) y n)) *) case: (boolP ((x * y) == 0)); rewrite ?mulf_eq0. (* Goal: forall _ : is_true (negb (orb (@eq_op (GRing.IntegralDomain.eqType (GRing.Field.idomainType F)) x (GRing.zero (GRing.IntegralDomain.zmodType (GRing.Field.idomainType F)))) (@eq_op (GRing.IntegralDomain.eqType (GRing.Field.idomainType F)) y (GRing.zero (GRing.IntegralDomain.zmodType (GRing.Field.idomainType F)))))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@exprz (GRing.Field.unitRingType F) (@GRing.mul (GRing.Field.ringType F) x y) n) (@GRing.mul (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@exprz (GRing.Field.unitRingType F) x n) (@exprz (GRing.Field.unitRingType F) y n)) *) (* Goal: forall _ : is_true (orb (@eq_op (GRing.IntegralDomain.eqType (GRing.Field.idomainType F)) x (GRing.zero (GRing.IntegralDomain.zmodType (GRing.Field.idomainType F)))) (@eq_op (GRing.IntegralDomain.eqType (GRing.Field.idomainType F)) y (GRing.zero (GRing.IntegralDomain.zmodType (GRing.Field.idomainType F))))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@exprz (GRing.Field.unitRingType F) (@GRing.mul (GRing.Field.ringType F) x y) n) (@GRing.mul (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@exprz (GRing.Field.unitRingType F) x n) (@exprz (GRing.Field.unitRingType F) y n)) *) by case/orP=> /eqP->; rewrite ?(mul0r, mulr0, exp0rz, n0). (* Goal: forall _ : is_true (negb (orb (@eq_op (GRing.IntegralDomain.eqType (GRing.Field.idomainType F)) x (GRing.zero (GRing.IntegralDomain.zmodType (GRing.Field.idomainType F)))) (@eq_op (GRing.IntegralDomain.eqType (GRing.Field.idomainType F)) y (GRing.zero (GRing.IntegralDomain.zmodType (GRing.Field.idomainType F)))))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@exprz (GRing.Field.unitRingType F) (@GRing.mul (GRing.Field.ringType F) x y) n) (@GRing.mul (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@exprz (GRing.Field.unitRingType F) x n) (@exprz (GRing.Field.unitRingType F) y n)) *) by case/norP=> x0 y0; rewrite exprzMl ?unitfE. Qed. Lemma fmorphXz (R : unitRingType) (f : {rmorphism F -> R}) n : {morph f : x / x ^ n}. Proof. (* Goal: @morphism_1 (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType R))) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.UnitRing.ringType R) (Phant (forall _ : GRing.Field.sort F, GRing.UnitRing.sort R)) f) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F)) => @exprz (GRing.Field.unitRingType F) x n) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) => @exprz R x n) *) by case: n => n x; rewrite ?fmorphV rmorphX. Qed. End ExprzField. Section ExprzOrder. Variable R : realFieldType. Implicit Types x y : R. Implicit Types m n : int. Local Coercion Posz : nat >-> int. Lemma exprz_ge0 n x (hx : 0 <= x) : (0 <= x ^ n). Proof. (* Goal: is_true (@Num.Def.ler (Num.RealField.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) (@exprz (Num.RealField.unitRingType R) x n)) *) by case: n=> n; rewrite ?NegzE -?invr_expz ?invr_ge0 ?exprn_ge0. Qed. Lemma exprz_gt0 n x (hx : 0 < x) : (0 < x ^ n). Proof. (* Goal: is_true (@Num.Def.ltr (Num.RealField.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) (@exprz (Num.RealField.unitRingType R) x n)) *) by case: n=> n; rewrite ?NegzE -?invr_expz ?invr_gt0 ?exprn_gt0. Qed. Definition exprz_gte0 := (exprz_ge0, exprz_gt0). Lemma ler_wpiexpz2l x (x0 : 0 <= x) (x1 : x <= 1) : {in >= 0 &, {homo (exprz x) : x y /~ x <= y}}. Proof. (* Goal: @prop_in2 (Num.NumDomain.sort int_numDomainType) (@mem (Num.NumDomain.sort int_numDomainType) (predPredType (Num.NumDomain.sort int_numDomainType)) (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)))) (fun x0 y : int => forall _ : (fun y0 x : int => is_true (@Num.Def.ler int_numDomainType x y0)) x0 y, (fun x y0 : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x y0)) (@exprz (Num.RealField.unitRingType R) x x0) (@exprz (Num.RealField.unitRingType R) x y)) (inPhantom (@homomorphism_2 int (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x) (fun y x : int => is_true (@Num.Def.ler int_numDomainType x y)) (fun x y : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x y)))) *) move=> [] m [] n; rewrite -!topredE /= ?oppr_cp0 ?ltz_nat // => _ _. (* Goal: forall _ : is_true (@Num.Def.ler int_numDomainType (Posz n) (Posz m)), is_true (@Num.Def.ler (Num.RealField.numDomainType R) (@exprz (Num.RealField.unitRingType R) x (Posz m)) (@exprz (Num.RealField.unitRingType R) x (Posz n))) *) by rewrite lez_nat -?exprnP=> /ler_wiexpn2l; apply. Qed. Lemma ler_wniexpz2l x (x0 : 0 <= x) (x1 : x <= 1) : {in < 0 &, {homo (exprz x) : x y /~ x <= y}}. Proof. (* Goal: @prop_in2 (Num.NumDomain.sort int_numDomainType) (@mem (Num.NumDomain.sort int_numDomainType) (predPredType (Num.NumDomain.sort int_numDomainType)) (@rel_of_simpl_rel (Num.NumDomain.sort int_numDomainType) (@Num.Def.gtr int_numDomainType) (GRing.zero (Num.NumDomain.zmodType int_numDomainType)))) (fun x0 y : int => forall _ : (fun y0 x : int => is_true (@Num.Def.ler int_numDomainType x y0)) x0 y, (fun x y0 : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x y0)) (@exprz (Num.RealField.unitRingType R) x x0) (@exprz (Num.RealField.unitRingType R) x y)) (inPhantom (@homomorphism_2 int (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x) (fun y x : int => is_true (@Num.Def.ler int_numDomainType x y)) (fun x y : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x y)))) *) move=> [] m [] n; rewrite ?NegzE -!topredE /= ?oppr_cp0 ?ltz_nat // => _ _. (* Goal: forall _ : is_true (@Num.Def.ler int_numDomainType (@GRing.opp int_ZmodType (Posz (S n))) (@GRing.opp int_ZmodType (Posz (S m)))), is_true (@Num.Def.ler (Num.RealField.numDomainType R) (@exprz (Num.RealField.unitRingType R) x (@GRing.opp int_ZmodType (Posz (S m)))) (@exprz (Num.RealField.unitRingType R) x (@GRing.opp int_ZmodType (Posz (S n))))) *) rewrite ler_opp2 lez_nat -?invr_expz=> hmn; move: (x0). (* Goal: forall _ : is_true (@Num.Def.ler (Num.RealField.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) x), is_true (@Num.Def.ler (Num.RealField.numDomainType R) (@GRing.inv (Num.RealField.unitRingType R) (@exprz (Num.RealField.unitRingType R) x (Posz (S m)))) (@GRing.inv (Num.RealField.unitRingType R) (@exprz (Num.RealField.unitRingType R) x (Posz (S n))))) *) rewrite le0r=> /orP [/eqP->|lx0]; first by rewrite !exp0rz invr0. (* Goal: is_true (@Num.Def.ler (Num.RealField.numDomainType R) (@GRing.inv (Num.RealField.unitRingType R) (@exprz (Num.RealField.unitRingType R) x (Posz (S m)))) (@GRing.inv (Num.RealField.unitRingType R) (@exprz (Num.RealField.unitRingType R) x (Posz (S n))))) *) by rewrite lef_pinv -?topredE /= ?exprz_gt0 // ler_wiexpn2l. Qed. Fact ler_wpeexpz2l x (x1 : 1 <= x) : {in >= 0 &, {homo (exprz x) : x y / x <= y}}. Proof. (* Goal: @prop_in2 (Num.NumDomain.sort int_numDomainType) (@mem (Num.NumDomain.sort int_numDomainType) (predPredType (Num.NumDomain.sort int_numDomainType)) (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)))) (fun x0 y : int => forall _ : (fun x y0 : int => is_true (@Num.Def.ler int_numDomainType x y0)) x0 y, (fun x y0 : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x y0)) (@exprz (Num.RealField.unitRingType R) x x0) (@exprz (Num.RealField.unitRingType R) x y)) (inPhantom (@homomorphism_2 int (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x) (fun x y : int => is_true (@Num.Def.ler int_numDomainType x y)) (fun x y : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x y)))) *) move=> [] m [] n; rewrite -!topredE /= ?oppr_cp0 ?ltz_nat // => _ _. (* Goal: forall _ : is_true (@Num.Def.ler int_numDomainType (Posz m) (Posz n)), is_true (@Num.Def.ler (Num.RealField.numDomainType R) (@exprz (Num.RealField.unitRingType R) x (Posz m)) (@exprz (Num.RealField.unitRingType R) x (Posz n))) *) by rewrite lez_nat -?exprnP=> /ler_weexpn2l; apply. Qed. Fact ler_wneexpz2l x (x1 : 1 <= x) : {in <= 0 &, {homo (exprz x) : x y / x <= y}}. Proof. (* Goal: @prop_in2 (Num.NumDomain.sort int_numDomainType) (@mem (Num.NumDomain.sort int_numDomainType) (predPredType (Num.NumDomain.sort int_numDomainType)) (@rel_of_simpl_rel (Num.NumDomain.sort int_numDomainType) (@Num.Def.ger int_numDomainType) (GRing.zero (Num.NumDomain.zmodType int_numDomainType)))) (fun x0 y : int => forall _ : (fun x y0 : int => is_true (@Num.Def.ler int_numDomainType x y0)) x0 y, (fun x y0 : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x y0)) (@exprz (Num.RealField.unitRingType R) x x0) (@exprz (Num.RealField.unitRingType R) x y)) (inPhantom (@homomorphism_2 int (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x) (fun x y : int => is_true (@Num.Def.ler int_numDomainType x y)) (fun x y : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x y)))) *) move=> m n hm hn /= hmn. (* Goal: is_true (@Num.Def.ler (Num.RealField.numDomainType R) (@exprz (Num.RealField.unitRingType R) x m) (@exprz (Num.RealField.unitRingType R) x n)) *) rewrite -lef_pinv -?topredE /= ?exprz_gt0 ?(ltr_le_trans ltr01) //. (* Goal: is_true (@Num.Def.ler (Num.NumField.numDomainType (Num.RealField.numFieldType R)) (@GRing.inv (Num.NumField.unitRingType (Num.RealField.numFieldType R)) (@exprz (Num.RealField.unitRingType R) x n)) (@GRing.inv (Num.NumField.unitRingType (Num.RealField.numFieldType R)) (@exprz (Num.RealField.unitRingType R) x m))) *) by rewrite !invr_expz ler_wpeexpz2l ?ler_opp2 -?topredE //= oppr_cp0. Qed. Lemma ler_weexpz2l x (x1 : 1 <= x) : {homo (exprz x) : x y / x <= y}. Lemma pexprz_eq1 x n (x0 : 0 <= x) : (x ^ n == 1) = ((n == 0) || (x == 1)). Proof. (* Goal: @eq bool (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x n) (GRing.one (GRing.UnitRing.ringType (Num.RealField.unitRingType R)))) (orb (@eq_op int_eqType n (GRing.zero int_ZmodType)) (@eq_op (Num.RealField.eqType R) x (GRing.one (Num.RealField.ringType R)))) *) case: n=> n; rewrite ?NegzE -?exprz_inv ?oppr_eq0 pexprn_eq1 // ?invr_eq1 //. (* Goal: is_true (@Num.Def.ler (Num.RealField.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) (@GRing.inv (Num.RealField.unitRingType R) x)) *) by rewrite invr_ge0. Qed. Lemma ieexprIz x (x0 : 0 < x) (nx1 : x != 1) : injective (exprz x). Proof. (* Goal: @injective (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) int (@exprz (Num.RealField.unitRingType R) x) *) apply: wlog_ltr=> // m n hmn; first by move=> hmn'; rewrite hmn. (* Goal: forall _ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x m) (@exprz (Num.RealField.unitRingType R) x n), @eq int m n *) move=> /(f_equal ( *%R^~ (x ^ (- n)))). (* Goal: forall _ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@GRing.mul (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) (@exprz (Num.RealField.unitRingType R) x m) (@exprz (Num.RealField.unitRingType R) x (@GRing.opp (Num.NumDomain.zmodType (Num.RealDomain.numDomainType int_realDomainType)) n))) (@GRing.mul (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.RealField.unitRingType R) x (@GRing.opp (Num.NumDomain.zmodType (Num.RealDomain.numDomainType int_realDomainType)) n))), @eq int m n *) rewrite -!expfzDr ?gtr_eqF // subrr expr0z=> /eqP. (* Goal: forall _ : is_true (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (GRing.Field.unitRingType (Num.RealField.fieldType R)) x (@GRing.add int_ZmodType m (@GRing.opp (Num.NumDomain.zmodType (Num.RealDomain.numDomainType int_realDomainType)) n))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType (Num.RealField.fieldType R))))), @eq int m n *) by rewrite pexprz_eq1 ?(ltrW x0) // (negPf nx1) subr_eq0 orbF=> /eqP. Qed. Lemma ler_piexpz2l x (x0 : 0 < x) (x1 : x < 1) : {in >= 0 &, {mono (exprz x) : x y /~ x <= y}}. Lemma ltr_piexpz2l x (x0 : 0 < x) (x1 : x < 1) : {in >= 0 &, {mono (exprz x) : x y /~ x < y}}. Proof. (* Goal: @prop_in2 (Num.NumDomain.sort int_numDomainType) (@mem (Num.NumDomain.sort int_numDomainType) (predPredType (Num.NumDomain.sort int_numDomainType)) (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)))) (fun x0 y : int => @eq bool ((fun x y0 : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => @Num.Def.ltr (Num.RealField.numDomainType R) x y0) (@exprz (Num.RealField.unitRingType R) x x0) (@exprz (Num.RealField.unitRingType R) x y)) ((fun y0 x : int => @Num.Def.ltr int_numDomainType x y0) x0 y)) (inPhantom (@monomorphism_2 int (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) bool (@exprz (Num.RealField.unitRingType R) x) (fun y x : int => @Num.Def.ltr int_numDomainType x y) (fun x y : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => @Num.Def.ltr (Num.RealField.numDomainType R) x y))) *) exact: (lerW_nmono_in (ler_piexpz2l _ _)). Qed. Lemma ler_niexpz2l x (x0 : 0 < x) (x1 : x < 1) : {in < 0 &, {mono (exprz x) : x y /~ x <= y}}. Lemma ltr_niexpz2l x (x0 : 0 < x) (x1 : x < 1) : {in < 0 &, {mono (exprz x) : x y /~ x < y}}. Proof. (* Goal: @prop_in2 (Num.NumDomain.sort int_numDomainType) (@mem (Num.NumDomain.sort int_numDomainType) (predPredType (Num.NumDomain.sort int_numDomainType)) (@rel_of_simpl_rel (Num.NumDomain.sort int_numDomainType) (@Num.Def.gtr int_numDomainType) (GRing.zero (Num.NumDomain.zmodType int_numDomainType)))) (fun x0 y : int => @eq bool ((fun x y0 : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => @Num.Def.ltr (Num.RealField.numDomainType R) x y0) (@exprz (Num.RealField.unitRingType R) x x0) (@exprz (Num.RealField.unitRingType R) x y)) ((fun y0 x : int => @Num.Def.ltr int_numDomainType x y0) x0 y)) (inPhantom (@monomorphism_2 int (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) bool (@exprz (Num.RealField.unitRingType R) x) (fun y x : int => @Num.Def.ltr int_numDomainType x y) (fun x y : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => @Num.Def.ltr (Num.RealField.numDomainType R) x y))) *) exact: (lerW_nmono_in (ler_niexpz2l _ _)). Qed. Lemma ler_eexpz2l x (x1 : 1 < x) : {mono (exprz x) : x y / x <= y}. Lemma ltr_eexpz2l x (x1 : 1 < x) : {mono (exprz x) : x y / x < y}. Proof. (* Goal: @monomorphism_2 int (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) bool (@exprz (Num.RealField.unitRingType R) x) (fun x y : int => @Num.Def.ltr int_numDomainType x y) (fun x y : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => @Num.Def.ltr (Num.RealField.numDomainType R) x y) *) exact: (lerW_mono (ler_eexpz2l _)). Qed. Lemma ler_wpexpz2r n (hn : 0 <= n) : {in >= 0 & , {homo ((@exprz R)^~ n) : x y / x <= y}}. Proof. (* Goal: @prop_in2 (Num.NumDomain.sort (Num.RealField.numDomainType R)) (@mem (Num.NumDomain.sort (Num.RealField.numDomainType R)) (predPredType (Num.NumDomain.sort (Num.RealField.numDomainType R))) (@Num.Def.ler (Num.RealField.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))))) (fun x y : GRing.UnitRing.sort (Num.RealField.unitRingType R) => forall _ : (fun x0 y0 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x0 y0)) x y, (fun x0 y0 : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x0 y0)) ((fun x0 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x0 n) x) ((fun x0 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x0 n) y)) (inPhantom (@homomorphism_2 (GRing.UnitRing.sort (Num.RealField.unitRingType R)) (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (fun x : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x n) (fun x y : GRing.UnitRing.sort (Num.RealField.unitRingType R) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x y)) (fun x y : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x y)))) *) by case: n hn=> // n _; apply: ler_expn2r. Qed. Lemma ler_wnexpz2r n (hn : n <= 0) : {in > 0 & , {homo ((@exprz R)^~ n) : x y /~ x <= y}}. Proof. (* Goal: @prop_in2 (Num.NumDomain.sort (Num.RealField.numDomainType R)) (@mem (Num.NumDomain.sort (Num.RealField.numDomainType R)) (predPredType (Num.NumDomain.sort (Num.RealField.numDomainType R))) (@Num.Def.ltr (Num.RealField.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))))) (fun x y : GRing.UnitRing.sort (Num.RealField.unitRingType R) => forall _ : (fun y0 x0 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x0 y0)) x y, (fun x0 y0 : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x0 y0)) ((fun x0 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x0 n) x) ((fun x0 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x0 n) y)) (inPhantom (@homomorphism_2 (GRing.UnitRing.sort (Num.RealField.unitRingType R)) (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (fun x : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x n) (fun y x : GRing.UnitRing.sort (Num.RealField.unitRingType R) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x y)) (fun x y : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => is_true (@Num.Def.ler (Num.RealField.numDomainType R) x y)))) *) move=> x y /= hx hy hxy; rewrite -lef_pinv ?[_ \in _]exprz_gt0 //. (* Goal: is_true (@Num.Def.ler (Num.NumField.numDomainType (Num.RealField.numFieldType R)) (@GRing.inv (Num.NumField.unitRingType (Num.RealField.numFieldType R)) (@exprz (Num.RealField.unitRingType R) y n)) (@GRing.inv (Num.NumField.unitRingType (Num.RealField.numFieldType R)) (@exprz (Num.RealField.unitRingType R) x n))) *) by rewrite !invr_expz ler_wpexpz2r ?[_ \in _]ltrW // oppr_cp0. Qed. Lemma pexpIrz n (n0 : n != 0) : {in >= 0 &, injective ((@exprz R)^~ n)}. Proof. (* Goal: @prop_in2 (Num.NumDomain.sort (Num.RealField.numDomainType R)) (@mem (Num.NumDomain.sort (Num.RealField.numDomainType R)) (predPredType (Num.NumDomain.sort (Num.RealField.numDomainType R))) (@Num.Def.ler (Num.RealField.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))))) (fun x1 x2 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => forall _ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) ((fun x : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x n) x1) ((fun x : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x n) x2), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x1 x2) (inPhantom (@injective (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (GRing.UnitRing.sort (Num.RealField.unitRingType R)) (fun x : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x n))) *) move=> x y; rewrite ![_ \in _]le0r=> /orP [/eqP-> _ /eqP|hx]. (* Goal: forall (_ : is_true (orb (@eq_op (Num.NumDomain.eqType (Num.RealField.numDomainType R)) y (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R)))) (@Num.Def.ltr (Num.RealField.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) y))) (_ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.RealField.unitRingType R) y n)), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x y *) (* Goal: forall _ : is_true (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) n) (@exprz (Num.RealField.unitRingType R) y n)), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) y *) by rewrite exp0rz ?(negPf n0) eq_sym expfz_eq0=> /andP [_ /eqP->]. (* Goal: forall (_ : is_true (orb (@eq_op (Num.NumDomain.eqType (Num.RealField.numDomainType R)) y (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R)))) (@Num.Def.ltr (Num.RealField.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) y))) (_ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.RealField.unitRingType R) y n)), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x y *) case/orP=> [/eqP-> /eqP|hy]. (* Goal: forall _ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.RealField.unitRingType R) y n), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x y *) (* Goal: forall _ : is_true (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.RealField.unitRingType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) n)), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) *) by rewrite exp0rz ?(negPf n0) expfz_eq0=> /andP [_ /eqP]. (* Goal: forall _ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.RealField.unitRingType R) y n), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x y *) move=> /(f_equal ( *%R^~ (y ^ (- n)))) /eqP. (* Goal: forall _ : is_true (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (Num.NumDomain.unitRingType (Num.RealField.numDomainType R)))) (@GRing.mul (GRing.UnitRing.ringType (Num.NumDomain.unitRingType (Num.RealField.numDomainType R))) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.NumDomain.unitRingType (Num.RealField.numDomainType R)) y (@GRing.opp int_ZmodType n))) (@GRing.mul (GRing.UnitRing.ringType (Num.NumDomain.unitRingType (Num.RealField.numDomainType R))) (@exprz (Num.RealField.unitRingType R) y n) (@exprz (Num.NumDomain.unitRingType (Num.RealField.numDomainType R)) y (@GRing.opp int_ZmodType n)))), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x y *) rewrite -expfzDr ?(gtr_eqF hy) // subrr expr0z -exprz_inv -expfzMl. (* Goal: forall _ : is_true (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (Num.NumDomain.unitRingType (Num.RealField.numDomainType R)))) (@exprz (GRing.Field.unitRingType (Num.RealField.fieldType R)) (@GRing.mul (GRing.Field.ringType (Num.RealField.fieldType R)) x (@GRing.inv (Num.NumDomain.unitRingType (Num.RealField.numDomainType R)) y)) n) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType (Num.RealField.fieldType R))))), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x y *) rewrite pexprz_eq1 ?(negPf n0) /= ?mulr_ge0 ?invr_ge0 ?ltrW //. (* Goal: forall _ : is_true (@eq_op (Num.RealField.eqType R) (@GRing.mul (GRing.Field.ringType (Num.RealField.fieldType R)) x (@GRing.inv (Num.NumDomain.unitRingType (Num.RealField.numDomainType R)) y)) (GRing.one (Num.RealField.ringType R))), @eq (Num.RealField.sort R) x y *) by rewrite (can2_eq (mulrVK _) (mulrK _)) ?unitfE ?(gtr_eqF hy) // mul1r=> /eqP. Qed. Lemma nexpIrz n (n0 : n != 0) : {in <= 0 &, injective ((@exprz R)^~ n)}. Proof. (* Goal: @prop_in2 (Num.NumDomain.sort (Num.RealField.numDomainType R)) (@mem (Num.NumDomain.sort (Num.RealField.numDomainType R)) (predPredType (Num.NumDomain.sort (Num.RealField.numDomainType R))) (@rel_of_simpl_rel (Num.NumDomain.sort (Num.RealField.numDomainType R)) (@Num.Def.ger (Num.RealField.numDomainType R)) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))))) (fun x1 x2 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => forall _ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) ((fun x : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x n) x1) ((fun x : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x n) x2), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x1 x2) (inPhantom (@injective (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (GRing.UnitRing.sort (Num.RealField.unitRingType R)) (fun x : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x n))) *) move=> x y; rewrite ![_ \in _]ler_eqVlt => /orP [/eqP -> _ /eqP|hx]. (* Goal: forall (_ : is_true (orb (@eq_op (Num.NumDomain.eqType (Num.RealField.numDomainType R)) y (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R)))) (@Num.Def.ltr (Num.RealField.numDomainType R) y (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R)))))) (_ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.RealField.unitRingType R) y n)), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x y *) (* Goal: forall _ : is_true (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) n) (@exprz (Num.RealField.unitRingType R) y n)), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) y *) by rewrite exp0rz ?(negPf n0) eq_sym expfz_eq0=> /andP [_ /eqP->]. (* Goal: forall (_ : is_true (orb (@eq_op (Num.NumDomain.eqType (Num.RealField.numDomainType R)) y (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R)))) (@Num.Def.ltr (Num.RealField.numDomainType R) y (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R)))))) (_ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.RealField.unitRingType R) y n)), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x y *) case/orP=> [/eqP -> /eqP|hy]. (* Goal: forall _ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.RealField.unitRingType R) y n), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x y *) (* Goal: forall _ : is_true (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.RealField.unitRingType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) n)), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) *) by rewrite exp0rz ?(negPf n0) expfz_eq0=> /andP [_ /eqP]. (* Goal: forall _ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.RealField.unitRingType R) y n), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x y *) move=> /(f_equal ( *%R^~ (y ^ (- n)))) /eqP. (* Goal: forall _ : is_true (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (Num.NumDomain.unitRingType (Num.RealField.numDomainType R)))) (@GRing.mul (GRing.UnitRing.ringType (Num.NumDomain.unitRingType (Num.RealField.numDomainType R))) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.NumDomain.unitRingType (Num.RealField.numDomainType R)) y (@GRing.opp int_ZmodType n))) (@GRing.mul (GRing.UnitRing.ringType (Num.NumDomain.unitRingType (Num.RealField.numDomainType R))) (@exprz (Num.RealField.unitRingType R) y n) (@exprz (Num.NumDomain.unitRingType (Num.RealField.numDomainType R)) y (@GRing.opp int_ZmodType n)))), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x y *) rewrite -expfzDr ?(ltr_eqF hy) // subrr expr0z -exprz_inv -expfzMl. (* Goal: forall _ : is_true (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (Num.NumDomain.unitRingType (Num.RealField.numDomainType R)))) (@exprz (GRing.Field.unitRingType (Num.RealField.fieldType R)) (@GRing.mul (GRing.Field.ringType (Num.RealField.fieldType R)) x (@GRing.inv (Num.NumDomain.unitRingType (Num.RealField.numDomainType R)) y)) n) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType (Num.RealField.fieldType R))))), @eq (GRing.UnitRing.sort (Num.RealField.unitRingType R)) x y *) rewrite pexprz_eq1 ?(negPf n0) /= ?mulr_le0 ?invr_le0 ?ltrW //. (* Goal: forall _ : is_true (@eq_op (Num.RealField.eqType R) (@GRing.mul (GRing.Field.ringType (Num.RealField.fieldType R)) x (@GRing.inv (Num.NumDomain.unitRingType (Num.RealField.numDomainType R)) y)) (GRing.one (Num.RealField.ringType R))), @eq (Num.RealField.sort R) x y *) by rewrite (can2_eq (mulrVK _) (mulrK _)) ?unitfE ?(ltr_eqF hy) // mul1r=> /eqP. Qed. Lemma ler_pexpz2r n (hn : 0 < n) : {in >= 0 & , {mono ((@exprz R)^~ n) : x y / x <= y}}. Lemma ltr_pexpz2r n (hn : 0 < n) : {in >= 0 & , {mono ((@exprz R)^~ n) : x y / x < y}}. Proof. (* Goal: @prop_in2 (Num.NumDomain.sort (Num.RealField.numDomainType R)) (@mem (Num.NumDomain.sort (Num.RealField.numDomainType R)) (predPredType (Num.NumDomain.sort (Num.RealField.numDomainType R))) (@Num.Def.ler (Num.RealField.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))))) (fun x y : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @eq bool ((fun x0 y0 : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => @Num.Def.ltr (Num.RealField.numDomainType R) x0 y0) ((fun x0 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x0 n) x) ((fun x0 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x0 n) y)) ((fun x0 y0 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @Num.Def.ltr (Num.RealField.numDomainType R) x0 y0) x y)) (inPhantom (@monomorphism_2 (GRing.UnitRing.sort (Num.RealField.unitRingType R)) (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) bool (fun x : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x n) (fun x y : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @Num.Def.ltr (Num.RealField.numDomainType R) x y) (fun x y : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => @Num.Def.ltr (Num.RealField.numDomainType R) x y))) *) exact: lerW_mono_in (ler_pexpz2r _). Qed. Lemma ler_nexpz2r n (hn : n < 0) : {in > 0 & , {mono ((@exprz R)^~ n) : x y /~ x <= y}}. Lemma ltr_nexpz2r n (hn : n < 0) : {in > 0 & , {mono ((@exprz R)^~ n) : x y /~ x < y}}. Proof. (* Goal: @prop_in2 (Num.NumDomain.sort (Num.RealField.numDomainType R)) (@mem (Num.NumDomain.sort (Num.RealField.numDomainType R)) (predPredType (Num.NumDomain.sort (Num.RealField.numDomainType R))) (@Num.Def.ltr (Num.RealField.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))))) (fun x y : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @eq bool ((fun x0 y0 : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => @Num.Def.ltr (Num.RealField.numDomainType R) x0 y0) ((fun x0 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x0 n) x) ((fun x0 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x0 n) y)) ((fun y0 x0 : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @Num.Def.ltr (Num.RealField.numDomainType R) x0 y0) x y)) (inPhantom (@monomorphism_2 (GRing.UnitRing.sort (Num.RealField.unitRingType R)) (GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) bool (fun x : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @exprz (Num.RealField.unitRingType R) x n) (fun y x : GRing.UnitRing.sort (Num.RealField.unitRingType R) => @Num.Def.ltr (Num.RealField.numDomainType R) x y) (fun x y : GRing.Ring.sort (GRing.UnitRing.ringType (Num.RealField.unitRingType R)) => @Num.Def.ltr (Num.RealField.numDomainType R) x y))) *) exact: lerW_nmono_in (ler_nexpz2r _). Qed. Lemma eqr_expz2 n x y : n != 0 -> 0 <= x -> 0 <= y -> (x ^ n == y ^ n) = (x == y). Proof. (* Goal: forall (_ : is_true (negb (@eq_op int_eqType n (GRing.zero int_ZmodType)))) (_ : is_true (@Num.Def.ler (Num.RealField.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) x)) (_ : is_true (@Num.Def.ler (Num.RealField.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealField.numDomainType R))) y)), @eq bool (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (Num.RealField.unitRingType R))) (@exprz (Num.RealField.unitRingType R) x n) (@exprz (Num.RealField.unitRingType R) y n)) (@eq_op (Num.RealField.eqType R) x y) *) by move=> *; rewrite (inj_in_eq (pexpIrz _)). Qed. End ExprzOrder. Local Notation sgr := Num.sg. Section Sgz. Variable R : numDomainType. Implicit Types x y z : R. Implicit Types m n p : int. Local Coercion Posz : nat >-> int. Definition sgz x : int := if x == 0 then 0 else if x < 0 then -1 else 1. Lemma sgz_def x : sgz x = (-1) ^+ (x < 0)%R *+ (x != 0). Proof. (* Goal: @eq int (sgz x) (@GRing.natmul (GRing.Ring.zmodType int_Ring) (@GRing.exp int_Ring (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) (nat_of_bool (@Num.Def.ltr R x (GRing.zero (Num.NumDomain.zmodType R))))) (nat_of_bool (negb (@eq_op (Num.NumDomain.eqType R) x (GRing.zero (Num.NumDomain.zmodType R)))))) *) by rewrite /sgz; case: (_ == _); case: (_ < _). Qed. Lemma gtr0_sgz x : 0 < x -> sgz x = 1. Proof. (* Goal: forall _ : is_true (@Num.Def.ltr R (GRing.zero (Num.NumDomain.zmodType R)) x), @eq int (sgz x) (GRing.one int_Ring) *) by move=> x_gt0; rewrite /sgz ltr_neqAle andbC eqr_le ltr_geF //. Qed. Lemma ltr0_sgz x : x < 0 -> sgz x = -1. Proof. (* Goal: forall _ : is_true (@Num.Def.ltr R x (GRing.zero (Num.NumDomain.zmodType R))), @eq int (sgz x) (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) *) by move=> x_lt0; rewrite /sgz eq_sym eqr_le x_lt0 ltr_geF. Qed. Lemma sgz1 : sgz (1 : R) = 1. Proof. by rewrite gtr0_sgz // ltr01. Qed. Proof. (* Goal: @eq int (sgz (GRing.one (Num.NumDomain.ringType R) : Num.NumDomain.sort R)) (GRing.one int_Ring) *) by rewrite gtr0_sgz // ltr01. Qed. Definition sgzE := (sgz0, sgz1, sgzN1). Lemma sgz_sgr x : sgz (sgr x) = sgz x. Proof. (* Goal: @eq int (sgz (@Num.Def.sgr R x)) (sgz x) *) by rewrite !(fun_if sgz) !sgzE. Qed. Lemma normr_sgz x : `|sgz x| = (x != 0). Proof. (* Goal: @eq (Num.NumDomain.sort int_numDomainType) (@Num.Def.normr int_numDomainType (sgz x)) (Posz (nat_of_bool (negb (@eq_op (Num.NumDomain.eqType R) x (GRing.zero (Num.NumDomain.zmodType R)))))) *) by rewrite sgz_def -mulr_natr normrMsign normr_nat natz. Qed. Lemma normr_sg x : `|sgr x| = (x != 0)%:~R. Proof. (* Goal: @eq (Num.NumDomain.sort R) (@Num.Def.normr R (@Num.Def.sgr R x)) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) (Posz (nat_of_bool (negb (@eq_op (Num.NumDomain.eqType R) x (GRing.zero (Num.NumDomain.zmodType R))))))) *) by rewrite sgr_def -mulr_natr normrMsign normr_nat. Qed. End Sgz. Section MoreSgz. Variable R : numDomainType. Lemma sgz_int m : sgz (m%:~R : R) = sgz m. Proof. (* Goal: @eq int (@sgz R (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) m : Num.NumDomain.sort R)) (@sgz int_numDomainType m) *) by rewrite /sgz intr_eq0 ltrz0. Qed. Lemma intr_sg m : (sgr m)%:~R = sgr (m%:~R) :> R. Proof. (* Goal: @eq (Num.NumDomain.sort R) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) (@Num.Def.sgr int_numDomainType m)) (@Num.Def.sgr R (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) m)) *) by rewrite sgrz -sgz_int -sgrEz. Qed. Lemma sgz_id (x : R) : sgz (sgz x) = sgz x. Proof. (* Goal: @eq int (@sgz int_numDomainType (@sgz R x)) (@sgz R x) *) by rewrite !(fun_if (@sgz _)). Qed. End MoreSgz. Section SgzReal. Variable R : realDomainType. Implicit Types x y z : R. Implicit Types m n p : int. Local Coercion Posz : nat >-> int. Lemma sgz_cp0 x : ((sgz x == 1) = (0 < x)) * ((sgz x == -1) = (x < 0)) * ((sgz x == 0) = (x == 0)). Proof. (* Goal: prod (prod (@eq bool (@eq_op int_eqType (@sgz (Num.RealDomain.numDomainType R) x) (GRing.one int_Ring)) (@Num.Def.ltr (Num.RealDomain.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) x)) (@eq bool (@eq_op int_eqType (@sgz (Num.RealDomain.numDomainType R) x) (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) x (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R)))))) (@eq bool (@eq_op int_eqType (@sgz (Num.RealDomain.numDomainType R) x) (GRing.zero int_ZmodType)) (@eq_op (Num.RealDomain.eqType R) x (GRing.zero (Num.RealDomain.zmodType R)))) *) by rewrite /sgz; case: ltrgtP. Qed. Variant sgz_val x : bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> R -> R -> int -> Set := | SgzNull of x = 0 : sgz_val x true true true true false false true false false true false false true false false true false false 0 0 0 | SgzPos of x > 0 : sgz_val x false false true false false true false false true false false true false false true false false true x 1 1 | SgzNeg of x < 0 : sgz_val x false true false false true false false true false false true false false true false false true false (-x) (-1) (-1). Lemma sgzP x : sgz_val x (0 == x) (x <= 0) (0 <= x) (x == 0) (x < 0) (0 < x) (0 == sgr x) (-1 == sgr x) (1 == sgr x) (sgr x == 0) (sgr x == -1) (sgr x == 1) (0 == sgz x) (-1 == sgz x) (1 == sgz x) (sgz x == 0) (sgz x == -1) (sgz x == 1) `|x| (sgr x) (sgz x). Proof. (* Goal: sgz_val x (@eq_op (GRing.Zmodule.eqType (Num.RealDomain.zmodType R)) (GRing.zero (Num.RealDomain.zmodType R)) x) (@Num.Def.ler (Num.RealDomain.numDomainType R) x (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R)))) (@Num.Def.ler (Num.RealDomain.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) x) (@eq_op (Num.RealDomain.eqType R) x (GRing.zero (Num.RealDomain.zmodType R))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) x (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R)))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) x) (@eq_op (GRing.Zmodule.eqType (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) (@Num.Def.sgr (Num.RealDomain.numDomainType R) x)) (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (Num.NumDomain.ringType (Num.RealDomain.numDomainType R)))) (@GRing.opp (GRing.Ring.zmodType (Num.NumDomain.ringType (Num.RealDomain.numDomainType R))) (GRing.one (Num.NumDomain.ringType (Num.RealDomain.numDomainType R)))) (@Num.Def.sgr (Num.RealDomain.numDomainType R) x)) (@eq_op (GRing.Ring.eqType (Num.NumDomain.ringType (Num.RealDomain.numDomainType R))) (GRing.one (Num.NumDomain.ringType (Num.RealDomain.numDomainType R))) (@Num.Def.sgr (Num.RealDomain.numDomainType R) x)) (@eq_op (Num.NumDomain.eqType (Num.RealDomain.numDomainType R)) (@Num.Def.sgr (Num.RealDomain.numDomainType R) x) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R)))) (@eq_op (Num.NumDomain.eqType (Num.RealDomain.numDomainType R)) (@Num.Def.sgr (Num.RealDomain.numDomainType R) x) (@GRing.opp (GRing.Ring.zmodType (Num.NumDomain.ringType (Num.RealDomain.numDomainType R))) (GRing.one (Num.NumDomain.ringType (Num.RealDomain.numDomainType R))))) (@eq_op (Num.NumDomain.eqType (Num.RealDomain.numDomainType R)) (@Num.Def.sgr (Num.RealDomain.numDomainType R) x) (GRing.one (Num.NumDomain.ringType (Num.RealDomain.numDomainType R)))) (@eq_op (GRing.Zmodule.eqType int_ZmodType) (GRing.zero int_ZmodType) (@sgz (Num.RealDomain.numDomainType R) x)) (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType int_Ring)) (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) (@sgz (Num.RealDomain.numDomainType R) x)) (@eq_op (GRing.Ring.eqType int_Ring) (GRing.one int_Ring) (@sgz (Num.RealDomain.numDomainType R) x)) (@eq_op int_eqType (@sgz (Num.RealDomain.numDomainType R) x) (GRing.zero int_ZmodType)) (@eq_op int_eqType (@sgz (Num.RealDomain.numDomainType R) x) (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring))) (@eq_op int_eqType (@sgz (Num.RealDomain.numDomainType R) x) (GRing.one int_Ring)) (@Num.Def.normr (Num.RealDomain.numDomainType R) x) (@Num.Def.sgr (Num.RealDomain.numDomainType R) x) (@sgz (Num.RealDomain.numDomainType R) x) *) rewrite ![_ == sgz _]eq_sym ![_ == sgr _]eq_sym !sgr_cp0 !sgz_cp0. (* Goal: sgz_val x (@eq_op (GRing.Zmodule.eqType (Num.RealDomain.zmodType R)) (GRing.zero (Num.RealDomain.zmodType R)) x) (@Num.Def.ler (Num.RealDomain.numDomainType R) x (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R)))) (@Num.Def.ler (Num.RealDomain.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) x) (@eq_op (Num.RealDomain.eqType R) x (GRing.zero (Num.RealDomain.zmodType R))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) x (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R)))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) x) (@eq_op (Num.RealDomain.eqType R) x (GRing.zero (Num.RealDomain.zmodType R))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) x (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R)))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) x) (@eq_op (Num.RealDomain.eqType R) x (GRing.zero (Num.RealDomain.zmodType R))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) x (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R)))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) x) (@eq_op (Num.RealDomain.eqType R) x (GRing.zero (Num.RealDomain.zmodType R))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) x (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R)))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) x) (@eq_op (Num.RealDomain.eqType R) x (GRing.zero (Num.RealDomain.zmodType R))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) x (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R)))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) x) (@Num.Def.normr (Num.RealDomain.numDomainType R) x) (@Num.Def.sgr (Num.RealDomain.numDomainType R) x) (@sgz (Num.RealDomain.numDomainType R) x) *) by rewrite /sgr /sgz !lerNgt; case: ltrgt0P; constructor. Qed. Lemma sgzN x : sgz (- x) = - sgz x. Proof. (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.opp (Num.RealDomain.zmodType R) x)) (@GRing.opp int_ZmodType (@sgz (Num.RealDomain.numDomainType R) x)) *) by rewrite /sgz oppr_eq0 oppr_lt0; case: ltrgtP. Qed. Lemma mulz_sg x : sgz x * sgz x = (x != 0)%:~R. Proof. (* Goal: @eq (GRing.Ring.sort int_Ring) (@GRing.mul int_Ring (@sgz (Num.RealDomain.numDomainType R) x) (@sgz (Num.RealDomain.numDomainType R) x)) (@intmul (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring) (Posz (nat_of_bool (negb (@eq_op (Num.RealDomain.eqType R) x (GRing.zero (Num.RealDomain.zmodType R))))))) *) by case: sgzP; rewrite ?(mulr0, mulr1, mulrNN). Qed. Lemma mulz_sg_eq1 x y : (sgz x * sgz y == 1) = (x != 0) && (sgz x == sgz y). Proof. (* Goal: @eq bool (@eq_op (GRing.Ring.eqType int_Ring) (@GRing.mul int_Ring (@sgz (Num.RealDomain.numDomainType R) x) (@sgz (Num.RealDomain.numDomainType R) y)) (GRing.one int_Ring)) (andb (negb (@eq_op (Num.RealDomain.eqType R) x (GRing.zero (Num.RealDomain.zmodType R)))) (@eq_op int_eqType (@sgz (Num.RealDomain.numDomainType R) x) (@sgz (Num.RealDomain.numDomainType R) y))) *) do 2?case: sgzP=> _; rewrite ?(mulr0, mulr1, mulrN1, opprK, oppr0, eqxx); by rewrite ?[0 == 1]eq_sym ?oner_eq0 //= eqr_oppLR oppr0 oner_eq0. Qed. Lemma mulz_sg_eqN1 x y : (sgz x * sgz y == -1) = (x != 0) && (sgz x == - sgz y). Proof. (* Goal: @eq bool (@eq_op (GRing.Ring.eqType int_Ring) (@GRing.mul int_Ring (@sgz (Num.RealDomain.numDomainType R) x) (@sgz (Num.RealDomain.numDomainType R) y)) (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring))) (andb (negb (@eq_op (Num.RealDomain.eqType R) x (GRing.zero (Num.RealDomain.zmodType R)))) (@eq_op int_eqType (@sgz (Num.RealDomain.numDomainType R) x) (@GRing.opp int_ZmodType (@sgz (Num.RealDomain.numDomainType R) y)))) *) by rewrite -eqr_oppLR -mulrN -sgzN mulz_sg_eq1. Qed. Lemma sgzM x y : sgz (x * y) = sgz x * sgz y. Proof. (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.mul (Num.RealDomain.ringType R) x y)) (@GRing.mul int_Ring (@sgz (Num.RealDomain.numDomainType R) x) (@sgz (Num.RealDomain.numDomainType R) y)) *) case: (sgzP x)=> hx; first by rewrite hx ?mul0r sgz0. (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.mul (Num.RealDomain.ringType R) x y)) (@GRing.mul int_Ring (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) (@sgz (Num.RealDomain.numDomainType R) y)) *) (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.mul (Num.RealDomain.ringType R) x y)) (@GRing.mul int_Ring (GRing.one int_Ring) (@sgz (Num.RealDomain.numDomainType R) y)) *) case: (sgzP y)=> hy; first by rewrite hy !mulr0 sgz0. (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.mul (Num.RealDomain.ringType R) x y)) (@GRing.mul int_Ring (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) (@sgz (Num.RealDomain.numDomainType R) y)) *) (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.mul (Num.RealDomain.ringType R) x y)) (@GRing.mul int_Ring (GRing.one int_Ring) (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring))) *) (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.mul (Num.RealDomain.ringType R) x y)) (@GRing.mul int_Ring (GRing.one int_Ring) (GRing.one int_Ring)) *) by apply/eqP; rewrite mul1r sgz_cp0 pmulr_rgt0. (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.mul (Num.RealDomain.ringType R) x y)) (@GRing.mul int_Ring (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) (@sgz (Num.RealDomain.numDomainType R) y)) *) (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.mul (Num.RealDomain.ringType R) x y)) (@GRing.mul int_Ring (GRing.one int_Ring) (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring))) *) by apply/eqP; rewrite mul1r sgz_cp0 nmulr_llt0. (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.mul (Num.RealDomain.ringType R) x y)) (@GRing.mul int_Ring (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) (@sgz (Num.RealDomain.numDomainType R) y)) *) case: (sgzP y)=> hy; first by rewrite hy !mulr0 sgz0. (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.mul (Num.RealDomain.ringType R) x y)) (@GRing.mul int_Ring (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring))) *) (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.mul (Num.RealDomain.ringType R) x y)) (@GRing.mul int_Ring (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) (GRing.one int_Ring)) *) by apply/eqP; rewrite mulr1 sgz_cp0 nmulr_rlt0. (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.mul (Num.RealDomain.ringType R) x y)) (@GRing.mul int_Ring (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring))) *) by apply/eqP; rewrite mulN1r opprK sgz_cp0 nmulr_rgt0. Qed. Lemma sgzX (n : nat) x : sgz (x ^+ n) = (sgz x) ^+ n. Proof. (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@GRing.exp (Num.RealDomain.ringType R) x n)) (@GRing.exp int_Ring (@sgz (Num.RealDomain.numDomainType R) x) n) *) by elim: n => [|n IHn]; rewrite ?sgz1 // !exprS sgzM IHn. Qed. Lemma sgz_eq0 x : (sgz x == 0) = (x == 0). Proof. (* Goal: @eq bool (@eq_op int_eqType (@sgz (Num.RealDomain.numDomainType R) x) (GRing.zero int_ZmodType)) (@eq_op (Num.RealDomain.eqType R) x (GRing.zero (Num.RealDomain.zmodType R))) *) by rewrite sgz_cp0. Qed. Lemma sgz_odd (n : nat) x : x != 0 -> (sgz x) ^+ n = (sgz x) ^+ (odd n). Proof. (* Goal: forall _ : is_true (negb (@eq_op (Num.RealDomain.eqType R) x (GRing.zero (Num.RealDomain.zmodType R)))), @eq (GRing.Ring.sort int_Ring) (@GRing.exp int_Ring (@sgz (Num.RealDomain.numDomainType R) x) n) (@GRing.exp int_Ring (@sgz (Num.RealDomain.numDomainType R) x) (nat_of_bool (odd n))) *) by case: sgzP => //=; rewrite ?expr1n // signr_odd. Qed. Lemma sgz_gt0 x : (sgz x > 0) = (x > 0). Proof. (* Goal: @eq bool (@Num.Def.ltr int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) (@sgz (Num.RealDomain.numDomainType R) x)) (@Num.Def.ltr (Num.RealDomain.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) x) *) by case: sgzP. Qed. Lemma sgz_lt0 x : (sgz x < 0) = (x < 0). Proof. (* Goal: @eq bool (@Num.Def.ltr int_numDomainType (@sgz (Num.RealDomain.numDomainType R) x) (GRing.zero (Num.NumDomain.zmodType int_numDomainType))) (@Num.Def.ltr (Num.RealDomain.numDomainType R) x (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R)))) *) by case: sgzP. Qed. Lemma sgz_ge0 x : (sgz x >= 0) = (x >= 0). Proof. (* Goal: @eq bool (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) (@sgz (Num.RealDomain.numDomainType R) x)) (@Num.Def.ler (Num.RealDomain.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) x) *) by case: sgzP. Qed. Lemma sgz_le0 x : (sgz x <= 0) = (x <= 0). Proof. (* Goal: @eq bool (@Num.Def.ler int_numDomainType (@sgz (Num.RealDomain.numDomainType R) x) (GRing.zero (Num.NumDomain.zmodType int_numDomainType))) (@Num.Def.ler (Num.RealDomain.numDomainType R) x (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R)))) *) by case: sgzP. Qed. Lemma sgz_smul x y : sgz (y *~ (sgz x)) = (sgz x) * (sgz y). Proof. (* Goal: @eq int (@sgz (Num.RealDomain.numDomainType R) (@intmul (Num.RealDomain.zmodType R) y (@sgz (Num.RealDomain.numDomainType R) x))) (@GRing.mul int_Ring (@sgz (Num.RealDomain.numDomainType R) x) (@sgz (Num.RealDomain.numDomainType R) y)) *) by rewrite -mulrzl sgzM -sgrEz sgz_sgr. Qed. Lemma sgrMz m x : sgr (x *~ m) = sgr x *~ sgr m. Proof. (* Goal: @eq (Num.NumDomain.sort (Num.RealDomain.numDomainType R)) (@Num.Def.sgr (Num.RealDomain.numDomainType R) (@intmul (Num.RealDomain.zmodType R) x m)) (@intmul (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R)) (@Num.Def.sgr (Num.RealDomain.numDomainType R) x) (@Num.Def.sgr int_numDomainType m)) *) by rewrite -mulrzr sgrM -intr_sg mulrzr. Qed. End SgzReal. Lemma sgz_eq (R R' : realDomainType) (x : R) (y : R') : (sgz x == sgz y) = ((x == 0) == (y == 0)) && ((0 < x) == (0 < y)). Proof. (* Goal: @eq bool (@eq_op int_eqType (@sgz (Num.RealDomain.numDomainType R) x) (@sgz (Num.RealDomain.numDomainType R') y)) (andb (@eq_op bool_eqType (@eq_op (Num.RealDomain.eqType R) x (GRing.zero (Num.RealDomain.zmodType R))) (@eq_op (Num.RealDomain.eqType R') y (GRing.zero (Num.RealDomain.zmodType R')))) (@eq_op bool_eqType (@Num.Def.ltr (Num.RealDomain.numDomainType R) (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R))) x) (@Num.Def.ltr (Num.RealDomain.numDomainType R') (GRing.zero (Num.NumDomain.zmodType (Num.RealDomain.numDomainType R'))) y))) *) by do 2!case: sgzP. Qed. Lemma intr_sign (R : ringType) s : ((-1) ^+ s)%:~R = (-1) ^+ s :> R. Proof. (* Goal: @eq (GRing.Ring.sort R) (@intmul (GRing.Ring.zmodType R) (GRing.one R) (@GRing.exp int_Ring (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) s)) (@GRing.exp R (@GRing.opp (GRing.Ring.zmodType R) (GRing.one R)) s) *) exact: rmorph_sign. Qed. Lemma abszE (m : int) : `|m| = `|m|%R :> int. Proof. by []. Qed. Proof. (* Goal: @eq int (Posz (absz m)) (@Num.Def.normr int_numDomainType m) *) by []. Qed. Lemma abszN m : `|- m| = `|m|. Proof. by case: (normrN m). Qed. Proof. (* Goal: @eq nat (absz (@GRing.opp int_ZmodType (Posz n))) n *) by case: n. Qed. Lemma absz_gt0 m : (`|m| > 0) = (m != 0%R). Proof. by case: (intP m). Qed. Proof. (* Goal: @eq bool (leq (S O) (absz m)) (negb (@eq_op int_eqType m (GRing.zero int_ZmodType))) *) by case: (intP m). Qed. Lemma abszN1 : `|-1%R| = 1. Proof. by []. Qed. Proof. (* Goal: @eq nat (absz (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring))) (S O) *) by []. Qed. Lemma abszM m1 m2 : `|(m1 * m2)%R| = `|m1| * `|m2|. Proof. (* Goal: @eq nat (absz (@GRing.mul int_Ring m1 m2)) (muln (absz m1) (absz m2)) *) by case: m1 m2 => [[|m1]|m1] [[|m2]|m2]; rewrite //= mulnS mulnC. Qed. Lemma abszX (n : nat) m : `|m ^+ n| = `|m| ^ n. Proof. (* Goal: @eq nat (absz (@GRing.exp int_Ring m n)) (expn (absz m) n) *) by elim: n => // n ihn; rewrite exprS expnS abszM ihn. Qed. Lemma gez0_abs m : (0 <= m)%R -> `|m| = m :> int. Proof. (* Goal: forall _ : is_true (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) m), @eq int (Posz (absz m)) m *) by case: (intP m). Qed. Lemma gtz0_abs m : (0 < m)%R -> `|m| = m :> int. Proof. (* Goal: forall _ : is_true (@Num.Def.ltr int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) m), @eq int (Posz (absz m)) m *) by case: (intP m). Qed. Lemma lez0_abs m : (m <= 0)%R -> `|m| = - m :> int. Proof. (* Goal: forall _ : is_true (@Num.Def.ler int_numDomainType m (GRing.zero (Num.NumDomain.zmodType int_numDomainType))), @eq int (Posz (absz m)) (@GRing.opp int_ZmodType m) *) by case: (intP m). Qed. Lemma ltz0_abs m : (m < 0)%R -> `|m| = - m :> int. Proof. (* Goal: forall _ : is_true (@Num.Def.ltr int_numDomainType m (GRing.zero (Num.NumDomain.zmodType int_numDomainType))), @eq int (Posz (absz m)) (@GRing.opp int_ZmodType m) *) by case: (intP m). Qed. Lemma absz_sign s : `|(-1) ^+ s| = 1. Proof. (* Goal: @eq nat (absz (@GRing.exp int_Ring (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) s)) (S O) *) by rewrite abszX exp1n. Qed. Lemma abszMsign s m : `|((-1) ^+ s * m)%R| = `|m|. Proof. (* Goal: @eq nat (absz (@GRing.mul int_Ring (@GRing.exp int_Ring (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) s) m)) (absz m) *) by rewrite abszM absz_sign mul1n. Qed. Lemma mulz_sign_abs m : ((-1) ^+ (m < 0)%R * `|m|%:Z)%R = m. Proof. (* Goal: @eq (GRing.Ring.sort int_Ring) (@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 m (GRing.zero (Num.NumDomain.zmodType int_numDomainType))))) (Posz (absz m))) m *) by rewrite abszE mulr_sign_norm. Qed. Lemma mulz_Nsign_abs m : ((-1) ^+ (0 < m)%R * `|m|%:Z)%R = - m. Proof. (* Goal: @eq (GRing.Ring.sort int_Ring) (@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 (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) m))) (Posz (absz m))) (@GRing.opp int_ZmodType m) *) by rewrite abszE mulr_Nsign_norm. Qed. Lemma intEsign m : m = ((-1) ^+ (m < 0)%R * `|m|%:Z)%R. Proof. (* Goal: @eq int m (@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 m (GRing.zero (Num.NumDomain.zmodType int_numDomainType))))) (Posz (absz m))) *) exact: numEsign. Qed. Lemma abszEsign m : `|m|%:Z = ((-1) ^+ (m < 0)%R * m)%R. Proof. (* Goal: @eq int (Posz (absz m)) (@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 m (GRing.zero (Num.NumDomain.zmodType int_numDomainType))))) m) *) exact: normrEsign. Qed. Lemma intEsg m : m = (sgz m * `|m|%:Z)%R. Proof. (* Goal: @eq int m (@GRing.mul int_Ring (@sgz int_numDomainType m) (Posz (absz m))) *) by rewrite -sgrz -numEsg. Qed. Lemma abszEsg m : (`|m|%:Z = sgz m * m)%R. Proof. (* Goal: @eq int (Posz (absz m)) (@GRing.mul int_Ring (@sgz int_numDomainType m) m) *) by rewrite -sgrz -normrEsg. Qed. End Absz. Module Export IntDist. Notation "m - n" := (@GRing.add int_ZmodType m%N (@GRing.opp int_ZmodType n%N)) : distn_scope. Arguments absz m%distn_scope. Notation "`| m |" := (absz m) : nat_scope. Coercion Posz : nat >-> int. Section Distn. Open Scope nat_scope. Implicit Type m : int. Implicit Types n d : nat. Lemma distnC m1 m2 : `|m1 - m2| = `|m2 - m1|. Proof. (* Goal: @eq nat (absz (@GRing.add int_ZmodType m1 (@GRing.opp int_ZmodType m2))) (absz (@GRing.add int_ZmodType m2 (@GRing.opp int_ZmodType m1))) *) by rewrite -opprB abszN. Qed. Lemma distnDl d n1 n2 : `|d + n1 - (d + n2)| = `|n1 - n2|. Proof. (* Goal: @eq nat (absz (@GRing.add int_ZmodType (Posz (addn d n1)) (@GRing.opp int_ZmodType (Posz (addn d n2))))) (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) *) by rewrite !PoszD opprD addrCA -addrA addKr. Qed. Lemma distnDr d n1 n2 : `|n1 + d - (n2 + d)| = `|n1 - n2|. Proof. (* Goal: @eq nat (absz (@GRing.add int_ZmodType (Posz (addn n1 d)) (@GRing.opp int_ZmodType (Posz (addn n2 d))))) (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) *) by rewrite -!(addnC d) distnDl. Qed. Lemma distnEr n1 n2 : n1 <= n2 -> `|n1 - n2| = n2 - n1. Proof. (* Goal: forall _ : is_true (leq n1 n2), @eq nat (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (subn n2 n1) *) by move/subnK=> {1}<-; rewrite distnC PoszD addrK absz_nat. Qed. Lemma distnEl n1 n2 : n2 <= n1 -> `|n1 - n2| = n1 - n2. Proof. (* Goal: forall _ : is_true (leq n2 n1), @eq nat (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (subn n1 n2) *) by move/distnEr <-; rewrite distnC. Qed. Lemma distn0 n : `|n - 0| = n. Proof. (* Goal: @eq nat (absz (@GRing.add int_ZmodType (Posz n) (@GRing.opp int_ZmodType (Posz O)))) n *) by rewrite subr0 absz_nat. Qed. Lemma dist0n n : `|0 - n| = n. Proof. (* Goal: @eq nat (absz (@GRing.add int_ZmodType (Posz O) (@GRing.opp int_ZmodType (Posz n)))) n *) by rewrite distnC distn0. Qed. Lemma distnn m : `|m - m| = 0. Proof. (* Goal: @eq nat (absz (@GRing.add int_ZmodType m (@GRing.opp int_ZmodType m))) O *) by rewrite subrr. Qed. Lemma distn_eq0 n1 n2 : (`|n1 - n2| == 0) = (n1 == n2). Proof. (* Goal: @eq bool (@eq_op nat_eqType (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) O) (@eq_op nat_eqType n1 n2) *) by rewrite absz_eq0 subr_eq0. Qed. Lemma distnS n : `|n - n.+1| = 1. Proof. (* Goal: @eq nat (absz (@GRing.add int_ZmodType (Posz n) (@GRing.opp int_ZmodType (Posz (S n))))) (S O) *) exact: distnDr n 0 1. Qed. Lemma distSn n : `|n.+1 - n| = 1. Proof. (* Goal: @eq nat (absz (@GRing.add int_ZmodType (Posz (S n)) (@GRing.opp int_ZmodType (Posz n)))) (S O) *) exact: distnDr n 1 0. Qed. Lemma distn_eq1 n1 n2 : (`|n1 - n2| == 1) = (if n1 < n2 then n1.+1 == n2 else n1 == n2.+1). Proof. (* Goal: @eq bool (@eq_op nat_eqType (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (S O)) (if leq (S n1) n2 then @eq_op nat_eqType (S n1) n2 else @eq_op nat_eqType n1 (S n2)) *) case: ltnP => [lt_n12 | le_n21]. (* Goal: @eq bool (@eq_op nat_eqType (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (S O)) (@eq_op nat_eqType n1 (S n2)) *) (* Goal: @eq bool (@eq_op nat_eqType (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (S O)) (@eq_op nat_eqType (S n1) n2) *) by rewrite eq_sym -(eqn_add2r n1) distnEr ?subnK // ltnW. (* Goal: @eq bool (@eq_op nat_eqType (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (S O)) (@eq_op nat_eqType n1 (S n2)) *) by rewrite -(eqn_add2r n2) distnEl ?subnK. Qed. Lemma leq_add_dist m1 m2 m3 : `|m1 - m3| <= `|m1 - m2| + `|m2 - m3|. Proof. (* Goal: is_true (leq (absz (@GRing.add int_ZmodType m1 (@GRing.opp int_ZmodType m3))) (addn (absz (@GRing.add int_ZmodType m1 (@GRing.opp int_ZmodType m2))) (absz (@GRing.add int_ZmodType m2 (@GRing.opp int_ZmodType m3))))) *) by rewrite -lez_nat PoszD !abszE ler_dist_add. Qed. Lemma leqif_add_distz m1 m2 m3 : `|m1 - m3| <= `|m1 - m2| + `|m2 - m3| ?= iff (m1 <= m2 <= m3)%R || (m3 <= m2 <= m1)%R. Lemma leqif_add_dist n1 n2 n3 : `|n1 - n3| <= `|n1 - n2| + `|n2 - n3| ?= iff (n1 <= n2 <= n3) || (n3 <= n2 <= n1). Proof. (* Goal: leqif (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n3)))) (addn (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (absz (@GRing.add int_ZmodType (Posz n2) (@GRing.opp int_ZmodType (Posz n3))))) (orb (andb (leq n1 n2) (leq n2 n3)) (andb (leq n3 n2) (leq n2 n1))) *) exact: leqif_add_distz. Qed. Lemma sqrn_dist n1 n2 : `|n1 - n2| ^ 2 + 2 * (n1 * n2) = n1 ^ 2 + n2 ^ 2. Proof. (* Goal: @eq nat (addn (expn (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (S (S O))) (muln (S (S O)) (muln n1 n2))) (addn (expn n1 (S (S O))) (expn n2 (S (S O)))) *) wlog le_n21: n1 n2 / n2 <= n1. (* Goal: @eq nat (addn (expn (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (S (S O))) (muln (S (S O)) (muln n1 n2))) (addn (expn n1 (S (S O))) (expn n2 (S (S O)))) *) (* Goal: forall _ : forall (n1 n2 : nat) (_ : is_true (leq n2 n1)), @eq nat (addn (expn (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (S (S O))) (muln (S (S O)) (muln n1 n2))) (addn (expn n1 (S (S O))) (expn n2 (S (S O)))), @eq nat (addn (expn (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (S (S O))) (muln (S (S O)) (muln n1 n2))) (addn (expn n1 (S (S O))) (expn n2 (S (S O)))) *) move=> IH; case/orP: (leq_total n2 n1) => /IH //. (* Goal: @eq nat (addn (expn (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (S (S O))) (muln (S (S O)) (muln n1 n2))) (addn (expn n1 (S (S O))) (expn n2 (S (S O)))) *) (* Goal: forall _ : @eq nat (addn (expn (absz (@GRing.add int_ZmodType (Posz n2) (@GRing.opp int_ZmodType (Posz n1)))) (S (S O))) (muln (S (S O)) (muln n2 n1))) (addn (expn n2 (S (S O))) (expn n1 (S (S O)))), @eq nat (addn (expn (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (S (S O))) (muln (S (S O)) (muln n1 n2))) (addn (expn n1 (S (S O))) (expn n2 (S (S O)))) *) by rewrite (addnC (n2 ^ 2)) (mulnC n2) distnC. (* Goal: @eq nat (addn (expn (absz (@GRing.add int_ZmodType (Posz n1) (@GRing.opp int_ZmodType (Posz n2)))) (S (S O))) (muln (S (S O)) (muln n1 n2))) (addn (expn n1 (S (S O))) (expn n2 (S (S O)))) *) by rewrite distnEl ?sqrn_sub ?subnK ?nat_Cauchy. Qed. End Distn. End IntDist. Section NormInt. Variable R : numDomainType. Lemma intr_norm m : `|m|%:~R = `|m%:~R| :> R. Proof. (* Goal: @eq (Num.NumDomain.sort R) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) (@Num.Def.normr int_numDomainType m)) (@Num.Def.normr R (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) m)) *) by rewrite {2}[m]intEsign rmorphMsign normrMsign abszE normr_nat. Qed. Lemma normrMz m (x : R) : `|x *~ m| = `|x| *~ `|m|. Proof. (* Goal: @eq (Num.NumDomain.sort R) (@Num.Def.normr R (@intmul (Num.NumDomain.zmodType R) x m)) (@intmul (Num.NumDomain.zmodType R) (@Num.Def.normr R x) (@Num.Def.normr int_numDomainType m)) *) by rewrite -mulrzl normrM -intr_norm mulrzl. Qed. Lemma expN1r (i : int) : (-1 : R) ^ i = (-1) ^+ `|i|. Proof. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.NumDomain.unitRingType R))) (@exprz (Num.NumDomain.unitRingType R) (@GRing.opp (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R)) : Num.NumDomain.sort R) i) (@GRing.exp (GRing.UnitRing.ringType (Num.NumDomain.unitRingType R)) (@GRing.opp (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.NumDomain.unitRingType R))) (GRing.one (GRing.UnitRing.ringType (Num.NumDomain.unitRingType R)))) (absz i)) *) case: i => n; first by rewrite exprnP absz_nat. (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType (Num.NumDomain.unitRingType R))) (@exprz (Num.NumDomain.unitRingType R) (@GRing.opp (GRing.Ring.zmodType (Num.NumDomain.ringType R)) (GRing.one (Num.NumDomain.ringType R))) (Negz n)) (@GRing.exp (GRing.UnitRing.ringType (Num.NumDomain.unitRingType R)) (@GRing.opp (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.NumDomain.unitRingType R))) (GRing.one (GRing.UnitRing.ringType (Num.NumDomain.unitRingType R)))) (absz (Negz n))) *) by rewrite NegzE abszN absz_nat -invr_expz expfV invrN1. Qed. End NormInt. Section PolyZintRing. Variable R : ringType. Implicit Types x y z: R. Implicit Types m n : int. Implicit Types i j k : nat. Implicit Types p q r : {poly R}. Lemma coefMrz : forall p n i, (p *~ n)`_i = (p`_i *~ n). Proof. (* Goal: forall (p : @poly_of R (Phant (GRing.Ring.sort R))) (n : int) (i : nat), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@intmul (poly_zmodType R) p n)) i) (@intmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) n) *) by move=> p [] n i; rewrite ?NegzE (coefMNn, coefMn). Qed. Lemma polyC_mulrz : forall n, {morph (@polyC R) : c / c *~ n}. Proof. (* Goal: forall n : int, @morphism_1 (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (fun c : GRing.Ring.sort R => @intmul (GRing.Ring.zmodType R) c n) (fun c : @poly_of R (Phant (GRing.Ring.sort R)) => @intmul (poly_zmodType R) c n) *) move=> [] n c; rewrite ?NegzE -?pmulrn ?polyC_muln //. (* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R (@intmul (GRing.Ring.zmodType R) c (@GRing.opp int_ZmodType (Posz (S n))))) (@intmul (poly_zmodType R) (@polyC R c) (@GRing.opp int_ZmodType (Posz (S n)))) *) by rewrite polyC_opp mulrNz polyC_muln nmulrn. Qed. Lemma hornerMz : forall n (p : {poly R}) x, (p *~ n).[x] = p.[x] *~ n. Proof. (* Goal: forall (n : int) (p : @poly_of R (Phant (GRing.Ring.sort R))) (x : GRing.Ring.sort R), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@horner R (@intmul (poly_zmodType R) p n) x) (@intmul (GRing.Ring.zmodType R) (@horner R p x) n) *) by case=> *; rewrite ?NegzE ?mulNzr ?(hornerN, hornerMn). Qed. Lemma horner_int : forall n x, (n%:~R : {poly R}).[x] = n%:~R. Proof. (* Goal: forall (n : int) (x : GRing.Ring.sort R), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@horner R (@intmul (GRing.Ring.zmodType (poly_ringType R)) (GRing.one (poly_ringType R)) n : @poly_of R (Phant (GRing.Ring.sort R))) x) (@intmul (GRing.Ring.zmodType R) (GRing.one R) n) *) by move=> n x; rewrite hornerMz hornerC. Qed. Lemma derivMz : forall n p, (p *~ n)^`() = p^`() *~ n. Proof. (* Goal: forall (n : int) (p : @poly_of R (Phant (GRing.Ring.sort R))), @eq (@poly_of R (Phant (GRing.Ring.sort R))) (@deriv R (@intmul (poly_zmodType R) p n)) (@intmul (poly_zmodType R) (@deriv R p) n) *) by move=> [] n p; rewrite ?NegzE -?pmulrn (derivMn, derivMNn). Qed. End PolyZintRing. Section PolyZintOIdom. Variable R : realDomainType. Lemma mulpz (p : {poly R}) (n : int) : p *~ n = n%:~R *: p. Proof. (* Goal: @eq (GRing.Zmodule.sort (poly_zmodType (Num.RealDomain.ringType R))) (@intmul (poly_zmodType (Num.RealDomain.ringType R)) p n) (@GRing.scale (Num.RealDomain.ringType R) (poly_lmodType (Num.RealDomain.ringType R)) (@intmul (GRing.Ring.zmodType (Num.RealDomain.ringType R)) (GRing.one (Num.RealDomain.ringType R)) n) p) *) by rewrite -[p *~ n]mulrzl -mul_polyC polyC_mulrz polyC1. Qed. End PolyZintOIdom. Section ZnatPred. Definition Znat := [qualify a n : int | 0 <= n]. Fact Znat_key : pred_key Znat. by []. Qed. Proof. (* Goal: @pred_key int (@has_quality (S O) int Znat) *) by []. Qed. Lemma Znat_semiring_closed : semiring_closed Znat. Proof. (* Goal: @GRing.semiring_closed int_Ring (@has_quality (S O) int Znat) *) by do 2?split => //; [apply: addr_ge0 | apply: mulr_ge0]. Qed. Canonical Znat_addrPred := AddrPred Znat_semiring_closed. Canonical Znat_mulrPred := MulrPred Znat_semiring_closed. Canonical Znat_semiringPred := SemiringPred Znat_semiring_closed. Lemma ZnatP (m : int) : reflect (exists n : nat, m = n) (m \is a Znat). Proof. (* Goal: Bool.reflect (@ex nat (fun n : nat => @eq int m (Posz n))) (@in_mem int m (@mem int (predPredType int) (@has_quality (S O) int Znat))) *) by apply: (iffP idP) => [|[n -> //]]; case: m => // n; exists n. Qed. End ZnatPred. Section rpred. Lemma rpredMz M S (addS : @zmodPred M S) (kS : keyed_pred addS) m : {in kS, forall u, u *~ m \in kS}. Proof. (* Goal: @prop_in1 (GRing.Zmodule.sort M) (@mem (GRing.Zmodule.sort M) (predPredType (GRing.Zmodule.sort M)) (@unkey_pred (GRing.Zmodule.sort M) S (@GRing.Pred.opp_key M S (@GRing.Pred.zmod_opp M S addS)) kS)) (fun u : GRing.Zmodule.sort M => is_true (@in_mem (GRing.Zmodule.sort M) (@intmul M u m) (@mem (GRing.Zmodule.sort M) (predPredType (GRing.Zmodule.sort M)) (@unkey_pred (GRing.Zmodule.sort M) S (@GRing.Pred.opp_key M S (@GRing.Pred.zmod_opp M S addS)) kS)))) (inPhantom (forall u : GRing.Zmodule.sort M, is_true (@in_mem (GRing.Zmodule.sort M) (@intmul M u m) (@mem (GRing.Zmodule.sort M) (predPredType (GRing.Zmodule.sort M)) (@unkey_pred (GRing.Zmodule.sort M) S (@GRing.Pred.opp_key M S (@GRing.Pred.zmod_opp M S addS)) kS))))) *) by case: m => n u Su; rewrite ?rpredN ?rpredMn. Qed. Lemma rpred_int R S (ringS : @subringPred R S) (kS : keyed_pred ringS) m : m%:~R \in kS. Proof. (* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@intmul (GRing.Ring.zmodType R) (GRing.one R) m) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.opp_key (GRing.Ring.zmodType R) S (@GRing.Pred.zmod_opp (GRing.Ring.zmodType R) S (@GRing.Pred.subring_zmod R S ringS))) kS))) *) by rewrite rpredMz ?rpred1. Qed. Lemma rpredZint (R : ringType) (M : lmodType R) S (addS : @zmodPred M S) (kS : keyed_pred addS) m : {in kS, forall u, m%:~R *: u \in kS}. Proof. (* Goal: @prop_in1 (GRing.Zmodule.sort (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M)) (@mem (GRing.Zmodule.sort (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M)) (predPredType (GRing.Zmodule.sort (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M))) (@unkey_pred (GRing.Zmodule.sort (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M)) S (@GRing.Pred.opp_key (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M) S (@GRing.Pred.zmod_opp (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M) S addS)) kS)) (fun u : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) M) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) M) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) M))) => is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) M) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) M) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) M)))) (@GRing.scale R M (@intmul (GRing.Ring.zmodType R) (GRing.one R) m) u) (@mem (GRing.Zmodule.sort (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M)) (predPredType (GRing.Zmodule.sort (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M))) (@unkey_pred (GRing.Zmodule.sort (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M)) S (@GRing.Pred.opp_key (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M) S (@GRing.Pred.zmod_opp (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M) S addS)) kS)))) (inPhantom (forall u : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) M) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) M) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) M))), is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) M) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) M) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) M)))) (@GRing.scale R M (@intmul (GRing.Ring.zmodType R) (GRing.one R) m) u) (@mem (GRing.Zmodule.sort (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M)) (predPredType (GRing.Zmodule.sort (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M))) (@unkey_pred (GRing.Zmodule.sort (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M)) S (@GRing.Pred.opp_key (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M) S (@GRing.Pred.zmod_opp (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) M) S addS)) kS))))) *) by move=> u Su; rewrite /= scaler_int rpredMz. Qed. Lemma rpredXz R S (divS : @divrPred R S) (kS : keyed_pred divS) m : {in kS, forall x, x ^ m \in kS}. Proof. (* Goal: @prop_in1 (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@mem (GRing.Ring.sort (GRing.UnitRing.ringType R)) (predPredType (GRing.Ring.sort (GRing.UnitRing.ringType R))) (@unkey_pred (GRing.Ring.sort (GRing.UnitRing.ringType R)) S (@GRing.Pred.mul_key (GRing.UnitRing.ringType R) S (@GRing.Pred.div_mul R S divS)) kS)) (fun x : GRing.UnitRing.sort R => is_true (@in_mem (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x m) (@mem (GRing.Ring.sort (GRing.UnitRing.ringType R)) (predPredType (GRing.Ring.sort (GRing.UnitRing.ringType R))) (@unkey_pred (GRing.Ring.sort (GRing.UnitRing.ringType R)) S (@GRing.Pred.mul_key (GRing.UnitRing.ringType R) S (@GRing.Pred.div_mul R S divS)) kS)))) (inPhantom (forall x : GRing.UnitRing.sort R, is_true (@in_mem (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x m) (@mem (GRing.Ring.sort (GRing.UnitRing.ringType R)) (predPredType (GRing.Ring.sort (GRing.UnitRing.ringType R))) (@unkey_pred (GRing.Ring.sort (GRing.UnitRing.ringType R)) S (@GRing.Pred.mul_key (GRing.UnitRing.ringType R) S (@GRing.Pred.div_mul R S divS)) kS))))) *) by case: m => n x Sx; rewrite ?rpredV rpredX. Qed. Lemma rpredXsign R S (divS : @divrPred R S) (kS : keyed_pred divS) n x : (x ^ ((-1) ^+ n) \in kS) = (x \in kS). Proof. (* Goal: @eq bool (@in_mem (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@exprz R x (@GRing.exp int_Ring (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) n)) (@mem (GRing.Ring.sort (GRing.UnitRing.ringType R)) (predPredType (GRing.Ring.sort (GRing.UnitRing.ringType R))) (@unkey_pred (GRing.Ring.sort (GRing.UnitRing.ringType R)) S (@GRing.Pred.mul_key (GRing.UnitRing.ringType R) S (@GRing.Pred.div_mul R S divS)) kS))) (@in_mem (GRing.UnitRing.sort R) x (@mem (GRing.Ring.sort (GRing.UnitRing.ringType R)) (predPredType (GRing.Ring.sort (GRing.UnitRing.ringType R))) (@unkey_pred (GRing.Ring.sort (GRing.UnitRing.ringType R)) S (@GRing.Pred.mul_key (GRing.UnitRing.ringType R) S (@GRing.Pred.div_mul R S divS)) kS))) *) by rewrite -signr_odd; case: (odd n); rewrite ?rpredV. Qed. End rpred.
From Categories Require Import Essentials.Notations. From Categories Require Import Essentials.Types. Require Export Coq.Program.Tactics. Require Export Coq.Program.Equality. Require Export Coq.Logic.FunctionalExtensionality. Require Export Coq.Logic.ProofIrrelevance. Definition equal_f : ∀ {A B : Type} {f g : A → B}, f = g → ∀ x : A, f x = g x. Proof. (* Goal: forall (A B : Type) (f g : forall _ : A, B) (_ : @eq (forall _ : A, B) f g) (x : A), @eq B (f x) (g x) *) intros A B f g H x. (* Goal: @eq B (f x) (g x) *) destruct H; reflexivity. Qed. Definition f_equal : ∀ (A B : Type) (f : A → B) (x y : A), x = y → f x = f y. Proof. (* Goal: forall (A B : Type) (f : forall _ : A, B) (x y : A) (_ : @eq A x y), @eq B (f x) (f y) *) intros A B f x y H. (* Goal: @eq B (f x) (f y) *) destruct H; reflexivity. Qed. Arguments f_equal [_ _] _ [_ _] _. Ltac basic_simpl := let simpl_prod _ := match goal with [H : prod _ _ |- _] => let H1 := fresh H "1" in let H2 := fresh H "2" in destruct H as [H1 H2] end in let simpl_sig _ := match goal with [H : @sig _ _ |- _] => let H1 := fresh H "1" in let H2 := fresh H "2" in destruct H as [H1 H2] end in let basic_simpl_helper _ := cbn in *; intros; repeat simpl_prod tt; repeat simpl_sig tt in repeat basic_simpl_helper tt . Global Obligation Tactic := basic_simpl; auto. Ltac PIR := let pir_helper _ := match goal with |[H : ?A, H' : ?A|- _] => match type of A with | Prop => destruct (proof_irrelevance _ H H') end end in repeat pir_helper tt . Ltac ElimEq := repeat match goal with [H : _ = _|- _] => destruct H end. Hint Extern 1 => progress ElimEq. Ltac cbn_rewrite W := let H := fresh "H" in set (H := W); cbn in H; rewrite H; clear H . Ltac cbn_rewrite_in W V := let H := fresh "H" in set (H := W); cbn in H; rewrite H in V; clear H . Ltac cbn_rewrite_back W := let H := fresh "H" in set (H := W); cbn in H; rewrite <- H; clear H . Ltac cbn_rewrite_back_in W V := let H := fresh "H" in set (H := W); cbn in H; rewrite <- H in V; clear H . Tactic Notation "cbn_rewrite" constr(W) := cbn_rewrite W. Tactic Notation "cbn_rewrite" constr(W) "in" hyp_list(V) := cbn_rewrite_in W V. Tactic Notation "cbn_rewrite" "<-" constr(W) := cbn_rewrite_back W. Tactic Notation "cbn_rewrite" "<-" constr(W) "in" hyp_list(V) := cbn_rewrite_back_in W V. Lemma sig_proof_irrelevance {A : Type} (P : A → Prop) (X Y : sig P) : proj1_sig X = proj1_sig Y → X = Y. Proof. (* Goal: forall _ : @eq A (@proj1_sig A P X) (@proj1_sig A P Y), @eq (@sig A P) X Y *) basic_simpl. (* Goal: @eq (@sig A P) (@exist A P X1 X2) (@exist A P Y1 Y2) *) ElimEq. (* Goal: @eq (@sig A P) (@exist A P X1 X2) (@exist A P X1 Y2) *) PIR. (* Goal: @eq (@sig A P) (@exist A P X1 X2) (@exist A P X1 X2) *) trivial. Qed. Hint Extern 2 (exist ?A _ _ = exist ?A _ _) => apply sig_proof_irrelevance. Ltac FunExt := progress ( repeat ( match goal with [|- _ = _] => let x := fresh "x" in extensionality x end ) ) . Hint Extern 1 => FunExt. Lemma pair_eq (A B : Type) (a b : A * B) : fst a = fst b → snd a = snd b → a = b. Hint Resolve pair_eq. Ltac revert_clearbody_all := repeat lazymatch goal with H:_ |- _ => try clearbody H; revert H end. Ltac hyp_stack := constr:(ltac:(revert_clearbody_all;constructor) : True). Ltac next_hyp hs step last := lazymatch hs with (?hs' ?H) => step H hs' | _ => last end. Tactic Notation "dohyps" tactic3(tac) := let hs := hyp_stack in let rec step H hs := tac H; next_hyp hs step idtac in next_hyp hs step idtac. Tactic Notation "dohyps" "reverse" tactic3(tac) := let hs := hyp_stack in let rec step H hs := next_hyp hs step idtac; tac H in next_hyp hs step idtac. Tactic Notation "do1hyp" tactic3(tac) := let hs := hyp_stack in let rec step H hs := tac H + next_hyp hs step fail in next_hyp hs step fail. Tactic Notation "do1hyp" "reverse" tactic3(tac) := let hs := hyp_stack in let rec step H hs := next_hyp hs step fail + tac H in next_hyp hs step fail.
Require Import securite. Lemma POinvprel1 : forall (l l0 : list C) (k k0 k1 k2 : K) (c c0 c1 c2 : C) (d d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 : D), inv0 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) -> inv1 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) -> invP (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) -> rel1 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) -> invP (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0). Proof. (* Goal: forall (l l0 : list C) (k k0 k1 k2 : K) (c c0 c1 c2 : C) (d d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 : D) (_ : inv0 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : inv1 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : invP (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : rel1 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0)), invP (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) *) do 32 intro. (* Goal: forall (_ : inv0 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : inv1 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : invP (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : rel1 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0)), invP (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) *) unfold invP, rel1 in |- *; intros Inv0 Inv1 know_Kab and1. (* Goal: not (known_in (B2C (K2B (KeyAB Aid Bid))) (@app C l0 rngDDKKeyABminusKab)) *) elim and1; intros eq_l0 t1. (* Goal: not (known_in (B2C (K2B (KeyAB Aid Bid))) (@app C l0 rngDDKKeyABminusKab)) *) clear Inv0 Inv1 and1 t1. (* Goal: not (known_in (B2C (K2B (KeyAB Aid Bid))) (@app C l0 rngDDKKeyABminusKab)) *) rewrite eq_l0. (* Goal: not (known_in (B2C (K2B (KeyAB Aid Bid))) (@app C (@cons C (quad (B2C (D2B d18)) (B2C (D2B Aid)) (B2C (D2B d19)) (Encrypt (quad (B2C (D2B d20)) (B2C (D2B d18)) (B2C (D2B Aid)) (B2C (D2B d19))) (KeyX Aid))) l) rngDDKKeyABminusKab)) *) unfold quad in |- *. (* Goal: not (known_in (B2C (K2B (KeyAB Aid Bid))) (@app C (@cons C (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) l) rngDDKKeyABminusKab)) *) apply D2. (* Goal: not_comp_of (B2C (K2B (KeyAB Aid Bid))) (@app C (@cons C (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) l) rngDDKKeyABminusKab) *) simpl in |- *. (* Goal: not_comp_of (B2C (K2B (KeyAB Aid Bid))) (@cons C (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) (@app C l rngDDKKeyABminusKab)) *) repeat apply C2 || apply C3 || apply C4. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d19))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d20))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (B2C (D2B d19)))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d19))) *) (* Goal: not_comp_of (B2C (K2B (KeyAB Aid Bid))) (@app C l rngDDKKeyABminusKab) *) apply D1; assumption. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d19))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d20))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (B2C (D2B d19)))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d19))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d19))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d20))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (B2C (D2B d19)))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d19))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d20))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (B2C (D2B d19)))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d19))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d20))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d19))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d20))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d19))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d20))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d19))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19)))))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d19))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d19))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B Aid))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid))))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d18))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (Pair (B2C (D2B d19)) (Encrypt (Pair (B2C (D2B d20)) (Pair (B2C (D2B d18)) (Pair (B2C (D2B Aid)) (B2C (D2B d19))))) (KeyX Aid)))))) *) discriminate. Qed.
Require Export GeoCoq.Elements.OriginalProofs.lemma_lessthancongruence. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma proposition_03 : forall A B C D E F, Lt C D A B -> Cong E F A B -> exists X, BetS E X F /\ Cong E X C D. Proof. (* Goal: forall (A B C D E F : @Point Ax0) (_ : @Lt Ax0 C D A B) (_ : @Cong Ax0 E F A B), @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 E X F) (@Cong Ax0 E X C D)) *) intros. (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 E X F) (@Cong Ax0 E X C D)) *) assert (Cong A B E F) by (conclude lemma_congruencesymmetric). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 E X F) (@Cong Ax0 E X C D)) *) assert (Lt C D E F) by (conclude lemma_lessthancongruence). (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 E X F) (@Cong Ax0 E X C D)) *) let Tf:=fresh in assert (Tf:exists G, (BetS E G F /\ Cong E G C D)) by (conclude_def Lt );destruct Tf as [G];spliter. (* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 E X F) (@Cong Ax0 E X C D)) *) close. Qed. End Euclid.
From Coq Require Import ssreflect ssrbool ssrfun. From mathcomp Require Import ssrnat eqtype seq path. From fcsl Require Import ordtype. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Section Def. Variables (K : ordType) (V : Type). Definition key (x : K * V) := x.1. Definition value (x : K * V) := x.2. Definition predk k := preim key (pred1 k). Definition predCk k := preim key (predC1 k). Record finMap := FinMap { seq_of : seq (K * V); _ : sorted ord (map key seq_of)}. Definition finMap_for of phant (K -> V) := finMap. Identity Coercion finMap_for_finMap : finMap_for >-> finMap. End Def. Notation "{ 'finMap' fT }" := (finMap_for (Phant fT)) (at level 0, format "{ 'finMap' '[hv' fT ']' }") : type_scope. Prenex Implicits key value predk predCk seq_of. Section Ops. Variables (K : ordType) (V : Type). Notation fmap := (finMap K V). Notation key := (@key K V). Notation value := (@value K V). Notation predk := (@predk K V). Notation predCk := (@predCk K V). Lemma fmapE (s1 s2 : fmap) : s1 = s2 <-> seq_of s1 = seq_of s2. Proof. (* Goal: iff (@eq (finMap K V) s1 s2) (@eq (list (prod (Ordered.sort K) V)) (@seq_of K V s1) (@seq_of K V s2)) *) split=>[->|] //. (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (@seq_of K V s1) (@seq_of K V s2), @eq (finMap K V) s1 s2 *) move: s1 s2 => [s1 H1] [s2 H2] /= H. (* Goal: @eq (finMap K V) (@FinMap K V s1 H1) (@FinMap K V s2 H2) *) by rewrite H in H1 H2 *; rewrite (bool_irrelevance H1 H2). Qed. Definition nil := FinMap sorted_nil. Definition fnd k (s : fmap) := if (filter (predk k) (seq_of s)) is (_, v):: _ then Some v else None. Fixpoint ins' (k : K) (v : V) (s : seq (K * V)) {struct s} : seq (K * V) := if s is (k1, v1)::s1 then if ord k k1 then (k, v)::s else if k == k1 then (k, v)::s1 else (k1, v1)::(ins' k v s1) else [:: (k, v)]. Lemma path_ins' s k1 k2 v : ord k1 k2 -> path ord k1 (map key s) -> path ord k1 (map key (ins' k2 v s)). Proof. (* Goal: forall (_ : is_true (@ord K k1 k2)) (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) s))), is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (ins' k2 v s))) *) elim: s k1 k2 v=>[|[k' v'] s IH] k1 k2 v H1 /=; first by rewrite H1. (* Goal: forall _ : is_true (andb (@ord K k1 k') (@path (Ordered.sort K) (@ord K) k' (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) s))), is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (if @ord K k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s) else if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (ins' k2 v s)))) *) case/andP=>H2 H3; case: ifP=>/= H4; first by rewrite H1 H3 H4. (* Goal: is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (ins' k2 v s)))) *) case: ifP=>H5 /=; first by rewrite H1 (eqP H5) H3. (* Goal: is_true (andb (@ord K k1 k') (@path (Ordered.sort K) (@ord K) k' (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (ins' k2 v s)))) *) by rewrite H2 IH //; move: (total k2 k'); rewrite H4 H5. Qed. Lemma sorted_ins' s k v : sorted ord (map key s) -> sorted ord (map key (ins' k v s)). Proof. (* Goal: forall _ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (ins' k v s))) *) case: s=>// [[k' v']] s /= H. (* Goal: is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (if @ord K k k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s) else if @eq_op (Ordered.eqType K) k k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (ins' k v s)))) *) case: ifP=>//= H1; first by rewrite H H1. (* Goal: is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (if @eq_op (Ordered.eqType K) k k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (ins' k v s)))) *) case: ifP=>//= H2; first by rewrite (eqP H2). (* Goal: is_true (@path (Ordered.sort K) (@ord K) k' (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (ins' k v s))) *) by rewrite path_ins' //; move: (total k k'); rewrite H1 H2. Qed. Definition ins k v s := let: FinMap s' p' := s in FinMap (sorted_ins' k v p'). Lemma sorted_filter' k s : sorted ord (map key s) -> sorted ord (map key (filter (predCk k) s)). Proof. (* Goal: forall _ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@SerTop.predCk K V k)) s))) *) by move=>H; rewrite -filter_map sorted_filter //; apply: trans. Qed. Definition rem k s := let: FinMap s' p' := s in FinMap (sorted_filter' k p'). Definition supp s := map key (seq_of s). End Ops. Prenex Implicits fnd ins rem supp. Section Laws. Variables (K : ordType) (V : Type). Notation fmap := (finMap K V). Notation nil := (nil K V). Lemma ord_path (x y : K) s : ord x y -> path ord y s -> path ord x s. Proof. (* Goal: forall (_ : is_true (@ord K x y)) (_ : is_true (@path (Ordered.sort K) (@ord K) y s)), is_true (@path (Ordered.sort K) (@ord K) x s) *) elim: s x y=>[|k s IH] x y //=. (* Goal: forall (_ : is_true (@ord K x y)) (_ : is_true (andb (@ord K y k) (@path (Ordered.sort K) (@ord K) k s))), is_true (andb (@ord K x k) (@path (Ordered.sort K) (@ord K) k s)) *) by move=>H1; case/andP=>H2 ->; rewrite (trans H1 H2). Qed. Lemma last_ins' (x : K) (v : V) s : path ord x (map key s) -> ins' x v s = (x, v) :: s. Proof. (* Goal: forall _ : is_true (@path (Ordered.sort K) (@ord K) x (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)), @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v s) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s) *) by elim: s=>[|[k1 v1] s IH] //=; case: ifP. Qed. Lemma first_ins' (k : K) (v : V) s : (forall x, x \in map key s -> ord x k) -> ins' k v s = rcons s (k, v). Proof. (* Goal: forall _ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true (@ord K x k), @eq (list (prod (Ordered.sort K) V)) (@ins' K V k v s) (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) *) elim: s=>[|[k1 v1] s IH] H //=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v))) *) move: (H k1); rewrite inE eq_refl; move/(_ (erefl _)). (* Goal: forall _ : is_true (@ord K k1 k), @eq (list (prod (Ordered.sort K) V)) (if @ord K k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v))) *) case: totalP=>// O _; rewrite IH //. (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true (@ord K x k) *) by move=>x H'; apply: H; rewrite inE /= H' orbT. Qed. Lemma notin_path (x : K) s : path ord x s -> x \notin s. Proof. (* Goal: forall _ : is_true (@path (Ordered.sort K) (@ord K) x s), is_true (negb (@in_mem (Ordered.sort K) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) s))) *) elim: s=>[|k s IH] //=. (* Goal: forall _ : is_true (andb (@ord K x k) (@path (Ordered.sort K) (@ord K) k s)), is_true (negb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k s)))) *) rewrite inE negb_or; case/andP=>T1 T2; case: eqP=>H /=. (* Goal: is_true (negb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) s))) *) (* Goal: is_true false *) - (* Goal: is_true (negb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) s))) *) (* Goal: is_true false *) by rewrite H irr in T1. (* Goal: is_true (negb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) s))) *) by apply: IH; apply: ord_path T2. Qed. Lemma path_supp_ord (s : fmap) k : path ord k (supp s) -> forall m, m \in supp s -> ord k m. Proof. (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s))) (m : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) m (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)))), is_true (@ord K k m) *) case: s=>s H; rewrite /supp /= => H1 m H2; case: totalP H1 H2=>//. (* Goal: forall (_ : is_true (@eq_op (Ordered.eqType K) m k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : is_true (@in_mem (Ordered.sort K) m (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true false *) (* Goal: forall (_ : is_true (@ord K m k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : is_true (@in_mem (Ordered.sort K) m (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true false *) - (* Goal: forall (_ : is_true (@eq_op (Ordered.eqType K) m k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : is_true (@in_mem (Ordered.sort K) m (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true false *) (* Goal: forall (_ : is_true (@ord K m k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : is_true (@in_mem (Ordered.sort K) m (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true false *) by move=>H1 H2; move: (notin_path (ord_path H1 H2)); case: (m \in _). (* Goal: forall (_ : is_true (@eq_op (Ordered.eqType K) m k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : is_true (@in_mem (Ordered.sort K) m (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true false *) by move/eqP=>->; move/notin_path; case: (k \in _). Qed. Lemma notin_filter (x : K) s : x \notin (map key s) -> filter (predk V x) s = [::]. Proof. (* Goal: forall _ : is_true (negb (@in_mem (Ordered.sort K) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s) (@Datatypes.nil (prod (Ordered.sort K) V)) *) elim: s=>[|[k v] s IH] //=. (* Goal: forall _ : is_true (negb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))))), @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s) (@Datatypes.nil (prod (Ordered.sort K) V)) *) rewrite inE negb_or; case/andP=>H1 H2. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s) (@Datatypes.nil (prod (Ordered.sort K) V)) *) by rewrite eq_sym (negbTE H1); apply: IH. Qed. Lemma fmapP (s1 s2 : fmap) : (forall k, fnd k s1 = fnd k s2) -> s1 = s2. Proof. (* Goal: forall _ : forall k : Equality.sort (Ordered.eqType K), @eq (option V) (@fnd K V k s1) (@fnd K V k s2), @eq (finMap K V) s1 s2 *) rewrite /fnd; move: s1 s2 => [s1 P1][s2 P2] H; rewrite fmapE /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) s1 s2 *) elim: s1 P1 s2 P2 H=>[|[k v] s1 IH] /= P1. (* Goal: forall (s2 : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : forall k0 : Ordered.sort K, @eq (option V) match (if @eq_op (Ordered.eqType K) k k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) s2 *) (* Goal: forall (s2 : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : forall k : Ordered.sort K, @eq (option V) (@None V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end), @eq (list (prod (Ordered.sort K) V)) (@Datatypes.nil (prod (Ordered.sort K) V)) s2 *) - (* Goal: forall (s2 : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : forall k0 : Ordered.sort K, @eq (option V) match (if @eq_op (Ordered.eqType K) k k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) s2 *) (* Goal: forall (s2 : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : forall k : Ordered.sort K, @eq (option V) (@None V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end), @eq (list (prod (Ordered.sort K) V)) (@Datatypes.nil (prod (Ordered.sort K) V)) s2 *) by case=>[|[k2 v2] s2 P2] //=; move/(_ k2); rewrite eq_refl. (* Goal: forall (s2 : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : forall k0 : Ordered.sort K, @eq (option V) match (if @eq_op (Ordered.eqType K) k k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) s2 *) have S1: sorted ord (map key s1) by apply: path_sorted P1. (* Goal: forall (s2 : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : forall k0 : Ordered.sort K, @eq (option V) match (if @eq_op (Ordered.eqType K) k k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) s2 *) case=>[|[k2 v2] s2] /= P2; first by move/(_ k); rewrite eq_refl. (* Goal: forall _ : forall k0 : Ordered.sort K, @eq (option V) match (if @eq_op (Ordered.eqType K) k k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end match (if @eq_op (Ordered.eqType K) k2 k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end, @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) have S2: sorted ord (map key s2) by apply: path_sorted P2. (* Goal: forall _ : forall k0 : Ordered.sort K, @eq (option V) match (if @eq_op (Ordered.eqType K) k k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end match (if @eq_op (Ordered.eqType K) k2 k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end, @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) move: (IH S1 s2 S2)=>{IH} /= IH H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) move: (notin_path P1) (notin_path P2)=>N1 N2. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) case E: (k == k2). (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) rewrite -{k2 E}(eqP E) in P2 H N2 *. move: (H k); rewrite eq_refl=>[[E2]]; rewrite -E2 {v2 E2} in H *. rewrite IH // => k'. case E: (k == k'); first by rewrite -(eqP E) !notin_filter. by move: (H k'); rewrite E. move: (H k); rewrite eq_refl eq_sym E notin_filter //. move: (total k k2); rewrite E /=; case/orP=>L1. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) by apply: notin_path; apply: ord_path P2. move: (H k2); rewrite E eq_refl notin_filter //. by apply: notin_path; apply: ord_path P1. Qed. Qed. Lemma predkN (k1 k2 : K) : predI (predk V k1) (predCk V k2) =1 if k1 == k2 then pred0 else predk V k1. Proof. (* Goal: @eqfun bool (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predI (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)))) (@pred_of_simpl (prod (Ordered.sort K) V) (if @eq_op (Ordered.eqType K) k1 k2 then @pred0 (prod (Ordered.sort K) V) else @predk K V k1)) *) by move=>x; case: ifP=>H /=; [|case: eqP=>//->]; rewrite ?(eqP H) ?andbN ?H. Qed. CoInductive supp_spec x (s : fmap) : bool -> Type := | supp_spec_some v of fnd x s = Some v : supp_spec x s true | supp_spec_none of fnd x s = None : supp_spec x s false. Lemma suppP x (s : fmap) : supp_spec x s (x \in supp s). Lemma suppE (s1 s2 : fmap) : supp s1 =i supp s2 <-> supp s1 = supp s2. Proof. (* Goal: iff (@eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))) (@eq (list (Ordered.sort K)) (@supp K V s1) (@supp K V s2)) *) split; last by move=>->. (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)), @eq (list (Ordered.sort K)) (@supp K V s1) (@supp K V s2) *) case: s1 s2=>s1 H1 [s2 H2]; rewrite /supp /=. (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)), @eq (list (Ordered.sort K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2) *) elim: s1 s2 H1 H2=>[|[k1 _] s1 IH][|[k2 _] s2] //=. (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (_ : is_true (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (_ : is_true true) (_ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@Datatypes.nil (Ordered.sort K)))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@Datatypes.nil (Ordered.sort K)) *) (* Goal: forall (_ : is_true true) (_ : is_true (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@Datatypes.nil (Ordered.sort K))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))), @eq (list (Ordered.sort K)) (@Datatypes.nil (Ordered.sort K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) - (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (_ : is_true (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (_ : is_true true) (_ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@Datatypes.nil (Ordered.sort K)))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@Datatypes.nil (Ordered.sort K)) *) (* Goal: forall (_ : is_true true) (_ : is_true (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@Datatypes.nil (Ordered.sort K))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))), @eq (list (Ordered.sort K)) (@Datatypes.nil (Ordered.sort K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) by move=>_ _; move/(_ k2); rewrite inE eq_refl. (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (_ : is_true (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (_ : is_true true) (_ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@Datatypes.nil (Ordered.sort K)))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@Datatypes.nil (Ordered.sort K)) *) - (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (_ : is_true (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (_ : is_true true) (_ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@Datatypes.nil (Ordered.sort K)))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@Datatypes.nil (Ordered.sort K)) *) by move=>_ _; move/(_ k1); rewrite inE eq_refl. (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (_ : is_true (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) case: (totalP k1 k2)=>/= O H1 H2. (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) - (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) move/(_ k1); rewrite !inE eq_refl /= eq_sym. (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq bool true (orb (@eq_op (Ordered.eqType K) k2 k1) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) case: totalP O => //= O _. (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq bool true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) by move/(ord_path O)/notin_path/negbTE: H2=>->. (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) - (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) rewrite -{k2 O}(eqP O) in H1 H2 *. move=>H; congr (_ :: _); apply: IH. - (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) by apply: path_sorted H1. - (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) by apply: path_sorted H2. move=>x; move: (H x); rewrite !inE /=. case: eqP=>// -> /= _. by move/notin_path/negbTE: H1=>->; move/notin_path/negbTE: H2=>->. move/(_ k2); rewrite !inE eq_refl /= eq_sym. (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq bool (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)))) true, @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) case: totalP O=>//= O _. (* Goal: forall _ : @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))), @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) (* Goal: forall _ : @eq bool true true, @eq (list (Ordered.sort K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)) *) by move/(ord_path O)/notin_path/negbTE: H1=>->. Qed. Qed. Lemma supp_nilE (s : fmap) : (supp s = [::]) <-> (s = nil). Proof. (* Goal: iff (@eq (list (Ordered.sort K)) (@supp K V s) (@Datatypes.nil (Ordered.sort K))) (@eq (finMap K V) s (SerTop.nil K V)) *) by split=>[|-> //]; case: s; case=>// H; rewrite fmapE. Qed. Lemma supp_rem k (s : fmap) : supp (rem k s) =i predI (predC1 k) (mem (supp s)). Proof. (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predI (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@predC1 (Ordered.eqType K) k)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)))))) *) case: s => s H1 x; rewrite /supp inE /=. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k)) s)))) (andb (negb (@eq_op (Ordered.eqType K) x k)) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))) *) by case H2: (x == k)=>/=; rewrite -filter_map mem_filter /= H2. Qed. Lemma supp_ins k v (s : fmap) : supp (ins k v s) =i [predU pred1 k & supp s]. Proof. (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@pred1 (Ordered.eqType K) k)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)))))) *) case: s => s H x; rewrite /supp inE /=. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s)))) (orb (@eq_op (Ordered.eqType K) x k) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))) *) elim: s x k v H=>[|[k1 v1] s IH] //= x k v H. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (if @ord K k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s))))) (orb (@eq_op (Ordered.eqType K) x k) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))))) *) case: ifP=>H1 /=; first by rewrite inE. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s))))) (orb (@eq_op (Ordered.eqType K) x k) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))))) *) case: ifP=>H2 /=; first by rewrite !inE (eqP H2) orbA orbb. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s))))) (orb (@eq_op (Ordered.eqType K) x k) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))))) *) by rewrite !inE (IH _ _ _ (path_sorted H)) orbCA. Qed. Lemma fnd_rem k1 k2 (s : fmap) : fnd k1 (rem k2 s) = if k1 == k2 then None else fnd k1 s. Proof. (* Goal: @eq (option V) (@fnd K V k1 (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @None V else @fnd K V k1 s) *) case: s => s H; rewrite /fnd -filter_predI (eq_filter (predkN k1 k2)). (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (if @eq_op (Ordered.eqType K) k1 k2 then @pred0 (prod (Ordered.sort K) V) else @predk K V k1)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @None V else match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@seq_of K V (@FinMap K V s H)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) by case: eqP=>//; rewrite filter_pred0. Qed. Lemma fnd_ins k1 k2 v (s : fmap) : fnd k1 (ins k2 v s) = if k1 == k2 then Some v else fnd k1 s. Proof. (* Goal: @eq (option V) (@fnd K V k1 (@ins K V k2 v s)) (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else @fnd K V k1 s) *) case: s => s H; rewrite /fnd /=. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) elim: s k1 k2 v H=>[|[k' v'] s IH] //= k1 k2 v H. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (if @ord K k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s) else if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@Datatypes.nil (prod (Ordered.sort K) V)) else @Datatypes.nil (prod (Ordered.sort K) V)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else @None V) *) - (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (if @ord K k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s) else if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@Datatypes.nil (prod (Ordered.sort K) V)) else @Datatypes.nil (prod (Ordered.sort K) V)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else @None V) *) by case: ifP=>H1; [rewrite (eqP H1) eq_refl | rewrite eq_sym H1]. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (if @ord K k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s) else if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) case: ifP=>H1 /=. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) - (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) by case: ifP=>H2; [rewrite (eqP H2) eq_refl | rewrite (eq_sym k1) H2]. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) case: ifP=>H2 /=. (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) - (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) rewrite (eqP H2). (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k' then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) by case: ifP=>H3; [rewrite (eqP H3) eq_refl | rewrite eq_sym H3]. (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) case: ifP=>H3; first by rewrite -(eqP H3) eq_sym H2. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) by apply: IH; apply: path_sorted H. Qed. Lemma ins_rem k1 k2 v (s : fmap) : ins k1 v (rem k2 s) = if k1 == k2 then ins k1 v s else rem k2 (ins k1 v s). Proof. (* Goal: @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) move: k1 k2 v s. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) have L3: forall (x : K) s, path ord x (map key s) -> filter (predCk V x) s = s. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: forall (x : Ordered.sort K) (s : list (prod (Ordered.sort K) V)) (_ : is_true (@path (Ordered.sort K) (@ord K) x (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))), @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) s *) - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: forall (x : Ordered.sort K) (s : list (prod (Ordered.sort K) V)) (_ : is_true (@path (Ordered.sort K) (@ord K) x (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))), @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) s *) move=>x t; move/notin_path; elim: t=>[|[k3 v3] t IH] //=. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: forall _ : is_true (negb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k3 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) t))))), @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) t) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) t) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) t) *) rewrite inE negb_or; case/andP=>T1 T2. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) t) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) t) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) t) *) by rewrite eq_sym T1 IH. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) have L5: forall (x : K) (v : V) s, sorted ord (map key s) -> ins' x v (filter (predCk V x) s) = ins' x v s. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: forall (x : Ordered.sort K) (v : V) (s : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))), @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (@ins' K V x v s) *) - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: forall (x : Ordered.sort K) (v : V) (s : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))), @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (@ins' K V x v s) *) move=>x v s; elim: s x v=>[|[k' v'] s IH] x v //= H. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) case H1: (ord x k'). (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s)) *) - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s)) *) case H2: (k' == x)=>/=; first by rewrite (eqP H2) irr in H1. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s)) *) by rewrite H1 L3 //; apply: ord_path H1 H. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) case H2: (k' == x)=>/=. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) rewrite (eqP H2) eq_refl in H *. by rewrite L3 //; apply: last_ins' H. rewrite eq_sym H2 H1 IH //. by apply: path_sorted H. move=>k1 k2 v [s H]. case: ifP=>H1; rewrite /ins /rem fmapE /=. - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) rewrite {k1 H1}(eqP H1). elim: s k2 v H=>[|[k' v'] s IH] //= k2 v H. case H1: (k' == k2)=>/=. - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) rewrite eq_sym H1 (eqP H1) irr in H *. by rewrite L3 // last_ins'. rewrite eq_sym H1; case: ifP=>H3. - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) by rewrite L3 //; apply: ord_path H3 H. by rewrite L5 //; apply: path_sorted H. elim: s k1 k2 H1 H=>[|[k' v'] s IH] //= k1 k2 H1 H; first by rewrite H1. case H2: (k' == k2)=>/=. - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) rewrite (eqP H2) in H *; rewrite H1. case H3: (ord k1 k2)=>/=. - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) by rewrite H1 eq_refl /= last_ins' // L3 //; apply: ord_path H. by rewrite eq_refl /= IH //; apply: path_sorted H. case H3: (ord k1 k')=>/=; first by rewrite H1 H2. case H4: (k1 == k')=>/=; first by rewrite H1. by rewrite H2 IH //; apply: path_sorted H. Qed. Qed. Lemma ins_ins k1 k2 v1 v2 (s : fmap) : ins k1 v1 (ins k2 v2 s) = if k1 == k2 then ins k1 v1 s else ins k2 v2 (ins k1 v1 s). Proof. (* Goal: @eq (finMap K V) (@ins K V k1 v1 (@ins K V k2 v2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v1 s else @ins K V k2 v2 (@ins K V k1 v1 s)) *) rewrite /ins; case: s => s H; case H1: (k1 == k2); rewrite fmapE /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k1 v1 s) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k1 v1 s) *) rewrite (eqP H1) {H1}. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k2 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v1 s) *) elim: s H k2 v1 v2=>[|[k3 v3] s IH] /= H k2 v1 v2; first by rewrite irr eq_refl. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k2 v1 (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v1 s)) *) case: (totalP k2 k3)=>H1 /=; rewrite ?irr ?eq_refl //. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v1 s)) *) case: (totalP k2 k3) H1=>H2 _ //. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v1 s)) *) by rewrite IH //; apply: path_sorted H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) elim: s H k1 k2 H1 v1 v2=>[|[k3 v3] s IH] H k1 k2 H1 v1 v2 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V))) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V)) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V)))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V))) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V)) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V)))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V))) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V)) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V)))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V))) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V)) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V)))) *) rewrite H1 eq_sym H1. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V))) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V)))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V))) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V)))) *) by case: (totalP k1 k2) H1=>H2 H1. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) case: (totalP k2 k3)=>H2 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) case: (totalP k1 k2) (H1)=>H3 _ //=; last first. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) by case: (totalP k1 k3)=>//= H4; rewrite ?H2 ?H3. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) case: (totalP k1 k3)=>H4 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) case: (totalP k2 k1) H3=>//= H3. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: forall _ : is_true true, @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) by case: (totalP k2 k3) H2=>//=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) rewrite (eqP H4) in H3. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) by case: (totalP k2 k3) H2 H3. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) by case: (totalP k1 k3) (trans H3 H2) H4. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) rewrite -(eqP H2) {H2} (H1). (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v3) (@ins' K V k1 v1 s))) *) case: (totalP k1 k2) (H1)=>//= H2 _; rewrite ?irr ?eq_refl //. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v3) s)) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s)) *) rewrite eq_sym H1. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v3) s)) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s)) *) by case: (totalP k2 k1) H1 H2. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) case: (totalP k1 k3)=>H3 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) rewrite eq_sym H1. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) case: (totalP k2 k1) H1 (trans H3 H2)=>//. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: forall (_ : is_true (@ord K k1 k2)) (_ : @eq bool (@eq_op (Ordered.eqType K) k1 k2) false) (_ : is_true true), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) by case: (totalP k2 k3) H2=>//=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) rewrite (eqP H3). (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v1) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v1) (@ins' K V k2 v2 s)) *) by case: (totalP k2 k3) H2. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) case: (totalP k2 k3)=>H4 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) by move: (trans H4 H2); rewrite irr. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) *) by rewrite (eqP H4) irr in H2. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) by rewrite IH //; apply: path_sorted H. Qed. Lemma rem_empty k : rem k nil = nil. Proof. (* Goal: @eq (finMap K V) (@rem K V k (SerTop.nil K V)) (SerTop.nil K V) *) by rewrite fmapE. Qed. Lemma rem_rem k1 k2 (s : fmap) : rem k1 (rem k2 s) = if k1 == k2 then rem k1 s else rem k2 (rem k1 s). Proof. (* Goal: @eq (finMap K V) (@rem K V k1 (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @rem K V k1 s else @rem K V k2 (@rem K V k1 s)) *) rewrite /rem; case: s => s H /=. (* Goal: @eq (finMap K V) (@FinMap K V (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) s)) (@sorted_filter' K V k1 (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) s) (@sorted_filter' K V k2 s H))) (if @eq_op (Ordered.eqType K) k1 k2 then @FinMap K V (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@sorted_filter' K V k1 s H) else @FinMap K V (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) (@sorted_filter' K V k2 (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@sorted_filter' K V k1 s H))) *) case H1: (k1 == k2); rewrite fmapE /= -!filter_predI; apply: eq_filter=>x /=. (* Goal: @eq bool (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k2))) (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k2)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k1))) *) (* Goal: @eq bool (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k2))) (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) *) - (* Goal: @eq bool (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k2))) (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k2)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k1))) *) (* Goal: @eq bool (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k2))) (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) *) by rewrite (eqP H1) andbb. (* Goal: @eq bool (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k2))) (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k2)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k1))) *) by rewrite andbC. Qed. Lemma rem_ins k1 k2 v (s : fmap) : rem k1 (ins k2 v s) = if k1 == k2 then rem k1 s else ins k2 v (rem k1 s). Proof. (* Goal: @eq (finMap K V) (@rem K V k1 (@ins K V k2 v s)) (if @eq_op (Ordered.eqType K) k1 k2 then @rem K V k1 s else @ins K V k2 v (@rem K V k1 s)) *) rewrite /rem; case: s => s H /=; case H1: (k1 == k2); rewrite /= fmapE /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) *) rewrite (eqP H1) {H1}. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) (@ins' K V k2 v s)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) s) *) elim: s k2 H=>[|[k3 v3] s IH] k2 /= H; rewrite ?eq_refl 1?eq_sym //. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k3 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v s))) (if negb (@eq_op (Ordered.eqType K) k3 k2) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) s) *) case: (totalP k3 k2)=>H1 /=; rewrite ?eq_refl //=; case: (totalP k3 k2) H1=>//= H1 _. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) (@ins' K V k2 v s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) s)) *) by rewrite IH //; apply: path_sorted H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) elim: s k1 k2 H1 H=>[|[k3 v3] s IH] k1 k2 H1 /= H; first by rewrite eq_sym H1. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v s))) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) case: (totalP k2 k3)=>H2 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) rewrite eq_sym H1 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) case: (totalP k3 k1)=>H3 /=; case: (totalP k2 k3) (H2)=>//=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: forall (_ : is_true (@ord K k2 k3)) (_ : is_true true), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) rewrite -(eqP H3) in H1 *. rewrite -IH //; last by apply: path_sorted H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: forall (_ : is_true (@ord K k2 k3)) (_ : is_true true), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) *) rewrite last_ins' /= 1?eq_sym ?H1 //. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: is_true (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)) *) by apply: ord_path H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) by move: H1; rewrite (eqP H2) /= eq_sym => -> /=; rewrite irr eq_refl. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) case: (totalP k3 k1)=>H3 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) case: (totalP k2 k3) H2=>//= H2 _. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) by rewrite IH //; apply: path_sorted H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) rewrite -(eqP H3) in H1 *. by rewrite IH //; apply: path_sorted H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) case: (totalP k2 k3) H2=>//= H2 _. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) by rewrite IH //; apply: path_sorted H. Qed. Lemma rem_supp k (s : fmap) : k \notin supp s -> rem k s = s. Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)))), @eq (finMap K V) (@rem K V k s) s *) case: s => s H1; rewrite /supp !fmapE /= => H2. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k)) s) s *) elim: s H1 H2=>[|[k1 v1] s1 IH] //=; move/path_sorted=>H1. (* Goal: forall _ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))))), @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k1 k) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k)) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) *) rewrite inE negb_or; case/andP=>H2; move/(IH H1)=>H3. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k1 k) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k)) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) *) by rewrite eq_sym H2 H3. Qed. Lemma fnd_supp k (s : fmap) : k \notin supp s -> fnd k s = None. Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)))), @eq (option V) (@fnd K V k s) (@None V) *) by case: suppP. Qed. Lemma fnd_supp_in k (s : fmap) : k \in supp s -> exists v, fnd k s = Some v. Proof. (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s))), @ex V (fun v : V => @eq (option V) (@fnd K V k s) (@Some V v)) *) by case: suppP=>[v|]; [exists v|]. Qed. Lemma cancel_ins k v (s1 s2 : fmap) : k \notin (supp s1) -> k \notin (supp s2) -> ins k v s1 = ins k v s2 -> s1 = s2. End Laws. Section Append. Variable (K : ordType) (V : Type). Notation fmap := (finMap K V). Notation nil := (nil K V). Lemma seqof_ins k v (s : fmap) : path ord k (supp s) -> seq_of (ins k v s) = (k, v) :: seq_of s. Proof. (* Goal: forall _ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s)), @eq (list (prod (Ordered.sort K) V)) (@seq_of K V (@ins K V k v s)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@seq_of K V s)) *) by case: s; elim=>[|[k1 v1] s IH] //= _; case/andP=>->. Qed. Lemma path_supp_ins k1 k v (s : fmap) : ord k1 k -> path ord k1 (supp s) -> path ord k1 (supp (ins k v s)). Proof. (* Goal: forall (_ : is_true (@ord K k1 k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V s))), is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@ins K V k v s))) *) case: s=>s p. (* Goal: forall (_ : is_true (@ord K k1 k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@FinMap K V s p)))), is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@ins K V k v (@FinMap K V s p)))) *) elim: s p k1 k v=>[| [k2 v2] s IH] //= p k1 k v H2; first by rewrite H2. (* Goal: forall _ : is_true (andb (@ord K k1 k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))), is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@FinMap K V (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s)) (@sorted_ins' K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) k v p)))) *) case/andP=>H3 H4. (* Goal: is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@FinMap K V (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s)) (@sorted_ins' K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) k v p)))) *) have H5: path ord k1 (map key s) by apply: ord_path H4. (* Goal: is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@FinMap K V (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s)) (@sorted_ins' K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) k v p)))) *) rewrite /supp /=; case: (totalP k k2)=>H /=. (* Goal: is_true (andb (@ord K k1 k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s)))) *) (* Goal: is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) *) (* Goal: is_true (andb (@ord K k1 k) (andb (@ord K k k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))) *) - (* Goal: is_true (andb (@ord K k1 k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s)))) *) (* Goal: is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) *) (* Goal: is_true (andb (@ord K k1 k) (andb (@ord K k k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))) *) by rewrite H2 H H4. (* Goal: is_true (andb (@ord K k1 k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s)))) *) (* Goal: is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) *) - (* Goal: is_true (andb (@ord K k1 k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s)))) *) (* Goal: is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) *) by rewrite H2 (eqP H) H4. (* Goal: is_true (andb (@ord K k1 k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s)))) *) rewrite H3 /=. (* Goal: is_true (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s))) *) have H6: sorted ord (map key s) by apply: path_sorted H5. (* Goal: is_true (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s))) *) by move: (IH H6 k2 k v H H4); case: s {IH p H4 H5} H6. Qed. Lemma path_supp_ins_inv k1 k v (s : fmap) : path ord k (supp s) -> path ord k1 (supp (ins k v s)) -> ord k1 k && path ord k1 (supp s). Proof. (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s))) (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@ins K V k v s)))), is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k1 (@supp K V s))) *) case: s=>s p; rewrite /supp /= => H1; rewrite last_ins' //=. (* Goal: forall _ : is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))), is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) *) by case/andP=>H2 H3; rewrite H2; apply: ord_path H3. Qed. Lemma fmap_ind' (P : fmap -> Prop) : P nil -> (forall k v s, path ord k (supp s) -> P s -> P (ins k v s)) -> forall s, P s. Proof. (* Goal: forall (_ : P (SerTop.nil K V)) (_ : forall (k : Ordered.sort K) (v : V) (s : finMap K V) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s))) (_ : P s), P (@ins K V k v s)) (s : finMap K V), P s *) move=>H1 H2; case; elim=>[|[k v] s IH] /= H. (* Goal: P (@FinMap K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s) H) *) (* Goal: P (@FinMap K V (@Datatypes.nil (prod (Ordered.sort K) V)) H) *) - (* Goal: P (@FinMap K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s) H) *) (* Goal: P (@FinMap K V (@Datatypes.nil (prod (Ordered.sort K) V)) H) *) by rewrite (_ : FinMap _ = nil); last by rewrite fmapE. (* Goal: P (@FinMap K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s) H) *) have S: sorted ord (map key s) by apply: path_sorted H. (* Goal: P (@FinMap K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s) H) *) rewrite (_ : FinMap _ = ins k v (FinMap S)); last by rewrite fmapE /= last_ins'. (* Goal: P (@ins K V k v (@FinMap K V s S)) *) by apply: H2. Qed. Lemma fmap_ind'' (P : fmap -> Prop) : P nil -> (forall k v s, (forall x, x \in supp s -> ord x k) -> P s -> P (ins k v s)) -> forall s, P s. Proof. (* Goal: forall (_ : P (SerTop.nil K V)) (_ : forall (k : Ordered.sort K) (v : V) (s : finMap K V) (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)))), is_true (@ord K x k)) (_ : P s), P (@ins K V k v s)) (s : finMap K V), P s *) move=>H1 H2; case; elim/last_ind=>[|s [k v] IH] /= H. (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) (* Goal: P (@FinMap K V (@Datatypes.nil (prod (Ordered.sort K) V)) H) *) - (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) (* Goal: P (@FinMap K V (@Datatypes.nil (prod (Ordered.sort K) V)) H) *) by rewrite (_ : FinMap _ = nil); last by rewrite fmapE. (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) have Sb: subseq (map key s) (map key (rcons s (k, v))). (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) (* Goal: is_true (@subseq (Ordered.eqType K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)))) *) - (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) (* Goal: is_true (@subseq (Ordered.eqType K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)))) *) by elim: s {IH H}=>[|x s IH] //=; rewrite eq_refl. (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) have S : sorted ord (map key s). (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) (* Goal: is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)) *) - (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) (* Goal: is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)) *) by apply: subseq_sorted Sb H; apply: ordtype.trans. (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) have T : forall x : K, x \in map key s -> ord x k. (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) (* Goal: forall (x : Ordered.sort K) (_ : is_true (@in_mem (Ordered.sort K) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true (@ord K x k) *) - (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) (* Goal: forall (x : Ordered.sort K) (_ : is_true (@in_mem (Ordered.sort K) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true (@ord K x k) *) elim: {IH Sb S} s H=>[|[k1 v1] s IH] //= L x. (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) (* Goal: forall _ : is_true (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true (@ord K x k) *) rewrite inE; case/orP; last by apply: IH; apply: path_sorted L. (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) (* Goal: forall _ : is_true (@eq_op (Ordered.eqType K) x k1), is_true (@ord K x k) *) move/eqP=>->; elim: s {IH} L=>[|[x1 w1] s IH] /=; first by rewrite andbT. (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) (* Goal: forall _ : is_true (andb (@ord K k1 x1) (@path (Ordered.sort K) (@ord K) x1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v))))), is_true (@ord K k1 k) *) by case/andP=>O /(ord_path O) /IH. (* Goal: P (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) *) rewrite (_ : FinMap _ = ins k v (FinMap S)). (* Goal: @eq (finMap K V) (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) (@ins K V k v (@FinMap K V s S)) *) (* Goal: P (@ins K V k v (@FinMap K V s S)) *) - (* Goal: @eq (finMap K V) (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) (@ins K V k v (@FinMap K V s S)) *) (* Goal: P (@ins K V k v (@FinMap K V s S)) *) by apply: H2 (IH _)=>x /T. (* Goal: @eq (finMap K V) (@FinMap K V (@rcons (prod (Ordered.sort K) V) s (@pair (Ordered.sort K) V k v)) H) (@ins K V k v (@FinMap K V s S)) *) by rewrite fmapE /= first_ins'. Qed. Fixpoint fcat' (s1 : fmap) (s2 : seq (K * V)) {struct s2} : fmap := if s2 is (k, v)::t then fcat' (ins k v s1) t else s1. Definition fcat s1 s2 := fcat' s1 (seq_of s2). Lemma fcat_ins' k v s1 s2 : k \notin (map key s2) -> fcat' (ins k v s1) s2 = ins k v (fcat' s1 s2). Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))), @eq (finMap K V) (fcat' (@ins K V k v s1) s2) (@ins K V k v (fcat' s1 s2)) *) move=>H; elim: s2 k v s1 H=>[|[k2 v2] s2 IH] k1 v1 s1 //=. (* Goal: forall _ : is_true (negb (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))))), @eq (finMap K V) (fcat' (@ins K V k2 v2 (@ins K V k1 v1 s1)) s2) (@ins K V k1 v1 (fcat' (@ins K V k2 v2 s1) s2)) *) rewrite inE negb_or; case/andP=>H1 H2. (* Goal: @eq (finMap K V) (fcat' (@ins K V k2 v2 (@ins K V k1 v1 s1)) s2) (@ins K V k1 v1 (fcat' (@ins K V k2 v2 s1) s2)) *) by rewrite -IH // ins_ins eq_sym (negbTE H1). Qed. Lemma fcat_nil' s : fcat' nil (seq_of s) = s. Proof. (* Goal: @eq (finMap K V) (fcat' (SerTop.nil K V) (@seq_of K V s)) s *) elim/fmap_ind': s=>[|k v s L IH] //=. (* Goal: @eq (finMap K V) (fcat' (SerTop.nil K V) (@seq_of K V (@ins K V k v s))) (@ins K V k v s) *) by rewrite seqof_ins //= (_ : FinMap _ = ins k v nil) // fcat_ins' ?notin_path // IH. Qed. Lemma fcat0s s : fcat nil s = s. Proof. by apply: fcat_nil'. Qed. Proof. (* Goal: @eq (finMap K V) (fcat (SerTop.nil K V) s) s *) by apply: fcat_nil'. Qed. Lemma fcat_inss k v s1 s2 : k \notin supp s2 -> fcat (ins k v s1) s2 = ins k v (fcat s1 s2). Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq (finMap K V) (fcat (@ins K V k v s1) s2) (@ins K V k v (fcat s1 s2)) *) by case: s2=>s2 p2 H /=; apply: fcat_ins'. Qed. Lemma fcat_sins k v s1 s2 : fcat s1 (ins k v s2) = ins k v (fcat s1 s2). Lemma fcat_rems k s1 s2 : k \notin supp s2 -> fcat (rem k s1) s2 = rem k (fcat s1 s2). Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq (finMap K V) (fcat (@rem K V k s1) s2) (@rem K V k (fcat s1 s2)) *) elim/fmap_ind': s2 k s1=>[|k2 v2 s2 H IH] k1 v1. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))))), @eq (finMap K V) (fcat (@rem K V k1 v1) (@ins K V k2 v2 s2)) (@rem K V k1 (fcat v1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))))), @eq (finMap K V) (fcat (@rem K V k1 v1) (SerTop.nil K V)) (@rem K V k1 (fcat v1 (SerTop.nil K V))) *) - (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))))), @eq (finMap K V) (fcat (@rem K V k1 v1) (@ins K V k2 v2 s2)) (@rem K V k1 (fcat v1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))))), @eq (finMap K V) (fcat (@rem K V k1 v1) (SerTop.nil K V)) (@rem K V k1 (fcat v1 (SerTop.nil K V))) *) by rewrite !fcats0. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))))), @eq (finMap K V) (fcat (@rem K V k1 v1) (@ins K V k2 v2 s2)) (@rem K V k1 (fcat v1 (@ins K V k2 v2 s2))) *) rewrite supp_ins inE /= negb_or; case/andP=>H1 H2. (* Goal: @eq (finMap K V) (fcat (@rem K V k1 v1) (@ins K V k2 v2 s2)) (@rem K V k1 (fcat v1 (@ins K V k2 v2 s2))) *) by rewrite fcat_sins IH // ins_rem eq_sym (negbTE H1) -fcat_sins. Qed. Lemma fcat_srem k s1 s2 : k \notin supp s1 -> fcat s1 (rem k s2) = rem k (fcat s1 s2). Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k s2)) (@rem K V k (fcat s1 s2)) *) elim/fmap_ind': s2 k s1=>[|k2 v2 s2 H IH] k1 s1. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (SerTop.nil K V))) (@rem K V k1 (fcat s1 (SerTop.nil K V))) *) - (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (SerTop.nil K V))) (@rem K V k1 (fcat s1 (SerTop.nil K V))) *) rewrite rem_empty fcats0. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) s1 (@rem K V k1 s1) *) elim/fmap_ind': s1=>[|k3 v3 s3 H1 IH]; first by rewrite rem_empty. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k3 v3 s3))))), @eq (finMap K V) (@ins K V k3 v3 s3) (@rem K V k1 (@ins K V k3 v3 s3)) *) rewrite supp_ins inE /= negb_or. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (andb (negb (@eq_op (Ordered.eqType K) k1 k3)) (negb (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s3))))), @eq (finMap K V) (@ins K V k3 v3 s3) (@rem K V k1 (@ins K V k3 v3 s3)) *) case/andP=>H2; move/IH=>E; rewrite {1}E . (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) (* Goal: @eq (finMap K V) (@ins K V k3 v3 (@rem K V k1 s3)) (@rem K V k1 (@ins K V k3 v3 s3)) *) by rewrite ins_rem eq_sym (negbTE H2). (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) move=>H1; rewrite fcat_sins rem_ins; case: ifP=>E. (* Goal: @eq (finMap K V) (fcat s1 (@ins K V k2 v2 (@rem K V k1 s2))) (@rem K V k1 (@ins K V k2 v2 (fcat s1 s2))) *) (* Goal: @eq (finMap K V) (fcat s1 (@rem K V k1 s2)) (@rem K V k1 (@ins K V k2 v2 (fcat s1 s2))) *) - (* Goal: @eq (finMap K V) (fcat s1 (@ins K V k2 v2 (@rem K V k1 s2))) (@rem K V k1 (@ins K V k2 v2 (fcat s1 s2))) *) (* Goal: @eq (finMap K V) (fcat s1 (@rem K V k1 s2)) (@rem K V k1 (@ins K V k2 v2 (fcat s1 s2))) *) by rewrite rem_ins E IH. (* Goal: @eq (finMap K V) (fcat s1 (@ins K V k2 v2 (@rem K V k1 s2))) (@rem K V k1 (@ins K V k2 v2 (fcat s1 s2))) *) by rewrite rem_ins E -IH // -fcat_sins. Qed. Lemma fnd_fcat k s1 s2 : fnd k (fcat s1 s2) = if k \in supp s2 then fnd k s2 else fnd k s1. Proof. (* Goal: @eq (option V) (@fnd K V k (fcat s1 s2)) (if @in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)) then @fnd K V k s2 else @fnd K V k s1) *) elim/fmap_ind': s2 k s1=>[|k2 v2 s2 H IH] k1 s1. (* Goal: @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (if @in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))) then @fnd K V k1 (@ins K V k2 v2 s2) else @fnd K V k1 s1) *) (* Goal: @eq (option V) (@fnd K V k1 (fcat s1 (SerTop.nil K V))) (if @in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))) then @fnd K V k1 (SerTop.nil K V) else @fnd K V k1 s1) *) - (* Goal: @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (if @in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))) then @fnd K V k1 (@ins K V k2 v2 s2) else @fnd K V k1 s1) *) (* Goal: @eq (option V) (@fnd K V k1 (fcat s1 (SerTop.nil K V))) (if @in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))) then @fnd K V k1 (SerTop.nil K V) else @fnd K V k1 s1) *) by rewrite fcats0. (* Goal: @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (if @in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))) then @fnd K V k1 (@ins K V k2 v2 s2) else @fnd K V k1 s1) *) rewrite supp_ins inE /=; case: ifP; last first. (* Goal: forall _ : is_true (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 (@ins K V k2 v2 s2)) *) (* Goal: forall _ : @eq bool (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) false, @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 s1) *) - (* Goal: forall _ : is_true (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 (@ins K V k2 v2 s2)) *) (* Goal: forall _ : @eq bool (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) false, @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 s1) *) move/negbT; rewrite negb_or; case/andP=>H1 H2. (* Goal: forall _ : is_true (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 (@ins K V k2 v2 s2)) *) (* Goal: @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 s1) *) by rewrite fcat_sins fnd_ins (negbTE H1) IH (negbTE H2). (* Goal: forall _ : is_true (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 (@ins K V k2 v2 s2)) *) case/orP; first by move/eqP=><-; rewrite fcat_sins !fnd_ins eq_refl. (* Goal: forall _ : is_true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))), @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 (@ins K V k2 v2 s2)) *) move=>H1; rewrite fcat_sins !fnd_ins. (* Goal: @eq (option V) (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v2 else @fnd K V k1 (fcat s1 s2)) (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v2 else @fnd K V k1 s2) *) by case: ifP=>//; rewrite IH H1. Qed. Lemma supp_fcat s1 s2 : supp (fcat s1 s2) =i [predU supp s1 & supp s2]. Proof. (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s2))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))))) *) elim/fmap_ind': s2 s1=>[|k v s L IH] s1. (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 (@ins K V k v s)))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))))) *) (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 (SerTop.nil K V)))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))))))) *) - (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 (@ins K V k v s)))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))))) *) (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 (SerTop.nil K V)))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))))))) *) by rewrite supp_nil fcats0 => x; rewrite inE /= orbF. (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 (@ins K V k v s)))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))))) *) rewrite fcat_sins ?notin_path // => x. (* Goal: @eq bool (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v (fcat s1 s))))) (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s)))))))) *) rewrite supp_ins !inE /=. (* Goal: @eq bool (orb (@eq_op (Ordered.eqType K) x k) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s))))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) case E: (x == k)=>/=. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s)))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) (* Goal: @eq bool true (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) - (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s)))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) (* Goal: @eq bool true (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) by rewrite supp_ins inE /= E orbT. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s)))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) by rewrite IH supp_ins inE /= inE /= E. Qed. End Append. Section FMapInd. Variables (K : ordType) (V : Type). Notation fmap := (finMap K V). Notation nil := (@nil K V). Lemma supp_eq_ins (s1 s2 : fmap) k1 k2 v1 v2 : path ord k1 (supp s1) -> path ord k2 (supp s2) -> supp (ins k1 v1 s1) =i supp (ins k2 v2 s2) -> k1 = k2 /\ supp s1 =i supp s2. Proof. (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V s1))) (_ : is_true (@path (Ordered.sort K) (@ord K) k2 (@supp K V s2))) (_ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2)))), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) move=>H1 H2 H; move: (H k1) (H k2). (* Goal: forall (_ : @eq bool (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1)))) (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))))) (_ : @eq bool (@in_mem (Equality.sort (Ordered.eqType K)) k2 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1)))) (@in_mem (Equality.sort (Ordered.eqType K)) k2 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))))), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) rewrite !supp_ins !inE /= !eq_refl (eq_sym k2). (* Goal: forall (_ : @eq bool (orb true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))))) (_ : @eq bool (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (orb true (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))))), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) case: totalP=>/= E; last 1 first. (* Goal: forall (_ : @eq bool true true) (_ : @eq bool true true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) (* Goal: forall (_ : @eq bool true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) (* Goal: forall (_ : @eq bool true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) - (* Goal: forall (_ : @eq bool true true) (_ : @eq bool true true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) (* Goal: forall (_ : @eq bool true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) (* Goal: forall (_ : @eq bool true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) by move: H1; move/(ord_path E); move/notin_path; move/negbTE=>->. (* Goal: forall (_ : @eq bool true true) (_ : @eq bool true true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) (* Goal: forall (_ : @eq bool true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) - (* Goal: forall (_ : @eq bool true true) (_ : @eq bool true true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) (* Goal: forall (_ : @eq bool true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) by move: H2; move/(ord_path E); move/notin_path; move/negbTE=>->. (* Goal: forall (_ : @eq bool true true) (_ : @eq bool true true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) rewrite (eqP E) in H1 H2 H * => _ _; split=>// x; move: (H x). (* Goal: forall _ : @eq bool (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v1 s1)))) (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2)))), @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) rewrite !supp_ins !inE /=; case: eqP=>//= -> _. (* Goal: @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) by rewrite (negbTE (notin_path H1)) (negbTE (notin_path H2)). Qed. Lemma fmap_ind2 (P : fmap -> fmap -> Prop) : P nil nil -> (forall k v1 v2 s1 s2, path ord k (supp s1) -> path ord k (supp s2) -> P s1 s2 -> P (ins k v1 s1) (ins k v2 s2)) -> forall s1 s2, supp s1 =i supp s2 -> P s1 s2. Proof. (* Goal: forall (_ : P (SerTop.nil K V) (SerTop.nil K V)) (_ : forall (k : Ordered.sort K) (v1 v2 : V) (s1 s2 : finMap K V) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s1))) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s2))) (_ : P s1 s2), P (@ins K V k v1 s1) (@ins K V k v2 s2)) (s1 s2 : finMap K V) (_ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))), P s1 s2 *) move=>H1 H2; elim/fmap_ind'=>[|k1 v1 s1 T1 IH1]; elim/fmap_ind'=>[|k2 v2 s2 T2 _] //. (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (@ins K V k1 v1 s1) (@ins K V k2 v2 s2) *) (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))), P (@ins K V k1 v1 s1) (SerTop.nil K V) *) (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (SerTop.nil K V) (@ins K V k2 v2 s2) *) - (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (@ins K V k1 v1 s1) (@ins K V k2 v2 s2) *) (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))), P (@ins K V k1 v1 s1) (SerTop.nil K V) *) (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (SerTop.nil K V) (@ins K V k2 v2 s2) *) by move/(_ k2); rewrite supp_ins inE /= eq_refl supp_nil. (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (@ins K V k1 v1 s1) (@ins K V k2 v2 s2) *) (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))), P (@ins K V k1 v1 s1) (SerTop.nil K V) *) - (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (@ins K V k1 v1 s1) (@ins K V k2 v2 s2) *) (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))), P (@ins K V k1 v1 s1) (SerTop.nil K V) *) by move/(_ k1); rewrite supp_ins inE /= eq_refl supp_nil. (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (@ins K V k1 v1 s1) (@ins K V k2 v2 s2) *) by case/supp_eq_ins=>// E; rewrite -{k2}E in T2 *; move/IH1; apply: H2. Qed. End FMapInd. Section Filtering. Variables (K : ordType) (V : Type). Notation fmap := (finMap K V). Notation nil := (nil K V). Definition kfilter' (p : pred K) (s : fmap) := filter (fun kv => p kv.1) (seq_of s). Lemma sorted_kfilter (p : pred K) s : sorted ord (map key (kfilter' p s)). Proof. (* Goal: is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (kfilter' p s))) *) by case: s=>s H; rewrite -filter_map path.sorted_filter //; apply: trans. Qed. Definition kfilter (p : pred K) (s : fmap) := FinMap (sorted_kfilter p s). Lemma supp_kfilt (p : pred K) (s : fmap) : supp (kfilter p s) = filter p (supp s). Proof. (* Goal: @eq (list (Ordered.sort K)) (@supp K V (kfilter p s)) (@filter (Ordered.sort K) p (@supp K V s)) *) case: s; rewrite /supp /kfilter /kfilter' /=. (* Goal: forall (seq_of : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) seq_of))), @eq (list (Ordered.sort K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p (@fst (Ordered.sort K) V kv)) seq_of)) (@filter (Ordered.sort K) p (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) seq_of)) *) elim=>[|[k v] s IH] //= /path_sorted /IH {IH} H. (* Goal: @eq (list (Ordered.sort K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (if p k then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p (@fst (Ordered.sort K) V kv)) s) else @filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p (@fst (Ordered.sort K) V kv)) s)) (if p k then @cons (Ordered.sort K) k (@filter (Ordered.sort K) p (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)) else @filter (Ordered.sort K) p (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)) *) by case E: (p k)=>//=; rewrite H. Qed. Lemma kfilt_nil (p : pred K) : kfilter p nil = nil. Proof. (* Goal: @eq (finMap K V) (kfilter p (SerTop.nil K V)) (SerTop.nil K V) *) by apply/fmapE. Qed. Lemma fnd_kfilt (p : pred K) k (s : fmap) : fnd k (kfilter p s) = if p k then fnd k s else None. Proof. (* Goal: @eq (option V) (@fnd K V k (kfilter p s)) (if p k then @fnd K V k s else @None V) *) case: s; rewrite /fnd /kfilter /kfilter' /=. (* Goal: forall (seq_of : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) seq_of))), @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p (@fst (Ordered.sort K) V kv)) seq_of) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if p k then match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) seq_of with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end else @None V) *) elim=>[|[k1 v] s IH] /=; first by case: ifP. (* Goal: forall _ : is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)), @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) (if p k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p (@fst (Ordered.sort K) V kv)) s) else @filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p (@fst (Ordered.sort K) V kv)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if p k then match (if @eq_op (Ordered.eqType K) k1 k then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end else @None V) *) move/path_sorted=>/IH {IH} H. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) (if p k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p (@fst (Ordered.sort K) V kv)) s) else @filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p (@fst (Ordered.sort K) V kv)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if p k then match (if @eq_op (Ordered.eqType K) k1 k then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end else @None V) *) case: ifP=>E1 /=; first by case: ifP=>E2 //; rewrite -(eqP E2) E1. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p (@fst (Ordered.sort K) V kv)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if p k then match (if @eq_op (Ordered.eqType K) k1 k then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end else @None V) *) case: ifP H=>E2 H //=; rewrite H; case: eqP=>// E3. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v) *) by rewrite -E3 E1 in E2. Qed. Lemma kfilt_ins (p : pred K) k v (s : fmap) : kfilter p (ins k v s) = if p k then ins k v (kfilter p s) else kfilter p s. Proof. (* Goal: @eq (finMap K V) (kfilter p (@ins K V k v s)) (if p k then @ins K V k v (kfilter p s) else kfilter p s) *) apply/fmapP=>k2; case: ifP=>E1. (* Goal: @eq (option V) (@fnd K V k2 (kfilter p (@ins K V k v s))) (@fnd K V k2 (kfilter p s)) *) (* Goal: @eq (option V) (@fnd K V k2 (kfilter p (@ins K V k v s))) (@fnd K V k2 (@ins K V k v (kfilter p s))) *) - (* Goal: @eq (option V) (@fnd K V k2 (kfilter p (@ins K V k v s))) (@fnd K V k2 (kfilter p s)) *) (* Goal: @eq (option V) (@fnd K V k2 (kfilter p (@ins K V k v s))) (@fnd K V k2 (@ins K V k v (kfilter p s))) *) by rewrite fnd_ins !fnd_kfilt fnd_ins; case: eqP=>// ->; rewrite E1. (* Goal: @eq (option V) (@fnd K V k2 (kfilter p (@ins K V k v s))) (@fnd K V k2 (kfilter p s)) *) by rewrite !fnd_kfilt fnd_ins; case: eqP=>// ->; rewrite E1. Qed. Lemma rem_kfilt (p : pred K) k (s : fmap) : rem k (kfilter p s) = if p k then kfilter p (rem k s) else kfilter p s. Proof. (* Goal: @eq (finMap K V) (@rem K V k (kfilter p s)) (if p k then kfilter p (@rem K V k s) else kfilter p s) *) apply/fmapP=>k2; case: ifP=>E1. (* Goal: @eq (option V) (@fnd K V k2 (@rem K V k (kfilter p s))) (@fnd K V k2 (kfilter p s)) *) (* Goal: @eq (option V) (@fnd K V k2 (@rem K V k (kfilter p s))) (@fnd K V k2 (kfilter p (@rem K V k s))) *) - (* Goal: @eq (option V) (@fnd K V k2 (@rem K V k (kfilter p s))) (@fnd K V k2 (kfilter p s)) *) (* Goal: @eq (option V) (@fnd K V k2 (@rem K V k (kfilter p s))) (@fnd K V k2 (kfilter p (@rem K V k s))) *) by rewrite fnd_rem !fnd_kfilt fnd_rem; case: eqP=>// ->; rewrite E1. (* Goal: @eq (option V) (@fnd K V k2 (@rem K V k (kfilter p s))) (@fnd K V k2 (kfilter p s)) *) by rewrite fnd_rem fnd_kfilt; case: eqP=>// ->; rewrite E1. Qed. Lemma kfilt_rem (p : pred K) k (s : fmap) : kfilter p (rem k s) = if p k then rem k (kfilter p s) else kfilter p s. Proof. (* Goal: @eq (finMap K V) (kfilter p (@rem K V k s)) (if p k then @rem K V k (kfilter p s) else kfilter p s) *) apply/fmapP=>k2; case: ifP=>E1. (* Goal: @eq (option V) (@fnd K V k2 (kfilter p (@rem K V k s))) (@fnd K V k2 (kfilter p s)) *) (* Goal: @eq (option V) (@fnd K V k2 (kfilter p (@rem K V k s))) (@fnd K V k2 (@rem K V k (kfilter p s))) *) - (* Goal: @eq (option V) (@fnd K V k2 (kfilter p (@rem K V k s))) (@fnd K V k2 (kfilter p s)) *) (* Goal: @eq (option V) (@fnd K V k2 (kfilter p (@rem K V k s))) (@fnd K V k2 (@rem K V k (kfilter p s))) *) by rewrite fnd_kfilt !fnd_rem fnd_kfilt; case: eqP=>// ->; rewrite E1. (* Goal: @eq (option V) (@fnd K V k2 (kfilter p (@rem K V k s))) (@fnd K V k2 (kfilter p s)) *) by rewrite !fnd_kfilt fnd_rem; case: eqP=>// ->; rewrite E1. Qed. Lemma kfilt_fcat (p : pred K) (s1 s2 : fmap) : kfilter p (fcat s1 s2) = fcat (kfilter p s1) (kfilter p s2). Proof. (* Goal: @eq (finMap K V) (kfilter p (@fcat K V s1 s2)) (@fcat K V (kfilter p s1) (kfilter p s2)) *) apply/fmapP=>k; rewrite fnd_kfilt !fnd_fcat !fnd_kfilt supp_kfilt mem_filter. (* Goal: @eq (option V) (if p k then if @in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)) then @fnd K V k s2 else @fnd K V k s1 else @None V) (if andb (p k) (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))) then if p k then @fnd K V k s2 else @None V else if p k then @fnd K V k s1 else @None V) *) by case: ifP. Qed. Lemma kfilter_pred0 (s : fmap) : kfilter pred0 s = nil. Proof. (* Goal: @eq (finMap K V) (kfilter (@pred_of_simpl (Ordered.sort K) (@pred0 (Ordered.sort K))) s) (SerTop.nil K V) *) by apply/fmapE; rewrite /= /kfilter' filter_pred0. Qed. Lemma kfilter_predT (s : fmap) : kfilter predT s = s. Proof. (* Goal: @eq (finMap K V) (kfilter (@pred_of_simpl (Ordered.sort K) (@predT (Ordered.sort K))) s) s *) by apply/fmapE; rewrite /= /kfilter' filter_predT. Qed. Lemma kfilter_predI p1 p2 (s : fmap) : kfilter (predI p1 p2) s = kfilter p1 (kfilter p2 s). Proof. (* Goal: @eq (finMap K V) (kfilter (@pred_of_simpl (Ordered.sort K) (@predI (Ordered.sort K) p1 p2)) s) (kfilter p1 (kfilter p2 s)) *) by apply/fmapE; rewrite /= /kfilter' filter_predI. Qed. Lemma kfilter_predU p1 p2 (s : fmap) : kfilter (predU p1 p2) s = fcat (kfilter p1 s) (kfilter p2 s). Proof. (* Goal: @eq (finMap K V) (kfilter (@pred_of_simpl (Ordered.sort K) (@predU (Ordered.sort K) p1 p2)) s) (@fcat K V (kfilter p1 s) (kfilter p2 s)) *) apply/fmapP=>k; rewrite fnd_kfilt fnd_fcat !fnd_kfilt supp_kfilt mem_filter. (* Goal: @eq (option V) (if @pred_of_simpl (Ordered.sort K) (@predU (Ordered.sort K) p1 p2) k then @fnd K V k s else @None V) (if andb (p2 k) (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s))) then if p2 k then @fnd K V k s else @None V else if p1 k then @fnd K V k s else @None V) *) rewrite inE /=; case: (ifP (p1 k)); case: (ifP (p2 k))=>//=; by [case: ifP | case: suppP]. Qed. Lemma eq_in_kfilter p1 p2 s : {in supp s, p1 =1 p2} -> kfilter p1 s = kfilter p2 s. Proof. (* Goal: forall _ : @prop_in1 (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)) (fun x : Equality.sort (Ordered.eqType K) => @eq bool (p1 x) (p2 x)) (inPhantom (@eqfun bool (Equality.sort (Ordered.eqType K)) p1 p2)), @eq (finMap K V) (kfilter p1 s) (kfilter p2 s) *) move=>H; apply/fmapE; rewrite /= /kfilter'. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p1 (@fst (Ordered.sort K) V kv)) (@seq_of K V s)) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p2 (@fst (Ordered.sort K) V kv)) (@seq_of K V s)) *) case: s H; rewrite /supp /=; elim=>[|[k v] s IH] //=. (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : @prop_in1 (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (fun x : Ordered.sort K => @eq bool (p1 x) (p2 x)) (inPhantom (@eqfun bool (Ordered.sort K) p1 p2))), @eq (list (prod (Ordered.sort K) V)) (if p1 k then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p1 (@fst (Ordered.sort K) V kv)) s) else @filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p1 (@fst (Ordered.sort K) V kv)) s) (if p2 k then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p2 (@fst (Ordered.sort K) V kv)) s) else @filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p2 (@fst (Ordered.sort K) V kv)) s) *) move/path_sorted/IH=>{IH} H H1. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if p1 k then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p1 (@fst (Ordered.sort K) V kv)) s) else @filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p1 (@fst (Ordered.sort K) V kv)) s) (if p2 k then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p2 (@fst (Ordered.sort K) V kv)) s) else @filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p2 (@fst (Ordered.sort K) V kv)) s) *) have ->: p1 k = p2 k by apply: H1; rewrite inE /= eq_refl. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if p2 k then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p1 (@fst (Ordered.sort K) V kv)) s) else @filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p1 (@fst (Ordered.sort K) V kv)) s) (if p2 k then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p2 (@fst (Ordered.sort K) V kv)) s) else @filter (prod (Ordered.sort K) V) (fun kv : prod (Ordered.sort K) V => p2 (@fst (Ordered.sort K) V kv)) s) *) by rewrite H // => x E; apply: H1; rewrite inE /= E orbT. Qed. End Filtering. Section DisjointUnion. Variable (K : ordType) (V : Type). Notation fmap := (finMap K V). Notation nil := (nil K V). Definition disj (s1 s2 : fmap) := all (predC (fun x => x \in supp s2)) (supp s1). CoInductive disj_spec (s1 s2 : fmap) : bool -> Type := | disj_true of (forall x, x \in supp s1 -> x \notin supp s2) : disj_spec s1 s2 true | disj_false x of x \in supp s1 & x \in supp s2 : disj_spec s1 s2 false. Lemma disjP s1 s2 : disj_spec s1 s2 (disj s1 s2). Proof. (* Goal: disj_spec s1 s2 (disj s1 s2) *) rewrite /disj; case E: (all _ _); first by apply/disj_true/allP. (* Goal: disj_spec s1 s2 false *) move: E; rewrite all_predC=>/negbFE H. (* Goal: disj_spec s1 s2 false *) case E: {-1}(supp s1) (H)=>[|k ?]; first by rewrite E. (* Goal: forall _ : is_true (@has (Equality.sort (Ordered.eqType K)) (fun x : Equality.sort (Ordered.eqType K) => @in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))) (@supp K V s1)), disj_spec s1 s2 false *) move/(nth_find k); move: H; rewrite has_find=>/(mem_nth k). (* Goal: forall (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) (@nth (Equality.sort (Ordered.eqType K)) k (@supp K V s1) (@find (Equality.sort (Ordered.eqType K)) (fun x : Equality.sort (Ordered.eqType K) => @in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))) (@supp K V s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) (@nth (Ordered.sort K) k (@supp K V s1) (@find (Ordered.sort K) (fun x : Equality.sort (Ordered.eqType K) => @in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))) (@supp K V s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), disj_spec s1 s2 false *) by apply: disj_false. Qed. Lemma disjC s1 s2 : disj s1 s2 = disj s2 s1. Proof. (* Goal: @eq bool (disj s1 s2) (disj s2 s1) *) case: disjP; case: disjP=>//. (* Goal: forall (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1))))) (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq bool false true *) (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))))), @eq bool true false *) - (* Goal: forall (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1))))) (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq bool false true *) (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))))), @eq bool true false *) by move=>x H1 H2; move/(_ x H2); rewrite H1. (* Goal: forall (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1))))) (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq bool false true *) by move=>H1 x H2; move/H1; rewrite H2. Qed. Lemma disj_nil (s : fmap) : disj s nil. Proof. (* Goal: is_true (disj s (SerTop.nil K V)) *) by case: disjP. Qed. Lemma disj_ins k v (s1 s2 : fmap) : disj s1 (ins k v s2) = (k \notin supp s1) && (disj s1 s2). Proof. (* Goal: @eq bool (disj s1 (@ins K V k v s2)) (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) case: disjP=>[H|x H1]. (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: @eq bool true (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) - (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: @eq bool true (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) case E: (k \in supp s1)=>/=. (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: @eq bool true (disj s1 s2) *) (* Goal: @eq bool true false *) - (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: @eq bool true (disj s1 s2) *) (* Goal: @eq bool true false *) by move: (H _ E); rewrite supp_ins inE /= eq_refl. (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: @eq bool true (disj s1 s2) *) case: disjP=>// x H1 H2. (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: @eq bool true false *) by move: (H _ H1); rewrite supp_ins inE /= H2 orbT. (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) rewrite supp_ins inE /=; case/orP=>[|H2]. (* Goal: @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: forall _ : is_true (@eq_op (Ordered.eqType K) x k), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) - (* Goal: @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: forall _ : is_true (@eq_op (Ordered.eqType K) x k), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) by move/eqP=><-; rewrite H1. (* Goal: @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) rewrite andbC; case: disjP=>[H|y H3 H4] //=. (* Goal: @eq bool false (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) *) by move: (H _ H1); rewrite H2. Qed. Lemma disj_rem k (s1 s2 : fmap) : disj s1 s2 -> disj s1 (rem k s2). Proof. (* Goal: forall _ : is_true (disj s1 s2), is_true (disj s1 (@rem K V k s2)) *) case: disjP=>// H _; case: disjP=>// x; move/H. (* Goal: forall (_ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2))))), is_true false *) by rewrite supp_rem inE /= andbC; move/negbTE=>->. Qed. Lemma disj_remE k (s1 s2 : fmap) : k \notin supp s1 -> disj s1 (rem k s2) = disj s1 s2. Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq bool (disj s1 (@rem K V k s2)) (disj s1 s2) *) move=>H; case: disjP; case: disjP=>//; last first. (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2)))))), @eq bool true false *) (* Goal: forall (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))))) (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2))))), @eq bool false true *) - (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2)))))), @eq bool true false *) (* Goal: forall (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))))) (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2))))), @eq bool false true *) move=>H1 x; move/H1; rewrite supp_rem inE /= => E. (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2)))))), @eq bool true false *) (* Goal: forall _ : is_true (andb (negb (@eq_op (Ordered.eqType K) x k)) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq bool false true *) by rewrite (negbTE E) andbF. (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2)))))), @eq bool true false *) move=>x H1 H2 H3; move: (H3 x H1) H. (* Goal: forall (_ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2)))))) (_ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1))))), @eq bool true false *) rewrite supp_rem inE /= negb_and H2 orbF negbK. (* Goal: forall (_ : is_true (@eq_op (Ordered.eqType K) x k)) (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))))), @eq bool true false *) by move/eqP=><-; rewrite H1. Qed. Lemma disj_fcat (s s1 s2 : fmap) : disj s (fcat s1 s2) = disj s s1 && disj s s2. Proof. (* Goal: @eq bool (disj s (@fcat K V s1 s2)) (andb (disj s s1) (disj s s2)) *) elim/fmap_ind': s s1 s2=>[|k v s L IH] s1 s2. (* Goal: @eq bool (disj (@ins K V k v s) (@fcat K V s1 s2)) (andb (disj (@ins K V k v s) s1) (disj (@ins K V k v s) s2)) *) (* Goal: @eq bool (disj (SerTop.nil K V) (@fcat K V s1 s2)) (andb (disj (SerTop.nil K V) s1) (disj (SerTop.nil K V) s2)) *) - (* Goal: @eq bool (disj (@ins K V k v s) (@fcat K V s1 s2)) (andb (disj (@ins K V k v s) s1) (disj (@ins K V k v s) s2)) *) (* Goal: @eq bool (disj (SerTop.nil K V) (@fcat K V s1 s2)) (andb (disj (SerTop.nil K V) s1) (disj (SerTop.nil K V) s2)) *) by rewrite !(disjC nil) !disj_nil. (* Goal: @eq bool (disj (@ins K V k v s) (@fcat K V s1 s2)) (andb (disj (@ins K V k v s) s1) (disj (@ins K V k v s) s2)) *) rewrite !(disjC (ins _ _ _)) !disj_ins supp_fcat inE /= negb_or. (* Goal: @eq bool (andb (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))))) (disj (@fcat K V s1 s2) s)) (andb (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s)) (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (disj s2 s))) *) case: (k \in supp s1)=>//=. (* Goal: @eq bool (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (disj (@fcat K V s1 s2) s)) (andb (disj s1 s) (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (disj s2 s))) *) case: (k \in supp s2)=>//=; first by rewrite andbF. (* Goal: @eq bool (disj (@fcat K V s1 s2) s) (andb (disj s1 s) (disj s2 s)) *) by rewrite -!(disjC s) IH. Qed. Lemma fcatC (s1 s2 : fmap) : disj s1 s2 -> fcat s1 s2 = fcat s2 s1. Proof. (* Goal: forall _ : is_true (disj s1 s2), @eq (finMap K V) (@fcat K V s1 s2) (@fcat K V s2 s1) *) rewrite /fcat. (* Goal: forall _ : is_true (disj s1 s2), @eq (finMap K V) (@fcat' K V s1 (@seq_of K V s2)) (@fcat' K V s2 (@seq_of K V s1)) *) elim/fmap_ind': s2 s1=>[|k v s2 L IH] s1 /=; first by rewrite fcat_nil'. (* Goal: forall _ : is_true (disj s1 (@ins K V k v s2)), @eq (finMap K V) (@fcat' K V s1 (@seq_of K V (@ins K V k v s2))) (@fcat' K V (@ins K V k v s2) (@seq_of K V s1)) *) rewrite disj_ins; case/andP=>D1 D2. (* Goal: @eq (finMap K V) (@fcat' K V s1 (@seq_of K V (@ins K V k v s2))) (@fcat' K V (@ins K V k v s2) (@seq_of K V s1)) *) by rewrite fcat_ins' // -IH // seqof_ins //= -fcat_ins' ?notin_path. Qed. Lemma fcatA (s1 s2 s3 : fmap) : disj s2 s3 -> fcat (fcat s1 s2) s3 = fcat s1 (fcat s2 s3). Proof. (* Goal: forall _ : is_true (disj s2 s3), @eq (finMap K V) (@fcat K V (@fcat K V s1 s2) s3) (@fcat K V s1 (@fcat K V s2 s3)) *) move=>H. (* Goal: @eq (finMap K V) (@fcat K V (@fcat K V s1 s2) s3) (@fcat K V s1 (@fcat K V s2 s3)) *) elim/fmap_ind': s3 s1 s2 H=>[|k v s3 L IH] s1 s2 /=; first by rewrite !fcats0. (* Goal: forall _ : is_true (disj s2 (@ins K V k v s3)), @eq (finMap K V) (@fcat K V (@fcat K V s1 s2) (@ins K V k v s3)) (@fcat K V s1 (@fcat K V s2 (@ins K V k v s3))) *) rewrite disj_ins; case/andP=>H1 H2. (* Goal: @eq (finMap K V) (@fcat K V (@fcat K V s1 s2) (@ins K V k v s3)) (@fcat K V s1 (@fcat K V s2 (@ins K V k v s3))) *) by rewrite fcat_sins ?notin_path // IH // fcat_sins ?notin_path // fcat_sins. Qed. Lemma fcatAC (s1 s2 s3 : fmap) : [&& disj s1 s2, disj s2 s3 & disj s1 s3] -> fcat s1 (fcat s2 s3) = fcat s2 (fcat s1 s3). Proof. (* Goal: forall _ : is_true (andb (disj s1 s2) (andb (disj s2 s3) (disj s1 s3))), @eq (finMap K V) (@fcat K V s1 (@fcat K V s2 s3)) (@fcat K V s2 (@fcat K V s1 s3)) *) by case/and3P=>H1 H2 H3; rewrite -!fcatA // (@fcatC s1 s2). Qed. Lemma fcatCA (s1 s2 s3 : fmap) : [&& disj s1 s2, disj s2 s3 & disj s1 s3] -> fcat (fcat s1 s2) s3 = fcat (fcat s1 s3) s2. Proof. (* Goal: forall _ : is_true (andb (disj s1 s2) (andb (disj s2 s3) (disj s1 s3))), @eq (finMap K V) (@fcat K V (@fcat K V s1 s2) s3) (@fcat K V (@fcat K V s1 s3) s2) *) by case/and3P=>H1 H2 H3; rewrite !fcatA // ?(@fcatC s2 s3) ?(disjC s3). Qed. Lemma fcatsK (s s1 s2 : fmap) : disj s1 s && disj s2 s -> fcat s1 s = fcat s2 s -> s1 = s2. Proof. (* Goal: forall (_ : is_true (andb (disj s1 s) (disj s2 s))) (_ : @eq (finMap K V) (@fcat K V s1 s) (@fcat K V s2 s)), @eq (finMap K V) s1 s2 *) elim/fmap_ind': s s1 s2=>// k v s. (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s))) (_ : forall (s1 s2 : finMap K V) (_ : is_true (andb (disj s1 s) (disj s2 s))) (_ : @eq (finMap K V) (@fcat K V s1 s) (@fcat K V s2 s)), @eq (finMap K V) s1 s2) (s1 s2 : finMap K V) (_ : is_true (andb (disj s1 (@ins K V k v s)) (disj s2 (@ins K V k v s)))) (_ : @eq (finMap K V) (@fcat K V s1 (@ins K V k v s)) (@fcat K V s2 (@ins K V k v s))), @eq (finMap K V) s1 s2 *) move/notin_path=>H IH s1 s2; rewrite !disj_ins. (* Goal: forall (_ : is_true (andb (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s)) (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (disj s2 s)))) (_ : @eq (finMap K V) (@fcat K V s1 (@ins K V k v s)) (@fcat K V s2 (@ins K V k v s))), @eq (finMap K V) s1 s2 *) case/andP; case/andP=>H1 H2; case/andP=>H3 H4. (* Goal: forall _ : @eq (finMap K V) (@fcat K V s1 (@ins K V k v s)) (@fcat K V s2 (@ins K V k v s)), @eq (finMap K V) s1 s2 *) rewrite !fcat_sins // => H5. (* Goal: @eq (finMap K V) s1 s2 *) apply: IH; first by rewrite H2 H4. (* Goal: @eq (finMap K V) (@fcat K V s1 s) (@fcat K V s2 s) *) by apply: cancel_ins H5; rewrite supp_fcat negb_or /= ?H1?H3 H. Qed. Lemma fcatKs (s s1 s2 : fmap) : disj s s1 && disj s s2 -> fcat s s1 = fcat s s2 -> s1 = s2. Lemma disj_kfilt p1 p2 s1 s2 : disj s1 s2 -> disj (kfilter p1 s1) (kfilter p2 s2). Proof. (* Goal: forall _ : is_true (disj s1 s2), is_true (disj (@kfilter K V p1 s1) (@kfilter K V p2 s2)) *) elim/fmap_ind': s2 s1=>[|k v s _ IH] s1 /=. (* Goal: forall _ : is_true (disj s1 (@ins K V k v s)), is_true (disj (@kfilter K V p1 s1) (@kfilter K V p2 (@ins K V k v s))) *) (* Goal: forall _ : is_true (disj s1 (SerTop.nil K V)), is_true (disj (@kfilter K V p1 s1) (@kfilter K V p2 (SerTop.nil K V))) *) - (* Goal: forall _ : is_true (disj s1 (@ins K V k v s)), is_true (disj (@kfilter K V p1 s1) (@kfilter K V p2 (@ins K V k v s))) *) (* Goal: forall _ : is_true (disj s1 (SerTop.nil K V)), is_true (disj (@kfilter K V p1 s1) (@kfilter K V p2 (SerTop.nil K V))) *) by rewrite kfilt_nil => _; case: disjP. (* Goal: forall _ : is_true (disj s1 (@ins K V k v s)), is_true (disj (@kfilter K V p1 s1) (@kfilter K V p2 (@ins K V k v s))) *) rewrite disj_ins; case/andP=>H1 H2; rewrite kfilt_ins. (* Goal: is_true (disj (@kfilter K V p1 s1) (if p2 k then @ins K V k v (@kfilter K V p2 s) else @kfilter K V p2 s)) *) case: ifP=>E; last by apply: IH. (* Goal: is_true (disj (@kfilter K V p1 s1) (@ins K V k v (@kfilter K V p2 s))) *) rewrite disj_ins supp_kfilt mem_filter negb_and H1 orbT /=. (* Goal: is_true (disj (@kfilter K V p1 s1) (@kfilter K V p2 s)) *) by apply: IH. Qed. Lemma in_disj_kfilt p1 p2 s : {in supp s, forall x, ~~ p1 x || ~~ p2 x} -> disj (kfilter p1 s) (kfilter p2 s). Proof. (* Goal: forall _ : @prop_in1 (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)) (fun x : Equality.sort (Ordered.eqType K) => is_true (orb (negb (p1 x)) (negb (p2 x)))) (inPhantom (forall x : Equality.sort (Ordered.eqType K), is_true (orb (negb (p1 x)) (negb (p2 x))))), is_true (disj (@kfilter K V p1 s) (@kfilter K V p2 s)) *) elim/fmap_ind': s=>[|k v s _ IH] //= H. (* Goal: is_true (disj (@kfilter K V p1 (@ins K V k v s)) (@kfilter K V p2 (@ins K V k v s))) *) rewrite !kfilt_ins; case: ifP=>E1; case: ifP=>E2. (* Goal: is_true (disj (@kfilter K V p1 s) (@kfilter K V p2 s)) *) (* Goal: is_true (disj (@kfilter K V p1 s) (@ins K V k v (@kfilter K V p2 s))) *) (* Goal: is_true (disj (@ins K V k v (@kfilter K V p1 s)) (@kfilter K V p2 s)) *) (* Goal: is_true (disj (@ins K V k v (@kfilter K V p1 s)) (@ins K V k v (@kfilter K V p2 s))) *) - (* Goal: is_true (disj (@kfilter K V p1 s) (@kfilter K V p2 s)) *) (* Goal: is_true (disj (@kfilter K V p1 s) (@ins K V k v (@kfilter K V p2 s))) *) (* Goal: is_true (disj (@ins K V k v (@kfilter K V p1 s)) (@kfilter K V p2 s)) *) (* Goal: is_true (disj (@ins K V k v (@kfilter K V p1 s)) (@ins K V k v (@kfilter K V p2 s))) *) move: (H k); rewrite E1 E2 supp_ins inE /= eq_refl /=. (* Goal: is_true (disj (@kfilter K V p1 s) (@kfilter K V p2 s)) *) (* Goal: is_true (disj (@kfilter K V p1 s) (@ins K V k v (@kfilter K V p2 s))) *) (* Goal: is_true (disj (@ins K V k v (@kfilter K V p1 s)) (@kfilter K V p2 s)) *) (* Goal: forall _ : forall _ : is_true true, is_true false, is_true (disj (@FinMap K V (@ins' K V k v (@kfilter' K V p1 s)) (@sorted_ins' K V (@kfilter' K V p1 s) k v (@sorted_kfilter K V p1 s))) (@FinMap K V (@ins' K V k v (@kfilter' K V p2 s)) (@sorted_ins' K V (@kfilter' K V p2 s) k v (@sorted_kfilter K V p2 s)))) *) by move/(_ (erefl _)). (* Goal: is_true (disj (@kfilter K V p1 s) (@kfilter K V p2 s)) *) (* Goal: is_true (disj (@kfilter K V p1 s) (@ins K V k v (@kfilter K V p2 s))) *) (* Goal: is_true (disj (@ins K V k v (@kfilter K V p1 s)) (@kfilter K V p2 s)) *) - (* Goal: is_true (disj (@kfilter K V p1 s) (@kfilter K V p2 s)) *) (* Goal: is_true (disj (@kfilter K V p1 s) (@ins K V k v (@kfilter K V p2 s))) *) (* Goal: is_true (disj (@ins K V k v (@kfilter K V p1 s)) (@kfilter K V p2 s)) *) rewrite disjC disj_ins disjC supp_kfilt mem_filter negb_and E2 /=. (* Goal: is_true (disj (@kfilter K V p1 s) (@kfilter K V p2 s)) *) (* Goal: is_true (disj (@kfilter K V p1 s) (@ins K V k v (@kfilter K V p2 s))) *) (* Goal: is_true (disj (@kfilter K V p1 s) (@kfilter K V p2 s)) *) by apply: IH=>x S; apply: H; rewrite supp_ins inE /= S orbT. (* Goal: is_true (disj (@kfilter K V p1 s) (@kfilter K V p2 s)) *) (* Goal: is_true (disj (@kfilter K V p1 s) (@ins K V k v (@kfilter K V p2 s))) *) - (* Goal: is_true (disj (@kfilter K V p1 s) (@kfilter K V p2 s)) *) (* Goal: is_true (disj (@kfilter K V p1 s) (@ins K V k v (@kfilter K V p2 s))) *) rewrite disj_ins supp_kfilt mem_filter negb_and E1 /=. (* Goal: is_true (disj (@kfilter K V p1 s) (@kfilter K V p2 s)) *) (* Goal: is_true (disj (@kfilter K V p1 s) (@kfilter K V p2 s)) *) by apply: IH=>x S; apply: H; rewrite supp_ins inE /= S orbT. (* Goal: is_true (disj (@kfilter K V p1 s) (@kfilter K V p2 s)) *) by apply: IH=>x S; apply: H; rewrite supp_ins inE /= S orbT. Qed. End DisjointUnion. Section EqType. Variables (K : ordType) (V : eqType). Definition feq (s1 s2 : finMap K V) := seq_of s1 == seq_of s2. Lemma feqP : Equality.axiom feq. Proof. (* Goal: @Equality.axiom (finMap K (Equality.sort V)) feq *) move=>s1 s2; rewrite /feq. (* Goal: Bool.reflect (@eq (finMap K (Equality.sort V)) s1 s2) (@eq_op (seq_eqType (prod_eqType (Ordered.eqType K) V)) (@seq_of K (Equality.sort V) s1) (@seq_of K (Equality.sort V) s2)) *) case: eqP; first by move/fmapE=>->; apply: ReflectT. (* Goal: forall _ : not (@eq (Equality.sort (seq_eqType (prod_eqType (Ordered.eqType K) V))) (@seq_of K (Equality.sort V) s1) (@seq_of K (Equality.sort V) s2)), Bool.reflect (@eq (finMap K (Equality.sort V)) s1 s2) false *) by move=>H; apply: ReflectF; move/fmapE; move/H. Qed. Canonical Structure fmap_eqMixin := EqMixin feqP. Canonical Structure fmap_eqType := EqType (finMap K V) fmap_eqMixin. End EqType. Section Map. Variables (K : ordType) (U V : Type) (f : U -> V). Definition mapf' (m : seq (K * U)) : seq (K * V) := map (fun kv => (key kv, f (value kv))) m. Lemma map_key_mapf (m : seq (K * U)) : map key (mapf' m) = map key m. Proof. (* Goal: @eq (list (Ordered.sort K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (mapf' m)) (@map (prod (Ordered.sort K) U) (Ordered.sort K) (@key K U) m) *) by elim: m=>[|[k v] m IH] //=; rewrite IH. Qed. Lemma sorted_map (m : seq (K * U)) : sorted ord (map key m) -> sorted ord (map key (mapf' m)). Proof. (* Goal: forall _ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) U) (Ordered.sort K) (@key K U) m)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (mapf' m))) *) elim: m=>[|[k v] m IH] //= H. (* Goal: is_true (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (mapf' m))) *) rewrite path_min_sorted; first by apply: IH; apply: path_sorted H. (* Goal: @prop_in1 (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (mapf' m))) (fun y : Equality.sort (Ordered.eqType K) => is_true (@ord K k y)) (inPhantom (forall y : Equality.sort (Ordered.eqType K), is_true (@ord K k y))) *) move=>y; rewrite map_key_mapf. (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) y (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) U) (Ordered.sort K) (@key K U) m))), is_true (@ord K k y) *) by apply/allP; apply: order_path_min H; apply: trans. Qed. Definition mapf (m : finMap K U) : finMap K V := let: FinMap _ pf := m in FinMap (sorted_map pf). Lemma mapf_ins k v s : mapf (ins k v s) = ins k (f v) (mapf s). Proof. (* Goal: @eq (finMap K V) (mapf (@ins K U k v s)) (@ins K V k (f v) (mapf s)) *) case: s=>s H; apply/fmapE=>/=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (mapf' (@ins' K U k v s)) (@ins' K V k (f v) (mapf' s)) *) elim: s k v H=>[|[k1 v1] s IH] //= k v H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (mapf' (if @ord K k k1 then @cons (prod (Ordered.sort K) U) (@pair (Ordered.sort K) U k v) (@cons (prod (Ordered.sort K) U) (@pair (Ordered.sort K) U k1 v1) s) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) U) (@pair (Ordered.sort K) U k v) s else @cons (prod (Ordered.sort K) U) (@pair (Ordered.sort K) U k1 v1) (@ins' K U k v s))) (if @ord K k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k (f v)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 (f v1)) (mapf' s)) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k (f v)) (mapf' s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 (f v1)) (@ins' K V k (f v) (mapf' s))) *) rewrite eq_sym; case: totalP=>O //=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 (f v1)) (mapf' (@ins' K U k v s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 (f v1)) (@ins' K V k (f v) (mapf' s))) *) by rewrite IH // (path_sorted H). Qed. Lemma mapf_fcat s1 s2 : mapf (fcat s1 s2) = fcat (mapf s1) (mapf s2). Proof. (* Goal: @eq (finMap K V) (mapf (@fcat K U s1 s2)) (@fcat K V (mapf s1) (mapf s2)) *) elim/fmap_ind': s2 s1=>[|k v s2 H IH] s1 /=. (* Goal: @eq (finMap K V) (mapf (@fcat K U s1 (@ins K U k v s2))) (@fcat K V (mapf s1) (mapf (@ins K U k v s2))) *) (* Goal: @eq (finMap K V) (mapf (@fcat K U s1 (nil K U))) (@fcat K V (mapf s1) (@FinMap K V (@Datatypes.nil (prod (Ordered.sort K) V)) (@sorted_map (@Datatypes.nil (prod (Ordered.sort K) U)) (sorted_nil K U)))) *) - (* Goal: @eq (finMap K V) (mapf (@fcat K U s1 (@ins K U k v s2))) (@fcat K V (mapf s1) (mapf (@ins K U k v s2))) *) (* Goal: @eq (finMap K V) (mapf (@fcat K U s1 (nil K U))) (@fcat K V (mapf s1) (@FinMap K V (@Datatypes.nil (prod (Ordered.sort K) V)) (@sorted_map (@Datatypes.nil (prod (Ordered.sort K) U)) (sorted_nil K U)))) *) rewrite fcats0; set j := FinMap _. (* Goal: @eq (finMap K V) (mapf (@fcat K U s1 (@ins K U k v s2))) (@fcat K V (mapf s1) (mapf (@ins K U k v s2))) *) (* Goal: @eq (finMap K V) (mapf s1) (@fcat K V (mapf s1) j) *) by rewrite (_ : j = nil K V) ?fcat0s //; apply/fmapE. (* Goal: @eq (finMap K V) (mapf (@fcat K U s1 (@ins K U k v s2))) (@fcat K V (mapf s1) (mapf (@ins K U k v s2))) *) by rewrite fcat_sins mapf_ins IH -fcat_sins mapf_ins. Qed. Lemma mapf_disjL s1 s2 s : mapf s1 = mapf s2 -> disj s1 s = disj s2 s. Proof. (* Goal: forall _ : @eq (finMap K V) (mapf s1) (mapf s2), @eq bool (@disj K U s1 s) (@disj K U s2 s) *) case: s1 s2 s=>s1 S1 [s2 S2][s S] /fmapE /=. (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (mapf' s1) (mapf' s2), @eq bool (@disj K U (@FinMap K U s1 S1) (@FinMap K U s S)) (@disj K U (@FinMap K U s2 S2) (@FinMap K U s S)) *) elim: s1 S1 s2 S2 s S=>[|[k v] s1 IH] /= S1; case=>//= [[k2 v2]] s2 S2 s S. (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k (f v)) (mapf' s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V (@key K U (@pair (Ordered.sort K) U k2 v2)) (f (@value K U (@pair (Ordered.sort K) U k2 v2)))) (mapf' s2)), @eq bool (@disj K U (@FinMap K U (@cons (prod (Ordered.sort K) U) (@pair (Ordered.sort K) U k v) s1) S1) (@FinMap K U s S)) (@disj K U (@FinMap K U (@cons (prod (Ordered.sort K) U) (@pair (Ordered.sort K) U k2 v2) s2) S2) (@FinMap K U s S)) *) case=>E _; rewrite -{k2}E in S2 *. move/(IH (path_sorted S1) _ (path_sorted S2) _ S). by rewrite /disj /supp /= => ->. Qed. Qed. Lemma mapf_disj s1 s2 s1' s2' : mapf s1 = mapf s2 -> mapf s1' = mapf s2' -> disj s1 s1' = disj s2 s2'. End Map. Section FoldFMap. Variables (A B: ordType) (V C: Type). Definition foldfmap g (e: C) (s: finMap A V) := foldr g e (seq_of s). Lemma foldf_nil g e : foldfmap g e (@nil A V) = e. Proof. (* Goal: @eq C (foldfmap g e (nil A V)) e *) by rewrite /foldfmap //=. Qed. Lemma foldf_ins g e k v f: path ord k (supp f) -> foldfmap g e (ins k v f) = g (k, v) (foldfmap g e f). Proof. (* Goal: forall _ : is_true (@path (Ordered.sort A) (@ord A) k (@supp A V f)), @eq C (foldfmap g e (@ins A V k v f)) (g (@pair (Ordered.sort A) V k v) (foldfmap g e f)) *) by move=> H; rewrite /foldfmap //= seqof_ins //. Qed. End FoldFMap. Section KeyMap. Section MapDef. Variables (A B: ordType) (V : Type). Variable (f: A -> B). Hypothesis Hf : forall x y, strictly_increasing f x y. Definition mapk (m : finMap A V) : finMap B V := foldfmap (fun p s => ins (f (key p)) (value p) s) (nil B V) m. Lemma sorted_mapk m: sorted ord (supp (mapk m)). Proof. (* Goal: is_true (@sorted (Ordered.eqType B) (@ord B) (@supp B V (mapk m))) *) case: (mapk m)=>[s]I //=. Qed. Lemma path_mapk m k: path ord k (supp m) -> path ord (f k) (supp (mapk m)). Proof. (* Goal: forall _ : is_true (@path (Ordered.sort A) (@ord A) k (@supp A V m)), is_true (@path (Ordered.sort B) (@ord B) (f k) (@supp B V (mapk m))) *) elim/fmap_ind': m k =>// k1 v1 s P IH k. (* Goal: forall _ : is_true (@path (Ordered.sort A) (@ord A) k (@supp A V (@ins A V k1 v1 s))), is_true (@path (Ordered.sort B) (@ord B) (f k) (@supp B V (mapk (@ins A V k1 v1 s)))) *) rewrite {1}/supp //= {1}seqof_ins // /= => /andP [H]; move/IH=>H1. (* Goal: is_true (@path (Ordered.sort B) (@ord B) (f k) (@supp B V (mapk (@ins A V k1 v1 s)))) *) by rewrite /mapk foldf_ins // /supp /= seqof_ins //= H1 andbT (Hf H). Qed. Lemma mapk_nil : mapk (nil A V) = nil B V. Proof. (* Goal: @eq (finMap B V) (mapk (nil A V)) (nil B V) *) by rewrite /mapk //=. Qed. Lemma mapk_ins k v s : path ord k (supp s) -> mapk (ins k v s) = ins (f k) v (mapk s). Proof. (* Goal: forall _ : is_true (@path (Ordered.sort A) (@ord A) k (@supp A V s)), @eq (finMap B V) (mapk (@ins A V k v s)) (@ins B V (f k) v (mapk s)) *) by move=> H; rewrite /mapk foldf_ins =>//. Qed. End MapDef. Arguments mapk {A B V} f m. Variables (A B C : ordType)(V : Type)(f : A -> B) (g : B -> C). Hypothesis Hf : forall x y, strictly_increasing f x y. Lemma map_id m : @mapk A A V id m = m. Proof. (* Goal: @eq (finMap A V) (@mapk A A V (fun x : Ordered.sort A => x) m) m *) by elim/fmap_ind': m=>// k v s L IH; rewrite -{2}IH /mapk foldf_ins //. Qed. Lemma map_comp m: mapk g (@mapk A B V f m) = mapk (comp g f) m. Proof. (* Goal: @eq (finMap C V) (@mapk B C V g (@mapk A B V f m)) (@mapk A C V (@funcomp (Ordered.sort C) (Ordered.sort B) (Ordered.sort A) tt g f) m) *) elim/fmap_ind': m =>//= k v s P IH. (* Goal: @eq (finMap C V) (@mapk B C V g (@mapk A B V f (@ins A V k v s))) (@mapk A C V (@funcomp (Ordered.sort C) (Ordered.sort B) (Ordered.sort A) tt g f) (@ins A V k v s)) *) rewrite [mapk (g \o f) _]mapk_ins //. (* Goal: @eq (finMap C V) (@mapk B C V g (@mapk A B V f (@ins A V k v s))) (@ins C V (@funcomp (Ordered.sort C) (Ordered.sort B) (Ordered.sort A) tt g f k) v (@mapk A C V (@funcomp (Ordered.sort C) (Ordered.sort B) (Ordered.sort A) tt g f) s)) *) rewrite mapk_ins // mapk_ins //; first by rewrite IH. (* Goal: is_true (@path (Ordered.sort B) (@ord B) (f k) (@supp B V (@mapk A B V f s))) *) exact: (path_mapk Hf P). Qed. End KeyMap. Arguments mapk {A B V} f m. Section Zip. Variables (K : ordType) (V : Type) (zip_f : V -> V -> option V). Variable (unit_f : V -> V). Variable (comm : commutative zip_f). Variable (assoc : forall x y z, obind (zip_f x) (zip_f y z) = obind (zip_f^~ z) (zip_f x y)). Variable (unitL : forall x, zip_f (unit_f x) x = Some x). Variable (unitE : forall x y, (exists z, zip_f x y = Some z) <-> unit_f x = unit_f y). Fixpoint zip' (s1 s2 : seq (K * V)) := match s1, s2 with [::], [::] => Some [::] | (k1, v1)::s1', (k2, v2)::s2' => if k1 == k2 then if zip_f v1 v2 is Some v then if zip' s1' s2' is Some s' then Some ((k1, v) :: s') else None else None else None | _, _ => None end. Definition zip_unit' (s : seq (K * V)) := mapf' unit_f s. Lemma zipC' s1 s2 : zip' s1 s2 = zip' s2 s1. Proof. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (zip' s2 s1) *) elim: s1 s2=>[|[k1 v1] s1 IH]; first by case=>//; case. (* Goal: forall s2 : list (prod (Ordered.sort K) V), @eq (option (list (prod (Ordered.sort K) V))) (zip' (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) s2) (zip' s2 (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1)) *) case=>[|[k2 v2] s2] //=; rewrite eq_sym; case: eqP=>// ->{k2}. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end match zip_f v2 v1 with | Some v => match zip' s2 s1 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end *) by rewrite comm IH. Qed. Lemma zipA' s1 s2 s3 : obind (zip' s1) (zip' s2 s3) = obind (zip'^~ s3) (zip' s1 s2). Proof. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (zip' s1) (zip' s2 s3)) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x s3) (zip' s1 s2)) *) elim: s1 s2 s3=>[|[k1 v1] s1 IH]. (* Goal: forall s2 s3 : list (prod (Ordered.sort K) V), @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (zip' (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1)) (zip' s2 s3)) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x s3) (zip' (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) s2)) *) (* Goal: forall s2 s3 : list (prod (Ordered.sort K) V), @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (zip' (@Datatypes.nil (prod (Ordered.sort K) V))) (zip' s2 s3)) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x s3) (zip' (@Datatypes.nil (prod (Ordered.sort K) V)) s2)) *) - (* Goal: forall s2 s3 : list (prod (Ordered.sort K) V), @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (zip' (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1)) (zip' s2 s3)) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x s3) (zip' (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) s2)) *) (* Goal: forall s2 s3 : list (prod (Ordered.sort K) V), @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (zip' (@Datatypes.nil (prod (Ordered.sort K) V))) (zip' s2 s3)) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x s3) (zip' (@Datatypes.nil (prod (Ordered.sort K) V)) s2)) *) case=>[|[k2 v2] s2]; case=>[|[k3 v3] s3] //=; case: eqP=>// ->{k2}. (* Goal: forall s2 s3 : list (prod (Ordered.sort K) V), @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (zip' (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1)) (zip' s2 s3)) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x s3) (zip' (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) s2)) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @Some (list (prod (Ordered.sort K) V)) (@Datatypes.nil (prod (Ordered.sort K) V)) | cons p l => @None (list (prod (Ordered.sort K) V)) end) match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) (@None (list (prod (Ordered.sort K) V))) *) by case: (zip_f v2 v3)=>// v; case: (zip' s2 s3). (* Goal: forall s2 s3 : list (prod (Ordered.sort K) V), @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (zip' (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1)) (zip' s2 s3)) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x s3) (zip' (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) s2)) *) case=>[|[k2 v2] s2]; case=>[|[k3 v3] s3] //=. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) (if @eq_op (Ordered.eqType K) k2 k3 then match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@Datatypes.nil (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) *) - (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) (if @eq_op (Ordered.eqType K) k2 k3 then match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@Datatypes.nil (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) *) by case: eqP=>// ->{k1}; case: (zip_f v1 v2)=>// v; case: (zip' s1 s2). (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) (if @eq_op (Ordered.eqType K) k2 k3 then match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) *) case: (k2 =P k3)=>[->{k2}|E1] /=; last first. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) (if @eq_op (Ordered.eqType K) k1 k3 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) *) - (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) (if @eq_op (Ordered.eqType K) k1 k3 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) *) case: (k1 =P k2)=>E2 //=. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) (if @eq_op (Ordered.eqType K) k1 k3 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) case: (zip_f v1 v2)=>// v. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) (if @eq_op (Ordered.eqType K) k1 k3 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end) *) case: (zip' s1 s2)=>//= s. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) (if @eq_op (Ordered.eqType K) k1 k3 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@None (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k1 k3 then match zip_f v v3 with | Some v => match zip' s s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) *) by rewrite E2; case: eqP E1. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) (if @eq_op (Ordered.eqType K) k1 k3 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)))) *) case: (k1 =P k3)=>[->{k1}|E1] /=; last first. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k3 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) (@None (list (prod (Ordered.sort K) V))) *) - (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k3 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) (@None (list (prod (Ordered.sort K) V))) *) by case: (zip_f v2 v3)=>// v; case: (zip' s2 s3)=>//= s; case: eqP E1. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k3 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip_f v2 v3 with | Some v => match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) case E1: (zip_f v2 v3)=>[w1|]; last first. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k3 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 w1) s') | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k3 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) (@None (list (prod (Ordered.sort K) V)))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) - (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k3 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 w1) s') | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k3 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) (@None (list (prod (Ordered.sort K) V)))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) case E3: (zip_f v1 v2)=>[w3|] //. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k3 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 w1) s') | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k3 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) (@None (list (prod (Ordered.sort K) V)))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 w3) s') | None => @None (list (prod (Ordered.sort K) V)) end) *) case S3: (zip' s1 s2)=>[t3|] //=; rewrite eq_refl. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k3 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 w1) s') | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@None (list (prod (Ordered.sort K) V))) match zip_f w3 v3 with | Some v => match zip' t3 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end *) by move: (assoc v1 v2 v3); rewrite /obind/oapp E1 E3=><-. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun s2 : list (prod (Ordered.sort K) V) => match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k3 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end) match zip' s2 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 w1) s') | None => @None (list (prod (Ordered.sort K) V)) end) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) case S1: (zip' s2 s3)=>[t1|] /=; last first. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k3 k3 then match zip_f v1 w1 with | Some v => match zip' s1 t1 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) - (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k3 k3 then match zip_f v1 w1 with | Some v => match zip' s1 t1 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) case E3: (zip_f v1 v2)=>[w3|//]. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k3 k3 then match zip_f v1 w1 with | Some v => match zip' s1 t1 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 w3) s') | None => @None (list (prod (Ordered.sort K) V)) end) *) case S3: (zip' s1 s2)=>[t3|] //=; rewrite eq_refl. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k3 k3 then match zip_f v1 w1 with | Some v => match zip' s1 t1 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@None (list (prod (Ordered.sort K) V))) match zip_f w3 v3 with | Some v => match zip' t3 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end *) move: (IH s2 s3); rewrite /obind/oapp S1 S3=><-. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k3 k3 then match zip_f v1 w1 with | Some v => match zip' s1 t1 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (@None (list (prod (Ordered.sort K) V))) match zip_f w3 v3 with | Some v => @None (list (prod (Ordered.sort K) V)) | None => @None (list (prod (Ordered.sort K) V)) end *) by case: (zip_f w3 v3). (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k3 k3 then match zip_f v1 w1 with | Some v => match zip' s1 t1 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) rewrite eq_refl. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) match zip_f v1 w1 with | Some v => match zip' s1 t1 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end (@Option.bind (list (prod (Ordered.sort K) V)) (list (prod (Ordered.sort K) V)) (fun x : list (prod (Ordered.sort K) V) => zip' x (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3)) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end) *) case E3: (zip_f v1 v2)=>[w3|]; move: (assoc v1 v2 v3); rewrite /obind/oapp E1 E3=>-> //=. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) match zip_f w3 v3 with | Some v => match zip' s1 t1 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end match match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 w3) s') | None => @None (list (prod (Ordered.sort K) V)) end with | Some y => zip' y (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s3) | None => @None (list (prod (Ordered.sort K) V)) end *) case S3: (zip' s1 s2)=>[t3|]; move: (IH s2 s3); rewrite /obind/oapp S3 S1=>-> /=. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) match zip_f w3 v3 with | Some v => @None (list (prod (Ordered.sort K) V)) | None => @None (list (prod (Ordered.sort K) V)) end (@None (list (prod (Ordered.sort K) V))) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) match zip_f w3 v3 with | Some v => match zip' t3 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end (if @eq_op (Ordered.eqType K) k3 k3 then match zip_f w3 v3 with | Some v => match zip' t3 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) *) - (* Goal: @eq (option (list (prod (Ordered.sort K) V))) match zip_f w3 v3 with | Some v => @None (list (prod (Ordered.sort K) V)) | None => @None (list (prod (Ordered.sort K) V)) end (@None (list (prod (Ordered.sort K) V))) *) (* Goal: @eq (option (list (prod (Ordered.sort K) V))) match zip_f w3 v3 with | Some v => match zip' t3 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end (if @eq_op (Ordered.eqType K) k3 k3 then match zip_f w3 v3 with | Some v => match zip' t3 s3 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) *) by rewrite eq_refl. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) match zip_f w3 v3 with | Some v => @None (list (prod (Ordered.sort K) V)) | None => @None (list (prod (Ordered.sort K) V)) end (@None (list (prod (Ordered.sort K) V))) *) by case: (zip_f w3 v3). Qed. Lemma zip_unitL' s : zip' (zip_unit' s) s = Some s. Proof. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (zip' (zip_unit' s) s) (@Some (list (prod (Ordered.sort K) V)) s) *) by elim: s=>[|[k v] s IH] //=; rewrite eq_refl unitL IH. Qed. Lemma map_key_zip' s1 s2 s : zip' s1 s2 = Some s -> map key s = map key s1. Proof. (* Goal: forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s), @eq (list (Ordered.sort K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1) *) elim: s1 s2 s=>[|[k1 v1] s1 IH]; case=>[|[k2 v2] s2] //= s; first by case=><-. (* Goal: forall _ : @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) s), @eq (list (Ordered.sort K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) *) case: eqP=>// ->{k1}; case: (zip_f v1 v2)=>// w; case Z: (zip' s1 s2)=>[t|//]. (* Goal: forall _ : @eq (option (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 w) t)) (@Some (list (prod (Ordered.sort K) V)) s), @eq (list (Ordered.sort K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) *) by case=><-; rewrite -(IH _ _ Z). Qed. Lemma zip_unitE' s1 s2 : (exists s, zip' s1 s2 = Some s) <-> zip_unit' s1 = zip_unit' s2. Proof. (* Goal: iff (@ex (list (prod (Ordered.sort K) V)) (fun s : list (prod (Ordered.sort K) V) => @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s))) (@eq (list (prod (Ordered.sort K) V)) (zip_unit' s1) (zip_unit' s2)) *) split. (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (zip_unit' s1) (zip_unit' s2), @ex (list (prod (Ordered.sort K) V)) (fun s : list (prod (Ordered.sort K) V) => @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)) *) (* Goal: forall _ : @ex (list (prod (Ordered.sort K) V)) (fun s : list (prod (Ordered.sort K) V) => @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)), @eq (list (prod (Ordered.sort K) V)) (zip_unit' s1) (zip_unit' s2) *) - (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (zip_unit' s1) (zip_unit' s2), @ex (list (prod (Ordered.sort K) V)) (fun s : list (prod (Ordered.sort K) V) => @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)) *) (* Goal: forall _ : @ex (list (prod (Ordered.sort K) V)) (fun s : list (prod (Ordered.sort K) V) => @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)), @eq (list (prod (Ordered.sort K) V)) (zip_unit' s1) (zip_unit' s2) *) case; elim: s1 s2 =>[|[k1 v1] s1 IH]; case=>// [[k2 v2] s2] s //=. (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (zip_unit' s1) (zip_unit' s2), @ex (list (prod (Ordered.sort K) V)) (fun s : list (prod (Ordered.sort K) V) => @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)) *) (* Goal: forall _ : @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) s), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 (unit_f v1)) (zip_unit' s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 (unit_f v2)) (zip_unit' s2)) *) case: eqP=>// <-{k2}. (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (zip_unit' s1) (zip_unit' s2), @ex (list (prod (Ordered.sort K) V)) (fun s : list (prod (Ordered.sort K) V) => @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)) *) (* Goal: forall _ : @eq (option (list (prod (Ordered.sort K) V))) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end (@Some (list (prod (Ordered.sort K) V)) s), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 (unit_f v1)) (zip_unit' s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 (unit_f v2)) (zip_unit' s2)) *) case E1: (zip_f v1 v2)=>[w|//]; case E2: (zip' s1 s2)=>[t|//] _. (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (zip_unit' s1) (zip_unit' s2), @ex (list (prod (Ordered.sort K) V)) (fun s : list (prod (Ordered.sort K) V) => @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 (unit_f v1)) (zip_unit' s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 (unit_f v2)) (zip_unit' s2)) *) by move/IH: E2=>->; congr ((_, _)::_); apply/unitE; exists w. (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (zip_unit' s1) (zip_unit' s2), @ex (list (prod (Ordered.sort K) V)) (fun s : list (prod (Ordered.sort K) V) => @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)) *) elim: s1 s2=>[|[k1 v1] s1 IH]; case=>//; first by exists [::]. (* Goal: forall (a : prod (Ordered.sort K) V) (l : list (prod (Ordered.sort K) V)) (_ : @eq (list (prod (Ordered.sort K) V)) (zip_unit' (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1)) (zip_unit' (@cons (prod (Ordered.sort K) V) a l))), @ex (list (prod (Ordered.sort K) V)) (fun s : list (prod (Ordered.sort K) V) => @eq (option (list (prod (Ordered.sort K) V))) (zip' (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) a l)) (@Some (list (prod (Ordered.sort K) V)) s)) *) case=>k2 v2 s2 //= [<-{k2}]; case/unitE=>s ->; case/IH=>t ->. (* Goal: @ex (list (prod (Ordered.sort K) V)) (fun s0 : list (prod (Ordered.sort K) V) => @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k1 k1 then @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 s) t) else @None (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) s0)) *) by exists ((k1, s)::t); rewrite eq_refl. Qed. Lemma zip_sorted' s1 s2 : sorted ord (map key s1) -> forall s, zip' s1 s2 = Some s -> sorted ord (map key s). Proof. (* Goal: forall (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))) (s : list (prod (Ordered.sort K) V)) (_ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)) *) by move=>H s; move/map_key_zip'=>->. Qed. Definition zip f1 f2 : option (finMap K V) := match f1, f2 with FinMap s1 pf1, FinMap s2 pf2 => match zip' s1 s2 as z return zip' s1 s2 = z -> _ with Some s => fun pf => Some (FinMap (zip_sorted' pf1 pf)) | None => fun pf => None end (erefl _) end. Lemma zip_unit_sorted' s : sorted ord (map key s) -> sorted ord (map key (zip_unit' s)). Proof. (* Goal: forall _ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (zip_unit' s))) *) rewrite (_ : map key s = map key (zip_unit' s)) //. (* Goal: @eq (list (Ordered.sort K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (zip_unit' s)) *) by apply: (map_key_zip' (s2:=s)); apply: zip_unitL'. Qed. Definition zip_unit f := let: FinMap s pf := f in FinMap (zip_unit_sorted' pf). Lemma zip_unitE f1 f2 : (exists f, zip f1 f2 = Some f) <-> zip_unit f1 = zip_unit f2. Proof. (* Goal: iff (@ex (finMap K V) (fun f : finMap K V => @eq (option (finMap K V)) (zip f1 f2) (@Some (finMap K V) f))) (@eq (finMap K V) (zip_unit f1) (zip_unit f2)) *) case: f1 f2=>s1 H1 [s2 H2] /=; split. (* Goal: forall _ : @eq (finMap K V) (@FinMap K V (zip_unit' s1) (@zip_unit_sorted' s1 H1)) (@FinMap K V (zip_unit' s2) (@zip_unit_sorted' s2 H2)), @ex (finMap K V) (fun f : finMap K V => @eq (option (finMap K V)) (match zip' s1 s2 as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (@zip_sorted' s1 s2 H1 s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' s1 s2))) (@Some (finMap K V) f)) *) (* Goal: forall _ : @ex (finMap K V) (fun f : finMap K V => @eq (option (finMap K V)) (match zip' s1 s2 as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (@zip_sorted' s1 s2 H1 s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' s1 s2))) (@Some (finMap K V) f)), @eq (finMap K V) (@FinMap K V (zip_unit' s1) (@zip_unit_sorted' s1 H1)) (@FinMap K V (zip_unit' s2) (@zip_unit_sorted' s2 H2)) *) - (* Goal: forall _ : @eq (finMap K V) (@FinMap K V (zip_unit' s1) (@zip_unit_sorted' s1 H1)) (@FinMap K V (zip_unit' s2) (@zip_unit_sorted' s2 H2)), @ex (finMap K V) (fun f : finMap K V => @eq (option (finMap K V)) (match zip' s1 s2 as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (@zip_sorted' s1 s2 H1 s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' s1 s2))) (@Some (finMap K V) f)) *) (* Goal: forall _ : @ex (finMap K V) (fun f : finMap K V => @eq (option (finMap K V)) (match zip' s1 s2 as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (@zip_sorted' s1 s2 H1 s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' s1 s2))) (@Some (finMap K V) f)), @eq (finMap K V) (@FinMap K V (zip_unit' s1) (@zip_unit_sorted' s1 H1)) (@FinMap K V (zip_unit' s2) (@zip_unit_sorted' s2 H2)) *) case=>s; move: (zip_sorted' _). (* Goal: forall _ : @eq (finMap K V) (@FinMap K V (zip_unit' s1) (@zip_unit_sorted' s1 H1)) (@FinMap K V (zip_unit' s2) (@zip_unit_sorted' s2 H2)), @ex (finMap K V) (fun f : finMap K V => @eq (option (finMap K V)) (match zip' s1 s2 as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (@zip_sorted' s1 s2 H1 s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' s1 s2))) (@Some (finMap K V) f)) *) (* Goal: forall (zip_sorted' : forall (s : list (prod (Ordered.sort K) V)) (_ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : @eq (option (finMap K V)) (match zip' s1 s2 as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (zip_sorted' s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' s1 s2))) (@Some (finMap K V) s)), @eq (finMap K V) (@FinMap K V (zip_unit' s1) (@zip_unit_sorted' s1 H1)) (@FinMap K V (zip_unit' s2) (@zip_unit_sorted' s2 H2)) *) case E: (zip' s1 s2)=>[t|//] _ _; apply/fmapE=>/=. (* Goal: forall _ : @eq (finMap K V) (@FinMap K V (zip_unit' s1) (@zip_unit_sorted' s1 H1)) (@FinMap K V (zip_unit' s2) (@zip_unit_sorted' s2 H2)), @ex (finMap K V) (fun f : finMap K V => @eq (option (finMap K V)) (match zip' s1 s2 as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (@zip_sorted' s1 s2 H1 s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' s1 s2))) (@Some (finMap K V) f)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (zip_unit' s1) (zip_unit' s2) *) by apply/zip_unitE'; exists t. (* Goal: forall _ : @eq (finMap K V) (@FinMap K V (zip_unit' s1) (@zip_unit_sorted' s1 H1)) (@FinMap K V (zip_unit' s2) (@zip_unit_sorted' s2 H2)), @ex (finMap K V) (fun f : finMap K V => @eq (option (finMap K V)) (match zip' s1 s2 as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (@zip_sorted' s1 s2 H1 s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' s1 s2))) (@Some (finMap K V) f)) *) case; case/zip_unitE'=>s E; move/(zip_sorted' H1): (E)=>T. (* Goal: @ex (finMap K V) (fun f : finMap K V => @eq (option (finMap K V)) (match zip' s1 s2 as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (@zip_sorted' s1 s2 H1 s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' s1 s2))) (@Some (finMap K V) f)) *) exists (FinMap T); move: (zip_sorted' _); rewrite E=>pf. (* Goal: @eq (option (finMap K V)) (@Some (finMap K V) (@FinMap K V s (pf s (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) s))))) (@Some (finMap K V) (@FinMap K V s T)) *) by congr Some; apply/fmapE. Qed. Lemma zip_supp' s1 s2 s : zip' s1 s2 = Some s -> map key s = map key s1. Proof. (* Goal: forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s), @eq (list (Ordered.sort K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1) *) elim: s1 s2 s=>[|[k1 v1] s1 IH] /=; first by case=>// s [<-]. (* Goal: forall (s2 s : list (prod (Ordered.sort K) V)) (_ : @eq (option (list (prod (Ordered.sort K) V))) match s2 with | Datatypes.nil => @None (list (prod (Ordered.sort K) V)) | cons (pair k2 v2 as p) s2' => if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2' with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V)) end (@Some (list (prod (Ordered.sort K) V)) s)), @eq (list (Ordered.sort K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) *) case=>[|[k2 v2] s2] // s; case: eqP=>// ->{k1}. (* Goal: forall _ : @eq (option (list (prod (Ordered.sort K) V))) match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end (@Some (list (prod (Ordered.sort K) V)) s), @eq (list (Ordered.sort K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) *) case E: (zip_f v1 v2)=>[w|//]; case F: (zip' s1 s2)=>[t|//]. (* Goal: forall _ : @eq (option (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 w) t)) (@Some (list (prod (Ordered.sort K) V)) s), @eq (list (Ordered.sort K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)) *) by move/IH: F=><- [<-]. Qed. Lemma zip_supp f1 f2 f : zip f1 f2 = Some f -> supp f =i supp f1. Proof. (* Goal: forall _ : @eq (option (finMap K V)) (zip f1 f2) (@Some (finMap K V) f), @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f1)) *) case: f1 f2 f=>s1 H1 [s2 H2] [s3 H3] /=; move: (zip_sorted' _). (* Goal: forall (zip_sorted' : forall (s : list (prod (Ordered.sort K) V)) (_ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : @eq (option (finMap K V)) (match zip' s1 s2 as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (zip_sorted' s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' s1 s2))) (@Some (finMap K V) (@FinMap K V s3 H3))), @eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@FinMap K V s3 H3))) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@FinMap K V s1 H1))) *) case E: (zip' s1 s2)=>[t|//]; move=>pf [F x]; rewrite -{s3}F in H3 *. by rewrite /supp (zip_supp' E). Qed. Qed. Lemma zip_filter' s1 s2 s x : zip' s1 s2 = Some s -> zip' (filter (predCk V x) s1) (filter (predCk V x) s2) = Some (filter (predCk V x) s). Proof. (* Goal: forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s), @eq (option (list (prod (Ordered.sort K) V))) (zip' (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2)) (@Some (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) *) elim: s1 s2 s=>[|[k1 v1] s1 IH]; case=>[|[k2 v2] s2] //= s; first by case=><-. (* Goal: forall _ : @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) s), @eq (option (list (prod (Ordered.sort K) V))) (zip' (if negb (@eq_op (Ordered.eqType K) k1 x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) (if negb (@eq_op (Ordered.eqType K) k2 x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2)) (@Some (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) *) case: eqP=>// <-{k2}; case E1: (zip_f v1 v2)=>[a|//]. (* Goal: forall _ : @eq (option (list (prod (Ordered.sort K) V))) match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 a) s') | None => @None (list (prod (Ordered.sort K) V)) end (@Some (list (prod (Ordered.sort K) V)) s), @eq (option (list (prod (Ordered.sort K) V))) (zip' (if negb (@eq_op (Ordered.eqType K) k1 x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) (if negb (@eq_op (Ordered.eqType K) k1 x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2)) (@Some (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) *) case E2: (zip' s1 s2)=>[t|//]; move/IH: E2=>E2 [<-{s}]. (* Goal: @eq (option (list (prod (Ordered.sort K) V))) (zip' (if negb (@eq_op (Ordered.eqType K) k1 x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) (if negb (@eq_op (Ordered.eqType K) k1 x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2)) (@Some (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 a) t))) *) case: eqP=>[->{k1}|] /=; first by rewrite E2 eq_refl. (* Goal: forall _ : not (@eq (Ordered.sort K) k1 x), @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k1 k1 then match zip_f v1 v2 with | Some v => match zip' (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2) with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k1 x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 a) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) t) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) t)) *) by rewrite eq_refl E1 E2; case: eqP. Qed. Lemma zip_rem f1 f2 f x : zip f1 f2 = Some f -> zip (rem x f1) (rem x f2) = Some (rem x f). Proof. (* Goal: forall _ : @eq (option (finMap K V)) (zip f1 f2) (@Some (finMap K V) f), @eq (option (finMap K V)) (zip (@rem K V x f1) (@rem K V x f2)) (@Some (finMap K V) (@rem K V x f)) *) case: f1 f2 f=>s1 H1 [s2 H2] [s3 H3] /=; do 2![move: (zip_sorted' _)]. (* Goal: forall (zip_sorted' : forall (s : list (prod (Ordered.sort K) V)) (_ : @eq (option (list (prod (Ordered.sort K) V))) (zip' (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2)) (@Some (list (prod (Ordered.sort K) V)) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (zip_sorted'0 : forall (s : list (prod (Ordered.sort K) V)) (_ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : @eq (option (finMap K V)) (match zip' s1 s2 as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (zip_sorted'0 s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' s1 s2))) (@Some (finMap K V) (@FinMap K V s3 H3))), @eq (option (finMap K V)) (match zip' (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2) as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2)) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2)) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (zip_sorted' s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2)) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s2)))) (@Some (finMap K V) (@FinMap K V (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s3) (@sorted_filter' K V x s3 H3))) *) case E1: (zip' s1 s2)=>[t|//]; case E2 : (zip' _ _)=>[q|]; rewrite (@zip_filter' _ _ _ _ E1) // in E2. (* Goal: forall (zip_sorted' : forall (s : list (prod (Ordered.sort K) V)) (_ : @eq (option (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) q) (@Some (list (prod (Ordered.sort K) V)) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (zip_sorted'0 : forall (s : list (prod (Ordered.sort K) V)) (_ : @eq (option (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) t) (@Some (list (prod (Ordered.sort K) V)) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : @eq (option (finMap K V)) (@Some (finMap K V) (@FinMap K V t (zip_sorted'0 t (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) t))))) (@Some (finMap K V) (@FinMap K V s3 H3))), @eq (option (finMap K V)) (@Some (finMap K V) (@FinMap K V q (zip_sorted' q (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) q))))) (@Some (finMap K V) (@FinMap K V (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s3) (@sorted_filter' K V x s3 H3))) *) by case: E2=><-{q} pf1 pf2 [E]; congr Some; apply/fmapE; rewrite /= E. Qed. Lemma zip_fnd f1 f2 f x (v : V) : zip f1 f2 = Some f -> fnd x f = Some v -> exists v1, exists v2, [/\ zip_f v1 v2 = Some v, fnd x f1 = Some v1 & fnd x f2 = Some v2]. Proof. (* Goal: forall (_ : @eq (option (finMap K V)) (zip f1 f2) (@Some (finMap K V) f)) (_ : @eq (option V) (@fnd K V x f) (@Some V v)), @ex V (fun v1 : V => @ex V (fun v2 : V => and3 (@eq (option V) (zip_f v1 v2) (@Some V v)) (@eq (option V) (@fnd K V x f1) (@Some V v1)) (@eq (option V) (@fnd K V x f2) (@Some V v2)))) *) case: f1 f2 f=>s1 H1 [s2 H2] [s3 H3] /=; move: (zip_sorted' _). (* Goal: forall (zip_sorted' : forall (s : list (prod (Ordered.sort K) V)) (_ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : @eq (option (finMap K V)) (match zip' s1 s2 as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (zip_sorted' s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' s1 s2))) (@Some (finMap K V) (@FinMap K V s3 H3))) (_ : @eq (option V) (@fnd K V x (@FinMap K V s3 H3)) (@Some V v)), @ex V (fun v1 : V => @ex V (fun v2 : V => and3 (@eq (option V) (zip_f v1 v2) (@Some V v)) (@eq (option V) (@fnd K V x (@FinMap K V s1 H1)) (@Some V v1)) (@eq (option V) (@fnd K V x (@FinMap K V s2 H2)) (@Some V v2)))) *) case E1: (zip' s1 s2)=>[s|//] pf [E]; rewrite /fnd /=. (* Goal: forall _ : @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s3 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v), @ex V (fun v1 : V => @ex V (fun v2 : V => and3 (@eq (option V) (zip_f v1 v2) (@Some V v)) (@eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v1)) (@eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v2)))) *) clear H1 H2 H3 pf; rewrite -{s3}E. (* Goal: forall _ : @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v), @ex V (fun v1 : V => @ex V (fun v2 : V => and3 (@eq (option V) (zip_f v1 v2) (@Some V v)) (@eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v1)) (@eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v2)))) *) elim: s1 s2 s E1=>[|[k1 v1] s1 IH]; case=>[|[k2 v2] s2] //= s. (* Goal: forall (_ : @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) s)) (_ : @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v)), @ex V (fun v3 : V => @ex V (fun v4 : V => and3 (@eq (option V) (zip_f v3 v4) (@Some V v)) (@eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v3)) (@eq (option V) match (if @eq_op (Ordered.eqType K) k2 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v4)))) *) (* Goal: forall (_ : @eq (option (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) (@Datatypes.nil (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) s)) (_ : @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v)), @ex V (fun v1 : V => @ex V (fun v2 : V => and3 (@eq (option V) (zip_f v1 v2) (@Some V v)) (@eq (option V) (@None V) (@Some V v1)) (@eq (option V) (@None V) (@Some V v2)))) *) - (* Goal: forall (_ : @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) s)) (_ : @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v)), @ex V (fun v3 : V => @ex V (fun v4 : V => and3 (@eq (option V) (zip_f v3 v4) (@Some V v)) (@eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v3)) (@eq (option V) match (if @eq_op (Ordered.eqType K) k2 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v4)))) *) (* Goal: forall (_ : @eq (option (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) (@Datatypes.nil (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) s)) (_ : @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v)), @ex V (fun v1 : V => @ex V (fun v2 : V => and3 (@eq (option V) (zip_f v1 v2) (@Some V v)) (@eq (option V) (@None V) (@Some V v1)) (@eq (option V) (@None V) (@Some V v2)))) *) by case=><-. (* Goal: forall (_ : @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f v1 v2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) s)) (_ : @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v)), @ex V (fun v3 : V => @ex V (fun v4 : V => and3 (@eq (option V) (zip_f v3 v4) (@Some V v)) (@eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v3)) (@eq (option V) match (if @eq_op (Ordered.eqType K) k2 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v4)))) *) case: eqP=>// <-{k2}; case E1: (zip_f v1 v2)=>[w|//]. (* Goal: forall (_ : @eq (option (list (prod (Ordered.sort K) V))) match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 w) s') | None => @None (list (prod (Ordered.sort K) V)) end (@Some (list (prod (Ordered.sort K) V)) s)) (_ : @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v)), @ex V (fun v3 : V => @ex V (fun v4 : V => and3 (@eq (option V) (zip_f v3 v4) (@Some V v)) (@eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v3)) (@eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v4)))) *) case E2: (zip' s1 s2)=>[t|//][<-{s}] /=. (* Goal: forall _ : @eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 w) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) t) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) t) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v), @ex V (fun v3 : V => @ex V (fun v4 : V => and3 (@eq (option V) (zip_f v3 v4) (@Some V v)) (@eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v3)) (@eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v4)))) *) case: eqP=>[_ [<-]|_]; first by exists v1, v2. (* Goal: forall _ : @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) t with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v), @ex V (fun v1 : V => @ex V (fun v2 : V => and3 (@eq (option V) (zip_f v1 v2) (@Some V v)) (@eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v1)) (@eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v2)))) *) by case: (filter (predk V x) t) (IH _ _ E2). Qed. Lemma fnd_zip f1 f2 f x (v1 v2 : V) : fnd x f1 = Some v1 -> fnd x f2 = Some v2 -> zip f1 f2 = Some f -> fnd x f = zip_f v1 v2. Proof. (* Goal: forall (_ : @eq (option V) (@fnd K V x f1) (@Some V v1)) (_ : @eq (option V) (@fnd K V x f2) (@Some V v2)) (_ : @eq (option (finMap K V)) (zip f1 f2) (@Some (finMap K V) f)), @eq (option V) (@fnd K V x f) (zip_f v1 v2) *) case: f1 f2=>s1 H1 [s2 H2] /=; move: (zip_sorted' _). (* Goal: forall (zip_sorted' : forall (s : list (prod (Ordered.sort K) V)) (_ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : @eq (option V) (@fnd K V x (@FinMap K V s1 H1)) (@Some V v1)) (_ : @eq (option V) (@fnd K V x (@FinMap K V s2 H2)) (@Some V v2)) (_ : @eq (option (finMap K V)) (match zip' s1 s2 as z return (forall _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) z, option (finMap K V)) with | Some s => fun pf : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@Some (list (prod (Ordered.sort K) V)) s) => @Some (finMap K V) (@FinMap K V s (zip_sorted' s pf)) | None => fun _ : @eq (option (list (prod (Ordered.sort K) V))) (zip' s1 s2) (@None (list (prod (Ordered.sort K) V))) => @None (finMap K V) end (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (zip' s1 s2))) (@Some (finMap K V) f)), @eq (option V) (@fnd K V x f) (zip_f v1 v2) *) case E: (zip' s1 s2)=>[s|//] pf; rewrite /fnd /= => F1 F2. (* Goal: forall _ : @eq (option (finMap K V)) (@Some (finMap K V) (@FinMap K V s (pf s (@Logic.eq_refl (option (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) s))))) (@Some (finMap K V) f), @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) (@seq_of K V f) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (zip_f v1 v2) *) case=><-{f} /= {pf H1 H2}. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (zip_f v1 v2) *) elim: s1 s2 s E F1 F2=>[|[k1 w1] s1 IH]; case=>[|[k2 w2] s2] //= s. (* Goal: forall (_ : @eq (option (list (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k1 k2 then match zip_f w1 w2 with | Some v => match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v) s') | None => @None (list (prod (Ordered.sort K) V)) end | None => @None (list (prod (Ordered.sort K) V)) end else @None (list (prod (Ordered.sort K) V))) (@Some (list (prod (Ordered.sort K) V)) s)) (_ : @eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 w1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v1)) (_ : @eq (option V) match (if @eq_op (Ordered.eqType K) k2 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 w2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v2)), @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (zip_f v1 v2) *) case: eqP=>// <-{k2}; case E1: (zip_f w1 w2)=>[w|//]. (* Goal: forall (_ : @eq (option (list (prod (Ordered.sort K) V))) match zip' s1 s2 with | Some s' => @Some (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 w) s') | None => @None (list (prod (Ordered.sort K) V)) end (@Some (list (prod (Ordered.sort K) V)) s)) (_ : @eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 w1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v1)) (_ : @eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 w2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v2)), @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (zip_f v1 v2) *) case E2: (zip' s1 s2)=>[t|//] [<-{s}]. (* Goal: forall (_ : @eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 w1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v1)) (_ : @eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 w2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s2) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (@Some V v2)), @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 w) t) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (zip_f v1 v2) *) case: eqP=>/=; last by case: eqP=>// _ _; apply: IH. (* Goal: forall (_ : @eq (Ordered.sort K) k1 x) (_ : @eq (option V) (@Some V w1) (@Some V v1)) (_ : @eq (option V) (@Some V w2) (@Some V v2)), @eq (option V) match (if @eq_op (Ordered.eqType K) k1 x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 w) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) t) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) t) with | Datatypes.nil => @None V | cons (pair s v as p0) l => @Some V v end (zip_f v1 v2) *) by move=>->{k1}; rewrite eq_refl; case=><- [<-]. Qed. Lemma zunit0 : zip_unit (nil K V) = nil K V. Proof. (* Goal: @eq (finMap K V) (zip_unit (nil K V)) (nil K V) *) by apply/fmapE. Qed. Lemma zunit_ins f k v : zip_unit (ins k v f) = ins k (unit_f v) (zip_unit f). Proof. (* Goal: @eq (finMap K V) (zip_unit (@ins K V k v f)) (@ins K V k (unit_f v) (zip_unit f)) *) case: f=>s H; apply/fmapE=>/=; rewrite /zip_unit'. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@mapf' K V V unit_f (@ins' K V k v s)) (@ins' K V k (unit_f v) (@mapf' K V V unit_f s)) *) elim: s k v H=>[|[k1 v1] s IH] //= k v H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@mapf' K V V unit_f (if @ord K k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s))) (if @ord K k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k (unit_f v)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 (unit_f v1)) (@mapf' K V V unit_f s)) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k (unit_f v)) (@mapf' K V V unit_f s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 (unit_f v1)) (@ins' K V k (unit_f v) (@mapf' K V V unit_f s))) *) rewrite eq_sym; case: totalP=>//= O. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 (unit_f v1)) (@mapf' K V V unit_f (@ins' K V k v s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 (unit_f v1)) (@ins' K V k (unit_f v) (@mapf' K V V unit_f s))) *) by rewrite IH // (path_sorted H). Qed. Lemma zunit_fcat f1 f2 : zip_unit (fcat f1 f2) = fcat (zip_unit f1) (zip_unit f2). Proof. (* Goal: @eq (finMap K V) (zip_unit (@fcat K V f1 f2)) (@fcat K V (zip_unit f1) (zip_unit f2)) *) elim/fmap_ind': f2 f1=>[|k v f2 H IH] f1 /=. (* Goal: @eq (finMap K V) (zip_unit (@fcat K V f1 (@ins K V k v f2))) (@fcat K V (zip_unit f1) (zip_unit (@ins K V k v f2))) *) (* Goal: @eq (finMap K V) (zip_unit (@fcat K V f1 (nil K V))) (@fcat K V (zip_unit f1) (@FinMap K V (@Datatypes.nil (prod (Ordered.sort K) V)) (@zip_unit_sorted' (@Datatypes.nil (prod (Ordered.sort K) V)) (sorted_nil K V)))) *) - (* Goal: @eq (finMap K V) (zip_unit (@fcat K V f1 (@ins K V k v f2))) (@fcat K V (zip_unit f1) (zip_unit (@ins K V k v f2))) *) (* Goal: @eq (finMap K V) (zip_unit (@fcat K V f1 (nil K V))) (@fcat K V (zip_unit f1) (@FinMap K V (@Datatypes.nil (prod (Ordered.sort K) V)) (@zip_unit_sorted' (@Datatypes.nil (prod (Ordered.sort K) V)) (sorted_nil K V)))) *) rewrite fcats0; set j := FinMap _. (* Goal: @eq (finMap K V) (zip_unit (@fcat K V f1 (@ins K V k v f2))) (@fcat K V (zip_unit f1) (zip_unit (@ins K V k v f2))) *) (* Goal: @eq (finMap K V) (zip_unit f1) (@fcat K V (zip_unit f1) j) *) by rewrite (_ : j = nil K V) ?fcat0s //; apply/fmapE. (* Goal: @eq (finMap K V) (zip_unit (@fcat K V f1 (@ins K V k v f2))) (@fcat K V (zip_unit f1) (zip_unit (@ins K V k v f2))) *) by rewrite fcat_sins zunit_ins IH -fcat_sins zunit_ins. Qed. Lemma zunit_supp f : supp (zip_unit f) = supp f. Proof. (* Goal: @eq (list (Ordered.sort K)) (@supp K V (zip_unit f)) (@supp K V f) *) case: f=>s H; rewrite /supp /= {H}. (* Goal: @eq (list (Ordered.sort K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (zip_unit' s)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s) *) by elim: s=>[|[k v] s IH] //=; rewrite IH. Qed. Lemma zunit_disj f1 f2 : disj f1 f2 = disj (zip_unit f1) (zip_unit f2). Proof. (* Goal: @eq bool (@disj K V f1 f2) (@disj K V (zip_unit f1) (zip_unit f2)) *) case: disjP; case: disjP=>//; rewrite !zunit_supp. (* Goal: forall (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f2))))) (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f2)))), @eq bool false true *) (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f2)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f2))))), @eq bool true false *) - (* Goal: forall (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f2))))) (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f2)))), @eq bool false true *) (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f2)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f2))))), @eq bool true false *) by move=>x H1 H2; move/(_ _ H1); rewrite H2. (* Goal: forall (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f2))))) (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V f2)))), @eq bool false true *) by move=>H x; move/H/negbTE=>->. Qed. End Zip.
Require Import Bool Arith List. Require Import BellantoniCook.Lib BellantoniCook.Bitstring BellantoniCook.BC. Inductive BCI : Set := | zeroI : BCI | projIn : nat -> BCI | projIs : nat -> BCI | succI : bool -> BCI | predI : BCI | condI : BCI | recI : BCI -> BCI -> BCI -> BCI | compI : BCI -> list BCI -> list BCI -> BCI. Lemma BCI_ind2' : forall P : BCI -> Prop, forall Q : list BCI -> Prop, Q nil -> (forall e l, P e -> Q l -> Q (e :: l)) -> P zeroI -> (forall i, P (projIn i)) -> (forall i, P (projIs i)) -> (forall b, P (succI b)) -> P predI -> P condI -> (forall g h0 h1, P g -> P h0 -> P h1 -> P (recI g h0 h1)) -> (forall h rl tl, P h -> Q rl -> Q tl -> P (compI h rl tl)) -> forall e, P e. Proof. (* Goal: forall (P : forall _ : BCI, Prop) (Q : forall _ : list BCI, Prop) (_ : Q (@nil BCI)) (_ : forall (e : BCI) (l : list BCI) (_ : P e) (_ : Q l), Q (@cons BCI e l)) (_ : P zeroI) (_ : forall i : nat, P (projIn i)) (_ : forall i : nat, P (projIs i)) (_ : forall b : bool, P (succI b)) (_ : P predI) (_ : P condI) (_ : forall (g h0 h1 : BCI) (_ : P g) (_ : P h0) (_ : P h1), P (recI g h0 h1)) (_ : forall (h : BCI) (rl tl : list BCI) (_ : P h) (_ : Q rl) (_ : Q tl), P (compI h rl tl)) (e : BCI), P e *) fix BCI_ind2' 13; intros. (* Goal: P e *) destruct e; auto. (* Goal: P (compI e l l0) *) (* Goal: P (recI e1 e2 e3) *) apply H7; eapply BCI_ind2'; eauto. (* Goal: P (compI e l l0) *) apply H8. (* Goal: Q l0 *) (* Goal: Q l *) (* Goal: P e *) eapply BCI_ind2'; eauto. (* Goal: Q l0 *) (* Goal: Q l *) revert l. (* Goal: Q l0 *) (* Goal: forall l : list BCI, Q l *) fix BCI_ind2'0 1. (* Goal: Q l0 *) (* Goal: forall l : list BCI, Q l *) intro. (* Goal: Q l0 *) (* Goal: Q l *) destruct l. (* Goal: Q l0 *) (* Goal: Q (@cons BCI b l) *) (* Goal: Q (@nil BCI) *) auto. (* Goal: Q l0 *) (* Goal: Q (@cons BCI b l) *) apply H0. (* Goal: Q l0 *) (* Goal: Q l *) (* Goal: P b *) eapply BCI_ind2'; eauto. (* Goal: Q l0 *) (* Goal: Q l *) apply BCI_ind2'0. (* Goal: Q l0 *) revert l0. (* Goal: forall l0 : list BCI, Q l0 *) fix BCI_ind2'0 1. (* Goal: forall l0 : list BCI, Q l0 *) intro. (* Goal: Q l0 *) destruct l0. (* Goal: Q (@cons BCI b l0) *) (* Goal: Q (@nil BCI) *) auto. (* Goal: Q (@cons BCI b l0) *) apply H0. (* Goal: Q l0 *) (* Goal: P b *) eapply BCI_ind2'; eauto. (* Goal: Q l0 *) apply BCI_ind2'0. Qed. Lemma BCI_ind2 : forall P : BCI -> Prop, P zeroI -> (forall i, P (projIn i)) -> (forall i, P (projIs i)) -> (forall b, P (succI b)) -> P predI -> P condI -> (forall g h0 h1, P g -> P h0 -> P h1 -> P (recI g h0 h1)) -> (forall h rl tl, P h -> (forall r, In r rl -> P r) -> (forall s, In s tl -> P s) -> P (compI h rl tl)) -> forall e, P e. Proof. (* Goal: forall (P : forall _ : BCI, Prop) (_ : P zeroI) (_ : forall i : nat, P (projIn i)) (_ : forall i : nat, P (projIs i)) (_ : forall b : bool, P (succI b)) (_ : P predI) (_ : P condI) (_ : forall (g h0 h1 : BCI) (_ : P g) (_ : P h0) (_ : P h1), P (recI g h0 h1)) (_ : forall (h : BCI) (rl tl : list BCI) (_ : P h) (_ : forall (r : BCI) (_ : @In BCI r rl), P r) (_ : forall (s : BCI) (_ : @In BCI s tl), P s), P (compI h rl tl)) (e : BCI), P e *) intros. (* Goal: P e *) induction e using BCI_ind2' with (Q := fun l => forall e, In e l -> P e); auto. (* Goal: forall (e0 : BCI) (_ : @In BCI e0 (@cons BCI e l)), P e0 *) (* Goal: forall (e : BCI) (_ : @In BCI e (@nil BCI)), P e *) simpl;intros; tauto. (* Goal: forall (e0 : BCI) (_ : @In BCI e0 (@cons BCI e l)), P e0 *) simpl. (* Goal: forall (e0 : BCI) (_ : or (@eq BCI e e0) (@In BCI e0 l)), P e0 *) intros e' [ | ]; intros; subst; auto. Qed. Inductive TypeI := | I : nat -> nat -> TypeI | E : ErrorI -> TypeI with ErrorI := | Enat : nat -> ErrorI | Epair : TypeI -> TypeI -> ErrorI. Definition eq_t (e1 e2 : TypeI) : bool := match e1, e2 with | I n1 s1, I n2 s2 => beq_nat n1 n2 && beq_nat s1 s2 | _, _ => false end. Definition unionI (e1 e2 : TypeI) := match e1, e2 with | I n1 s1, I n2 s2 => I (max n1 n2) (max s1 s2) | _, _ => E (Enat 3) end. Fixpoint inf_list (l : list TypeI) : TypeI := match l with | nil => I 0 0 | e :: l' => unionI e (inf_list l') end. Fixpoint inf (e : BCI) : TypeI := match e with | zeroI => I 0 0 | projIn i => I (S i) 0 | projIs i => I 0 (S i) | succI b => I 0 1 | predI => I 0 1 | condI => I 0 4 | recI g h0 h1 => match inf g, inf h0, inf h1 with | I gn gs, I h0n h0s, I h1n h1s => I (maxl [S gn; h0n; h1n]) (maxl [gs; h0s-1; h1s-1]) | _, _, _ => E (Enat 1) end | compI h nl sl => match inf h with | I hn hs => if leb hn (length nl) && leb hs (length sl) then match inf_list (map inf nl), inf_list (map inf sl) with | I nnl snl, I nsl ssl => if beq_nat snl 0 then I (max nnl nsl) ssl else E (Enat 4) | _, _ => E (Enat 5) end else E (Enat 6) | E e => E e end end. Fixpoint semI (e:BCI) (vnl vsl:list bs) : bs := match e with | zeroI => nil | projIn i => nth i vnl nil | projIs i => nth i vsl nil | succI b => b :: hd nil vsl | predI => tail (hd nil vsl) | condI => match vsl with | a :: b :: c :: d :: _ => match a with | nil => b | true :: _ => c | false :: _ => d end | a :: b :: c :: _ => match a with | nil => b | true :: _ => c | false :: _ => nil end | a :: b :: _ => match a with | nil => b | _ => nil end | _ => nil end | recI g h0 h1 => sem_rec (semI g) (semI h0) (semI h1) (hd nil vnl) (tail vnl) vsl | compI h nl sl => semI h (map (fun ne => semI ne vnl nil) nl) (map (fun se => semI se vnl vsl) sl) end. Definition invI (e : BCI) : BCI := compI e [projIn 1; projIn 0] nil. Definition from_11_to_20I e := compI e [projIn 0] [projIn 1]. Lemma from_11_to_20I_correct e v1 v2 : semI e [v1] [v2] = semI (from_11_to_20I e) [v1 ; v2] nil. Proof. (* Goal: @eq (list bool) (semI e (@cons (list bool) v1 (@nil (list bool))) (@cons (list bool) v2 (@nil (list bool)))) (semI (from_11_to_20I e) (@cons (list bool) v1 (@cons (list bool) v2 (@nil (list bool)))) (@nil (list bool))) *) intros; simpl; trivial. Qed. Definition appI : BCI := recI (projIs 0) (compI (succI false) nil [projIs 0]) (compI (succI true) nil [projIs 0]). Lemma appI_correct v1 v2 : semI appI [v1] [v2] = v1 ++ v2. Proof. (* Goal: @eq (list bool) (semI appI (@cons (list bool) v1 (@nil (list bool))) (@cons (list bool) v2 (@nil (list bool)))) (@app bool v1 v2) *) induction v1; simpl in *; trivial. (* Goal: @eq (list bool) (if a then @cons bool true (sem_rec (fun _ vsl : list (list bool) => @nth (list bool) O vsl (@nil bool)) (fun _ vsl : list (list bool) => @cons bool false (@nth (list bool) O vsl (@nil bool))) (fun _ vsl : list (list bool) => @cons bool true (@nth (list bool) O vsl (@nil bool))) v1 (@nil (list bool)) (@cons (list bool) v2 (@nil (list bool)))) else @cons bool false (sem_rec (fun _ vsl : list (list bool) => @nth (list bool) O vsl (@nil bool)) (fun _ vsl : list (list bool) => @cons bool false (@nth (list bool) O vsl (@nil bool))) (fun _ vsl : list (list bool) => @cons bool true (@nth (list bool) O vsl (@nil bool))) v1 (@nil (list bool)) (@cons (list bool) v2 (@nil (list bool))))) (@cons bool a (@app bool v1 v2)) *) intros; rewrite IHv1. (* Goal: @eq (list bool) (if a then @cons bool true (@app bool v1 v2) else @cons bool false (@app bool v1 v2)) (@cons bool a (@app bool v1 v2)) *) case a; trivial. Qed. Notation O := zeroI. Notation S0 := (succI false). Notation S1 := (succI true). Notation P := predI. Notation "'If' e 'Nil' e0 'Then' e1 'Else' e2" := (compI condI nil [e; e0; e1; e2]) (at level 65). Notation "h ( nl , sl )" := (compI h nl sl) (at level 50). Notation "'#' n" := (projIn n) (at level 0). Notation "'$' n" := (projIs n) (at level 0).
Require Export a_base Bool. Export ListNotations. Set Implicit Arguments. Module Type sound_mod (X: base_mod). Import X. Inductive PropF : Set := | Var : PropVars -> PropF | Bot : PropF | Conj : PropF -> PropF -> PropF | Disj : PropF -> PropF -> PropF | Impl : PropF -> PropF -> PropF . Notation "# P" := (Var P) (at level 1) : My_scope. Notation "A ∨ B" := (Disj A B) (at level 15, right associativity) : My_scope. Notation "A ∧ B" := (Conj A B) (at level 15, right associativity) : My_scope. Notation "A → B" := (Impl A B) (at level 16, right associativity) : My_scope. Notation "⊥" := Bot (at level 0) : My_scope. Definition Neg A := A → ⊥. Notation "¬ A" := (Neg A) (at level 5) : My_scope. Definition Top := ¬⊥. Notation "⊤" := Top (at level 0) : My_scope. Definition BiImpl A B := (A→B)∧(B→A). Notation "A ↔ B" := (BiImpl A B) (at level 17, right associativity) : My_scope. Fixpoint TrueQ v A : bool := match A with | # P => v P | ⊥ => false | B ∨ C => (TrueQ v B) || (TrueQ v C) | B ∧ C => (TrueQ v B) && (TrueQ v C) | B → C => (negb (TrueQ v B)) || (TrueQ v C) end. Definition Satisfies v Γ := forall A, In A Γ -> Is_true (TrueQ v A). Definition Models Γ A := forall v,Satisfies v Γ->Is_true (TrueQ v A). Notation "Γ ⊨ A" := (Models Γ A) (at level 80). Definition Valid A := [] ⊨ A. Reserved Notation "Γ ⊢ A" (at level 80). Inductive Nc : list PropF-> PropF->Prop := | Nax : forall Γ A , In A Γ -> Γ ⊢ A | ImpI : forall Γ A B, A::Γ ⊢ B -> Γ ⊢ A → B | ImpE : forall Γ A B, Γ ⊢ A → B -> Γ ⊢ A -> Γ ⊢ B | BotC : forall Γ A , ¬A::Γ ⊢ ⊥ -> Γ ⊢ A | AndI : forall Γ A B, Γ ⊢ A -> Γ ⊢ B -> Γ ⊢ A∧B | AndE1 : forall Γ A B, Γ ⊢ A∧B -> Γ ⊢ A | AndE2 : forall Γ A B, Γ ⊢ A∧B -> Γ ⊢ B | OrI1 : forall Γ A B, Γ ⊢ A -> Γ ⊢ A∨B | OrI2 : forall Γ A B, Γ ⊢ B -> Γ ⊢ A∨B | OrE : forall Γ A B C, Γ ⊢ A∨B -> A::Γ ⊢ C -> B::Γ ⊢ C -> Γ ⊢ C where "Γ ⊢ A" := (Nc Γ A) : My_scope. Definition Provable A := [] ⊢ A. Definition Prop_Soundness := forall A,Provable A->Valid A. Definition Prop_Completeness := forall A,Valid A->Provable A. Ltac mp := eapply ImpE. Ltac AddnilL := match goal with | |- _ ?Γ _ => change Γ with ([]++Γ) end. Ltac in_solve := intros;repeat (eassumption ||match goal with | H:In _ (_::_) |- _ => destruct H;[subst;try discriminate|] | H:In _ (_++_) |- _ => apply in_app_iff in H as [];subst | |- In _ (_++_) => apply in_app_iff;(left;in_solve;fail)||(right;in_solve;fail) end ||(once constructor;reflexivity) ||constructor 2). Ltac is_ass := once econstructor;in_solve. Ltac case_bool v A := let HA := fresh "H" in (case_eq (TrueQ v A);intro HA;try rewrite HA in *;simpl in *;try trivial;try contradiction). Local Ltac prove_satisfaction := intros ? K;destruct K;[subst;simpl; match goal with | [ H : TrueQ _ _ = _ |- _ ] => rewrite H end;exact I|auto]. Lemma PropFeq_dec : forall (x y : PropF), {x = y}+{x <> y}. Proof. (* Goal: forall x y : PropF, sumbool (@eq PropF x y) (not (@eq PropF x y)) *) induction x;destruct y;try (right;discriminate); try (destruct (IHx1 y1);[destruct (IHx2 y2);[left;f_equal;assumption|]|]; right;injection;intros;contradiction). (* Goal: sumbool (@eq PropF Bot Bot) (not (@eq PropF Bot Bot)) *) (* Goal: sumbool (@eq PropF (Var p) (Var p0)) (not (@eq PropF (Var p) (Var p0))) *) destruct (Varseq_dec p p0). (* Goal: sumbool (@eq PropF Bot Bot) (not (@eq PropF Bot Bot)) *) (* Goal: sumbool (@eq PropF (Var p) (Var p0)) (not (@eq PropF (Var p) (Var p0))) *) (* Goal: sumbool (@eq PropF (Var p) (Var p0)) (not (@eq PropF (Var p) (Var p0))) *) left;f_equal;assumption. (* Goal: sumbool (@eq PropF Bot Bot) (not (@eq PropF Bot Bot)) *) (* Goal: sumbool (@eq PropF (Var p) (Var p0)) (not (@eq PropF (Var p) (Var p0))) *) right;injection;intro;contradiction. (* Goal: sumbool (@eq PropF Bot Bot) (not (@eq PropF Bot Bot)) *) left;reflexivity. Qed. Lemma Excluded_Middle : forall Γ A, Γ ⊢ A∨¬A. Proof. (* Goal: forall (Γ : list PropF) (A : PropF), Nc Γ (Disj A (Neg A)) *) intros;apply BotC;mp;[is_ass|apply OrI2;apply ImpI;mp;[is_ass|apply OrI1;is_ass]]. Qed. Lemma weakening2 : forall Γ A, Γ ⊢ A -> forall Δ, (forall B, In B Γ -> In B Δ) -> Δ ⊢ A. Proof. (* Goal: forall (Γ : list PropF) (A : PropF) (_ : Nc Γ A) (Δ : list PropF) (_ : forall (B : PropF) (_ : @In PropF B Γ), @In PropF B Δ), Nc Δ A *) induction 1;[constructor|constructor 2|econstructor 3|constructor 4|constructor 5|econstructor 6 |econstructor 7|constructor 8|constructor 9|econstructor 10];try eauto; [apply IHNc..|apply IHNc2|try apply IHNc3];intros;in_solve;eauto. Qed. Lemma weakening : forall Γ Δ A, Γ ⊢ A -> Γ++Δ ⊢ A. Proof. (* Goal: forall (Γ Δ : list PropF) (A : PropF) (_ : Nc Γ A), Nc (@app PropF Γ Δ) A *) intros;eapply weakening2;[eassumption|in_solve]. Qed. Lemma deduction : forall Γ A B, Γ ⊢ A → B -> A::Γ ⊢ B. Proof. (* Goal: forall (Γ : list PropF) (A B : PropF) (_ : Nc Γ (Impl A B)), Nc (@cons PropF A Γ) B *) intros;eapply ImpE with A;[eapply weakening2;[eassumption|in_solve]|is_ass]. Qed. Lemma prov_impl : forall A B, Provable (A → B)->forall Γ, Γ ⊢ A -> Γ ⊢ B. Ltac prov_impl_in IH := let H := fresh "K" in try (remember (prov_impl IH) as H eqn:HeqH;clear IH HeqH). Theorem Soundness_general : forall A Γ, Γ ⊢ A -> Γ ⊨ A. Proof. (* Goal: forall (A : PropF) (Γ : list PropF) (_ : Nc Γ A), Models Γ A *) intros A Γ H0 v;induction H0;simpl;intros;auto; try simpl in IHNc;try simpl in IHNc1;try simpl in IHNc2; case_bool v A;try (case_bool v B;fail); try (apply IHNc||apply IHNc2;prove_satisfaction); case_bool v B;apply IHNc3;prove_satisfaction. Qed. Theorem Soundness : Prop_Soundness. Proof. (* Goal: Prop_Soundness *) intros ? ? ? ?;eapply Soundness_general;eassumption. Qed. End sound_mod.
Require Import ZArith. Require Import ZArithRing. Require Import divide. Require Import gcd. Definition rel_prime (a b : Z) : Prop := gcd a b 1. Lemma rel_prime_bezout : forall a b : Z, rel_prime a b -> Bezout a b 1. Proof. (* Goal: forall (a b : Z) (_ : rel_prime a b), Bezout a b (Zpos xH) *) intros a b; exact (gcd_bezout a b 1). Qed. Lemma bezout_rel_prime : forall a b : Z, Bezout a b 1 -> rel_prime a b. Proof. (* Goal: forall (a b : Z) (_ : Bezout a b (Zpos xH)), rel_prime a b *) simple induction 1; constructor; auto. (* Goal: forall (x : Z) (_ : divide x a) (_ : divide x b), divide x (Zpos xH) *) intros. (* Goal: divide x (Zpos xH) *) rewrite <- H0; auto. Qed. Theorem Gauss : forall a b c : Z, (a | b * c)%Z -> rel_prime a b -> (a | c)%Z. Proof. (* Goal: forall (a b c : Z) (_ : divide a (Z.mul b c)) (_ : rel_prime a b), divide a c *) intros. (* Goal: divide a c *) elim (rel_prime_bezout a b H0); intros. (* Goal: divide a c *) replace c with (c * 1)%Z; [ idtac | ring ]. (* Goal: divide a (Z.mul c (Zpos xH)) *) rewrite <- H1. (* Goal: divide a (Z.mul c (Z.add (Z.mul u a) (Z.mul v b))) *) replace (c * (u * a + v * b))%Z with (c * u * a + v * (b * c))%Z; [ eauto | ring ]. Qed. Lemma rel_prime_mult : forall a b c : Z, rel_prime a b -> rel_prime a c -> rel_prime a (b * c). Proof. (* Goal: forall (a b c : Z) (_ : rel_prime a b) (_ : rel_prime a c), rel_prime a (Z.mul b c) *) intros a b c Hb Hc. (* Goal: rel_prime a (Z.mul b c) *) elim (rel_prime_bezout a b Hb); intros. (* Goal: rel_prime a (Z.mul b c) *) elim (rel_prime_bezout a c Hc); intros. (* Goal: rel_prime a (Z.mul b c) *) apply bezout_rel_prime. (* Goal: Bezout a (Z.mul b c) (Zpos xH) *) apply Bezout_intro with (u := (u * u0 * a + v0 * c * u + u0 * v * b)%Z) (v := (v * v0)%Z). (* Goal: @eq Z (Z.add (Z.mul (Z.add (Z.add (Z.mul (Z.mul u u0) a) (Z.mul (Z.mul v0 c) u)) (Z.mul (Z.mul u0 v) b)) a) (Z.mul (Z.mul v v0) (Z.mul b c))) (Zpos xH) *) rewrite <- H. (* Goal: @eq Z (Z.add (Z.mul (Z.add (Z.add (Z.mul (Z.mul u u0) a) (Z.mul (Z.mul v0 c) u)) (Z.mul (Z.mul u0 v) b)) a) (Z.mul (Z.mul v v0) (Z.mul b c))) (Z.add (Z.mul u a) (Z.mul v b)) *) replace (u * a + v * b)%Z with ((u * a + v * b) * 1)%Z; [ idtac | ring ]. (* Goal: @eq Z (Z.add (Z.mul (Z.add (Z.add (Z.mul (Z.mul u u0) a) (Z.mul (Z.mul v0 c) u)) (Z.mul (Z.mul u0 v) b)) a) (Z.mul (Z.mul v v0) (Z.mul b c))) (Z.mul (Z.add (Z.mul u a) (Z.mul v b)) (Zpos xH)) *) rewrite <- H0. (* Goal: @eq Z (Z.add (Z.mul (Z.add (Z.add (Z.mul (Z.mul u u0) a) (Z.mul (Z.mul v0 c) u)) (Z.mul (Z.mul u0 v) b)) a) (Z.mul (Z.mul v v0) (Z.mul b c))) (Z.mul (Z.add (Z.mul u a) (Z.mul v b)) (Z.add (Z.mul u0 a) (Z.mul v0 c))) *) ring. Qed. Inductive prime (p : Z) : Prop := prime_intro : (1 < p)%Z -> (forall n : Z, (1 <= n < p)%Z -> rel_prime n p) -> prime p. Lemma prime_divisors : forall p : Z, prime p -> forall a : Z, (a | p)%Z -> a = (-1)%Z \/ a = 1%Z \/ a = p \/ a = (- p)%Z. Proof. (* Goal: forall (p : Z) (_ : prime p) (a : Z) (_ : divide a p), or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) simple induction 1; intros. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) assert (a = (- p)%Z \/ (- p < a < -1)%Z \/ a = (-1)%Z \/ a = 0%Z \/ a = 1%Z \/ (1 < a < p)%Z \/ a = p). (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Z.opp p)) (or (and (Z.lt (Z.opp p) a) (Z.lt a (Zneg xH))) (or (@eq Z a (Zneg xH)) (or (@eq Z a Z0) (or (@eq Z a (Zpos xH)) (or (and (Z.lt (Zpos xH) a) (Z.lt a p)) (@eq Z a p)))))) *) assert (Zabs a <= Zabs p)%Z. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Z.opp p)) (or (and (Z.lt (Z.opp p) a) (Z.lt a (Zneg xH))) (or (@eq Z a (Zneg xH)) (or (@eq Z a Z0) (or (@eq Z a (Zpos xH)) (or (and (Z.lt (Zpos xH) a) (Z.lt a p)) (@eq Z a p)))))) *) (* Goal: Z.le (Z.abs a) (Z.abs p) *) apply divide_bounds; [ assumption | omega ]. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Z.opp p)) (or (and (Z.lt (Z.opp p) a) (Z.lt a (Zneg xH))) (or (@eq Z a (Zneg xH)) (or (@eq Z a Z0) (or (@eq Z a (Zpos xH)) (or (and (Z.lt (Zpos xH) a) (Z.lt a p)) (@eq Z a p)))))) *) generalize H3. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: forall _ : Z.le (Z.abs a) (Z.abs p), or (@eq Z a (Z.opp p)) (or (and (Z.lt (Z.opp p) a) (Z.lt a (Zneg xH))) (or (@eq Z a (Zneg xH)) (or (@eq Z a Z0) (or (@eq Z a (Zpos xH)) (or (and (Z.lt (Zpos xH) a) (Z.lt a p)) (@eq Z a p)))))) *) pattern (Zabs a) in |- *; apply Zabs_ind; pattern (Zabs p) in |- *; apply Zabs_ind; intros; omega. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) intuition. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) absurd (rel_prime (- a) p); intuition. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: False *) inversion H3. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: False *) assert (- a | - a)%Z; auto. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: False *) assert (- a | p)%Z; auto. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: False *) generalize (H8 (- a)%Z H9 H10); intuition. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: False *) generalize (divide_1 (- a) H11); intuition. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) inversion H2. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) subst a; omega. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) absurd (rel_prime a p); intuition. (* Goal: False *) inversion H3. (* Goal: False *) assert (a | a)%Z; auto. (* Goal: False *) assert (a | p)%Z; auto. (* Goal: False *) generalize (H8 a H9 H10); intuition. (* Goal: False *) generalize (divide_1 a H11); intuition. Qed. Lemma prime_rel_prime : forall p : Z, prime p -> forall a : Z, ~ (p | a)%Z -> rel_prime p a. Proof. (* Goal: forall (p : Z) (_ : prime p) (a : Z) (_ : not (divide p a)), rel_prime p a *) simple induction 1; intros. (* Goal: rel_prime p a *) constructor; intuition. (* Goal: divide x (Zpos xH) *) elim (prime_divisors p H x H3); intuition; subst; auto. (* Goal: divide (Z.opp p) (Zpos xH) *) (* Goal: divide p (Zpos xH) *) absurd (p | a)%Z; auto. (* Goal: divide (Z.opp p) (Zpos xH) *) absurd (p | a)%Z; intuition. Qed. Hint Resolve prime_rel_prime. Axiom divide_dec : forall a b : Z, {(a | b)%Z} + {~ (a | b)%Z}. Lemma prime_mult : forall p : Z, prime p -> forall a b : Z, (p | a * b)%Z -> (p | a)%Z \/ (p | b)%Z. Proof. (* Goal: forall (p : Z) (_ : prime p) (a b : Z) (_ : divide p (Z.mul a b)), or (divide p a) (divide p b) *) simple induction 1; intros. (* Goal: or (divide p a) (divide p b) *) case (divide_dec p a); intuition. (* Goal: or (divide p a) (divide p b) *) right; apply Gauss with a; auto. Qed.
Require Import Arith. Require Import ZArith. Require Import lemmas. Require Import natZ. Require Import dec. Require Import list. Require Import exp. Require Import divides. Require Import prime. Require Import modulo. Require Import gcd. Require Import modprime. Require Import order. Definition allLinCombMod (a : Z) (n m : nat) (qlist : natlist) := alllist nat (fun q : nat => LinCombMod 1 (Exp a (m * multDrop q qlist) - 1) (Z_of_nat n) n) qlist. Lemma allLinCombMod_ok : forall (a : Z) (n m : nat) (qlist : natlist), allLinCombMod a n m qlist <-> (forall qi : nat, inlist nat qi qlist -> LinCombMod 1 (Exp a (m * multDrop qi qlist) - 1) (Z_of_nat n) n). Proof. (* Goal: forall (a : Z) (n m : nat) (qlist : natlist), iff (allLinCombMod a n m qlist) (forall (qi : nat) (_ : inlist nat qi qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) (Z.of_nat n) n) *) intros. (* Goal: iff (allLinCombMod a n m qlist) (forall (qi : nat) (_ : inlist nat qi qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) (Z.of_nat n) n) *) elim (alllist_ok nat (fun q : nat => LinCombMod 1 (Exp a (m * multDrop q qlist) - 1) (Z_of_nat n) n) qlist). (* Goal: forall (_ : forall (_ : alllist nat (fun q : nat => LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop q qlist))) (Zpos xH)) (Z.of_nat n) n) qlist) (q : nat) (_ : inlist nat q qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop q qlist))) (Zpos xH)) (Z.of_nat n) n) (_ : forall _ : forall (q : nat) (_ : inlist nat q qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop q qlist))) (Zpos xH)) (Z.of_nat n) n, alllist nat (fun q : nat => LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop q qlist))) (Zpos xH)) (Z.of_nat n) n) qlist), iff (allLinCombMod a n m qlist) (forall (qi : nat) (_ : inlist nat qi qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) (Z.of_nat n) n) *) split. (* Goal: forall _ : forall (qi : nat) (_ : inlist nat qi qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) (Z.of_nat n) n, allLinCombMod a n m qlist *) (* Goal: forall (_ : allLinCombMod a n m qlist) (qi : nat) (_ : inlist nat qi qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) (Z.of_nat n) n *) intros. (* Goal: forall _ : forall (qi : nat) (_ : inlist nat qi qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) (Z.of_nat n) n, allLinCombMod a n m qlist *) (* Goal: LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) (Z.of_nat n) n *) apply H. (* Goal: forall _ : forall (qi : nat) (_ : inlist nat qi qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) (Z.of_nat n) n, allLinCombMod a n m qlist *) (* Goal: inlist nat qi qlist *) (* Goal: alllist nat (fun q : nat => LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop q qlist))) (Zpos xH)) (Z.of_nat n) n) qlist *) assumption. (* Goal: forall _ : forall (qi : nat) (_ : inlist nat qi qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) (Z.of_nat n) n, allLinCombMod a n m qlist *) (* Goal: inlist nat qi qlist *) assumption. (* Goal: forall _ : forall (qi : nat) (_ : inlist nat qi qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) (Z.of_nat n) n, allLinCombMod a n m qlist *) intros. (* Goal: allLinCombMod a n m qlist *) apply H0. (* Goal: forall (q : nat) (_ : inlist nat q qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop q qlist))) (Zpos xH)) (Z.of_nat n) n *) assumption. Qed. Theorem pocklington : forall (n q m : nat) (a : Z) (qlist : natlist), n > 1 -> n = S (q * m) -> q = product qlist -> allPrime qlist -> Mod (Exp a (pred n)) 1 n -> allLinCombMod a n m qlist -> n <= q * q -> Prime n. Proof. (* Goal: forall (n q m : nat) (a : Z) (qlist : natlist) (_ : gt n (S O)) (_ : @eq nat n (S (Init.Nat.mul q m))) (_ : @eq nat q (product qlist)) (_ : allPrime qlist) (_ : Mod (Exp a (Init.Nat.pred n)) (Zpos xH) n) (_ : allLinCombMod a n m qlist) (_ : le n (Init.Nat.mul q q)), Prime n *) intros. (* Goal: Prime n *) apply primepropdiv. (* Goal: forall (q : nat) (_ : Prime q) (_ : Divides q n), gt (Init.Nat.mul q q) n *) (* Goal: gt n (S O) *) assumption. (* Goal: forall (q : nat) (_ : Prime q) (_ : Divides q n), gt (Init.Nat.mul q q) n *) intro p. (* Goal: forall (_ : Prime p) (_ : Divides p n), gt (Init.Nat.mul p p) n *) intros. (* Goal: gt (Init.Nat.mul p p) n *) elim H6. (* Goal: forall (_ : gt p (S O)) (_ : forall (q : nat) (_ : Divides q p), or (@eq nat q (S O)) (@eq nat q p)), gt (Init.Nat.mul p p) n *) intros. (* Goal: gt (Init.Nat.mul p p) n *) elim H7. (* Goal: forall (x : nat) (_ : @eq nat n (Init.Nat.mul p x)), gt (Init.Nat.mul p p) n *) intro pdn. (* Goal: forall _ : @eq nat n (Init.Nat.mul p pdn), gt (Init.Nat.mul p p) n *) intros. (* Goal: gt (Init.Nat.mul p p) n *) unfold gt in |- *. (* Goal: lt n (Init.Nat.mul p p) *) apply le_lt_trans with (pred p * pred p). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: le n (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) *) apply le_trans with (q * q). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: le (Init.Nat.mul q q) (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) *) (* Goal: le n (Init.Nat.mul q q) *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: le (Init.Nat.mul q q) (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) *) cut (q <= pred p). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: le q (Init.Nat.pred p) *) (* Goal: forall _ : le q (Init.Nat.pred p), le (Init.Nat.mul q q) (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) *) intros. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: le q (Init.Nat.pred p) *) (* Goal: le (Init.Nat.mul q q) (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) *) apply le_le_mult. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: le q (Init.Nat.pred p) *) (* Goal: le q (Init.Nat.pred p) *) (* Goal: le q (Init.Nat.pred p) *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: le q (Init.Nat.pred p) *) (* Goal: le q (Init.Nat.pred p) *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: le q (Init.Nat.pred p) *) apply order_le_predp with (Exp a m). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Order (Exp a m) q p *) (* Goal: Prime p *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Order (Exp a m) q p *) cut (Mod (Exp (Exp a m) q) 1 p). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: forall _ : Mod (Exp (Exp a m) q) (Zpos xH) p, Order (Exp a m) q p *) intros. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Order (Exp a m) q p *) elim (order_ex (Exp a m) p). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: forall (x : nat) (_ : and (lt x p) (Order (Exp a m) x p)), Order (Exp a m) q p *) intro r. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: forall _ : and (lt r p) (Order (Exp a m) r p), Order (Exp a m) q p *) intros. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Order (Exp a m) q p *) elim H12. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: forall (_ : lt r p) (_ : Order (Exp a m) r p), Order (Exp a m) q p *) intros. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Order (Exp a m) q p *) elim H14. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: forall (_ : lt O r) (_ : and (Mod (Exp (Exp a m) r) (Zpos xH) p) (forall (d : nat) (_ : lt O d) (_ : Mod (Exp (Exp a m) d) (Zpos xH) p), le r d)), Order (Exp a m) q p *) intros. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Order (Exp a m) q p *) elim H16. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: forall (_ : Mod (Exp (Exp a m) r) (Zpos xH) p) (_ : forall (d : nat) (_ : lt O d) (_ : Mod (Exp (Exp a m) d) (Zpos xH) p), le r d), Order (Exp a m) q p *) intros. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Order (Exp a m) q p *) elim (le_lt_or_eq r q). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: forall _ : lt r q, Order (Exp a m) q p *) intro. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Order (Exp a m) q p *) cut (Divides r q). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: forall _ : Divides r q, Order (Exp a m) q p *) intros. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: Order (Exp a m) q p *) elim (techlemma3 qlist r q). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: forall (x : nat) (_ : and (inlist nat x qlist) (Divides r (multDrop x qlist))), Order (Exp a m) q p *) intro qi. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: forall _ : and (inlist nat qi qlist) (Divides r (multDrop qi qlist)), Order (Exp a m) q p *) intros. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Order (Exp a m) q p *) elim H21. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: forall (_ : inlist nat qi qlist) (_ : Divides r (multDrop qi qlist)), Order (Exp a m) q p *) intros. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Order (Exp a m) q p *) elim H23. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: forall (x : nat) (_ : @eq nat (multDrop qi qlist) (Init.Nat.mul r x)), Order (Exp a m) q p *) intro rdm. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: forall _ : @eq nat (multDrop qi qlist) (Init.Nat.mul r rdm), Order (Exp a m) q p *) intros. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Order (Exp a m) q p *) elim (allLinCombMod_ok a n m qlist). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: forall (_ : forall (_ : allLinCombMod a n m qlist) (qi : nat) (_ : inlist nat qi qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) (Z.of_nat n) n) (_ : forall _ : forall (qi : nat) (_ : inlist nat qi qlist), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) (Z.of_nat n) n, allLinCombMod a n m qlist), Order (Exp a m) q p *) intros AH1 AH2. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Order (Exp a m) q p *) elim (AH1 H4 qi H22). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: forall (x : Z) (_ : @ex Z (fun b : Z => Mod (Zpos xH) (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) x) (Z.mul (Z.of_nat n) b)) n)), Order (Exp a m) q p *) intro alpha. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: forall _ : @ex Z (fun b : Z => Mod (Zpos xH) (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) b)) n), Order (Exp a m) q p *) intros. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Order (Exp a m) q p *) elim H25. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: forall (x : Z) (_ : Mod (Zpos xH) (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) x)) n), Order (Exp a m) q p *) intro beta. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: forall _ : Mod (Zpos xH) (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) n, Order (Exp a m) q p *) intros. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Order (Exp a m) q p *) elim (mod_0not1 p). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod Z0 (Zpos xH) p *) (* Goal: gt p (S O) *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod Z0 (Zpos xH) p *) apply mod_trans with ((1 - 1) * alpha + Z_of_nat n * beta)%Z. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Zpos xH) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod Z0 (Z.add (Z.mul (Z.sub (Zpos xH) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) p *) rewrite H10. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Zpos xH) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod Z0 (Z.add (Z.mul (Z.sub (Zpos xH) (Zpos xH)) alpha) (Z.mul (Z.of_nat (Init.Nat.mul p pdn)) beta)) p *) simpl in |- *. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Zpos xH) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod Z0 (Z.mul (Z.of_nat (Init.Nat.mul p pdn)) beta) p *) rewrite Znat.inj_mult. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Zpos xH) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod Z0 (Z.mul (Z.mul (Z.of_nat p) (Z.of_nat pdn)) beta) p *) rewrite Zmult_assoc_reverse. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Zpos xH) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod Z0 (Z.mul (Z.of_nat p) (Z.mul (Z.of_nat pdn) beta)) p *) apply mod_sym. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Zpos xH) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.mul (Z.of_nat p) (Z.mul (Z.of_nat pdn) beta)) Z0 p *) apply mod_nx_0_n. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Zpos xH) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) apply mod_trans with ((Exp a (m * multDrop qi qlist) - 1) * alpha + Z_of_nat n * beta)%Z. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Zpos xH) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) p *) apply mod_plus_compat. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.mul (Z.of_nat n) beta) (Z.mul (Z.of_nat n) beta) p *) (* Goal: Mod (Z.mul (Z.sub (Zpos xH) (Zpos xH)) alpha) (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) p *) apply mod_mult_compat. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.mul (Z.of_nat n) beta) (Z.mul (Z.of_nat n) beta) p *) (* Goal: Mod alpha alpha p *) (* Goal: Mod (Z.sub (Zpos xH) (Zpos xH)) (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) p *) apply mod_minus_compat. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.mul (Z.of_nat n) beta) (Z.mul (Z.of_nat n) beta) p *) (* Goal: Mod alpha alpha p *) (* Goal: Mod (Zpos xH) (Zpos xH) p *) (* Goal: Mod (Zpos xH) (Exp a (Init.Nat.mul m (multDrop qi qlist))) p *) rewrite H24. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.mul (Z.of_nat n) beta) (Z.mul (Z.of_nat n) beta) p *) (* Goal: Mod alpha alpha p *) (* Goal: Mod (Zpos xH) (Zpos xH) p *) (* Goal: Mod (Zpos xH) (Exp a (Init.Nat.mul m (Init.Nat.mul r rdm))) p *) rewrite mult_assoc. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.mul (Z.of_nat n) beta) (Z.mul (Z.of_nat n) beta) p *) (* Goal: Mod alpha alpha p *) (* Goal: Mod (Zpos xH) (Zpos xH) p *) (* Goal: Mod (Zpos xH) (Exp a (Nat.mul (Nat.mul m r) rdm)) p *) apply mod_sym. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.mul (Z.of_nat n) beta) (Z.mul (Z.of_nat n) beta) p *) (* Goal: Mod alpha alpha p *) (* Goal: Mod (Zpos xH) (Zpos xH) p *) (* Goal: Mod (Exp a (Nat.mul (Nat.mul m r) rdm)) (Zpos xH) p *) rewrite exp_mult. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.mul (Z.of_nat n) beta) (Z.mul (Z.of_nat n) beta) p *) (* Goal: Mod alpha alpha p *) (* Goal: Mod (Zpos xH) (Zpos xH) p *) (* Goal: Mod (Exp (Exp a (Nat.mul m r)) rdm) (Zpos xH) p *) apply mod_exp1. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.mul (Z.of_nat n) beta) (Z.mul (Z.of_nat n) beta) p *) (* Goal: Mod alpha alpha p *) (* Goal: Mod (Zpos xH) (Zpos xH) p *) (* Goal: Mod (Exp a (Nat.mul m r)) (Zpos xH) p *) rewrite exp_mult. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.mul (Z.of_nat n) beta) (Z.mul (Z.of_nat n) beta) p *) (* Goal: Mod alpha alpha p *) (* Goal: Mod (Zpos xH) (Zpos xH) p *) (* Goal: Mod (Exp (Exp a m) r) (Zpos xH) p *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.mul (Z.of_nat n) beta) (Z.mul (Z.of_nat n) beta) p *) (* Goal: Mod alpha alpha p *) (* Goal: Mod (Zpos xH) (Zpos xH) p *) apply mod_refl. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.mul (Z.of_nat n) beta) (Z.mul (Z.of_nat n) beta) p *) (* Goal: Mod alpha alpha p *) apply mod_refl. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) (* Goal: Mod (Z.mul (Z.of_nat n) beta) (Z.mul (Z.of_nat n) beta) p *) apply mod_refl. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Zpos xH) p *) apply mod_sym. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Zpos xH) (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) p *) apply modpq_modp with pdn. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Zpos xH) (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) (Init.Nat.mul p pdn) *) rewrite <- H10. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) (* Goal: Mod (Zpos xH) (Z.add (Z.mul (Z.sub (Exp a (Init.Nat.mul m (multDrop qi qlist))) (Zpos xH)) alpha) (Z.mul (Z.of_nat n) beta)) n *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) (* Goal: lt O r *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) (* Goal: lt r q *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) (* Goal: Divides r q *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) (* Goal: @eq nat q (product qlist) *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) (* Goal: allPrime qlist *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Divides r q *) apply (order_div (Exp a m) r p H14 q). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: lt O q *) apply lt_trans with r. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: lt r q *) (* Goal: lt O r *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: lt r q *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: forall _ : @eq nat r q, Order (Exp a m) q p *) intro. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: Order (Exp a m) q p *) rewrite <- H19. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) (* Goal: Order (Exp a m) r p *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: le r q *) apply H18. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: lt O q *) elim (le_lt_or_eq 0 q). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: le O q *) (* Goal: forall _ : @eq nat O q, lt O q *) (* Goal: forall _ : lt O q, lt O q *) intro. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: le O q *) (* Goal: forall _ : @eq nat O q, lt O q *) (* Goal: lt O q *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: le O q *) (* Goal: forall _ : @eq nat O q, lt O q *) intro. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: le O q *) (* Goal: lt O q *) rewrite <- H19 in H5. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: le O q *) (* Goal: lt O q *) simpl in H5. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: le O q *) (* Goal: lt O q *) elim (le_not_lt n 0). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: le O q *) (* Goal: lt O n *) (* Goal: le n O *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: le O q *) (* Goal: lt O n *) apply lt_trans with 1. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: le O q *) (* Goal: lt (S O) n *) (* Goal: lt O (S O) *) apply lt_O_Sn. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: le O q *) (* Goal: lt (S O) n *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: le O q *) apply le_O_n. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) (* Goal: Prime p *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod (Exp a m) Z0 p) *) apply mod_not_exp_0. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod a Z0 p) *) (* Goal: Prime p *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: not (Mod a Z0 p) *) intro. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: False *) elim (mod_0not1 p). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod Z0 (Zpos xH) p *) (* Goal: gt p (S O) *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod Z0 (Zpos xH) p *) apply mod_trans with (Exp a (pred n)). (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp a (Init.Nat.pred n)) (Zpos xH) p *) (* Goal: Mod Z0 (Exp a (Init.Nat.pred n)) p *) apply mod_sym. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp a (Init.Nat.pred n)) (Zpos xH) p *) (* Goal: Mod (Exp a (Init.Nat.pred n)) Z0 p *) apply moda0_exp_compat. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp a (Init.Nat.pred n)) (Zpos xH) p *) (* Goal: gt (Init.Nat.pred n) O *) (* Goal: Mod a Z0 p *) (* Goal: gt p O *) unfold gt in |- *. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp a (Init.Nat.pred n)) (Zpos xH) p *) (* Goal: gt (Init.Nat.pred n) O *) (* Goal: Mod a Z0 p *) (* Goal: lt O p *) apply lt_trans with 1. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp a (Init.Nat.pred n)) (Zpos xH) p *) (* Goal: gt (Init.Nat.pred n) O *) (* Goal: Mod a Z0 p *) (* Goal: lt (S O) p *) (* Goal: lt O (S O) *) apply lt_O_Sn. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp a (Init.Nat.pred n)) (Zpos xH) p *) (* Goal: gt (Init.Nat.pred n) O *) (* Goal: Mod a Z0 p *) (* Goal: lt (S O) p *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp a (Init.Nat.pred n)) (Zpos xH) p *) (* Goal: gt (Init.Nat.pred n) O *) (* Goal: Mod a Z0 p *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp a (Init.Nat.pred n)) (Zpos xH) p *) (* Goal: gt (Init.Nat.pred n) O *) apply gt_pred. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp a (Init.Nat.pred n)) (Zpos xH) p *) (* Goal: gt n (S O) *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp a (Init.Nat.pred n)) (Zpos xH) p *) rewrite H0. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp a (Init.Nat.pred (S (Init.Nat.mul q m)))) (Zpos xH) p *) simpl in |- *. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp a (Init.Nat.mul q m)) (Zpos xH) p *) rewrite mult_comm. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp a (Nat.mul m q)) (Zpos xH) p *) rewrite exp_mult. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) rewrite H0 in H3. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) simpl in H3. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) rewrite <- H0 in H3. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) p *) apply modpq_modp with pdn. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) (Init.Nat.mul p pdn) *) rewrite <- H10. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp (Exp a m) q) (Zpos xH) n *) rewrite <- exp_mult. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp a (Init.Nat.mul m q)) (Zpos xH) n *) rewrite mult_comm. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) (* Goal: Mod (Exp a (Nat.mul q m)) (Zpos xH) n *) assumption. (* Goal: lt (Init.Nat.mul (Init.Nat.pred p) (Init.Nat.pred p)) (Init.Nat.mul p p) *) apply lt_multpred_pp. (* Goal: gt p (S O) *) assumption. Qed. Definition ZallLinCombMod (a n m N : Z) (qlist : Zlist) := alllist Z (fun q : Z => ZLinCombMod 1 (ZExp a (m * zmultDrop q qlist) - 1) n N) qlist. Lemma ZallLinCombMod_ok : forall (a n m N : Z) (qlist : Zlist), ZallLinCombMod a n m N qlist -> forall qi : Z, inlist Z qi qlist -> ZLinCombMod 1 (ZExp a (m * zmultDrop qi qlist) - 1) n N. Proof. (* Goal: forall (a n m N : Z) (qlist : Zlist) (_ : ZallLinCombMod a n m N qlist) (qi : Z) (_ : inlist Z qi qlist), ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop qi qlist))) (Zpos xH)) n N *) intros. (* Goal: ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop qi qlist))) (Zpos xH)) n N *) elim (alllist_ok Z (fun q : Z => ZLinCombMod 1 (ZExp a (m * zmultDrop q qlist) - 1) n N) qlist). (* Goal: forall (_ : forall (_ : alllist Z (fun q : Z => ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop q qlist))) (Zpos xH)) n N) qlist) (q : Z) (_ : inlist Z q qlist), ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop q qlist))) (Zpos xH)) n N) (_ : forall _ : forall (q : Z) (_ : inlist Z q qlist), ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop q qlist))) (Zpos xH)) n N, alllist Z (fun q : Z => ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop q qlist))) (Zpos xH)) n N) qlist), ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop qi qlist))) (Zpos xH)) n N *) intros. (* Goal: ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop qi qlist))) (Zpos xH)) n N *) apply H1. (* Goal: inlist Z qi qlist *) (* Goal: alllist Z (fun q : Z => ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop q qlist))) (Zpos xH)) n N) qlist *) assumption. (* Goal: inlist Z qi qlist *) assumption. Qed. Lemma alllincombzalllincomb : forall (a n m : Z) (qlist : Zlist), (0 <= n)%Z -> (0 <= m)%Z -> allPos qlist -> ZallLinCombMod a n m n qlist -> allLinCombMod a (Zabs_nat n) (Zabs_nat m) (map _ _ Zabs_nat qlist). Proof. (* Goal: forall (a n m : Z) (qlist : Zlist) (_ : Z.le Z0 n) (_ : Z.le Z0 m) (_ : allPos qlist) (_ : ZallLinCombMod a n m n qlist), allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) intros. (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) unfold ZallLinCombMod in H. (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) elim (alllist_ok Z (fun q : Z => ZLinCombMod 1 (ZExp a (m * zmultDrop q qlist) - 1) n n) qlist). (* Goal: forall (_ : forall (_ : alllist Z (fun q : Z => ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop q qlist))) (Zpos xH)) n n) qlist) (q : Z) (_ : inlist Z q qlist), ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop q qlist))) (Zpos xH)) n n) (_ : forall _ : forall (q : Z) (_ : inlist Z q qlist), ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop q qlist))) (Zpos xH)) n n, alllist Z (fun q : Z => ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop q qlist))) (Zpos xH)) n n) qlist), allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) intros. (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) elim (alllist_ok nat (fun q0 : nat => LinCombMod 1 (Exp a (Zabs_nat m * multDrop q0 (map _ _ Zabs_nat qlist)) - 1) (Z_of_nat (Zabs_nat n)) (Zabs_nat n)) (map _ _ Zabs_nat qlist)). (* Goal: forall (_ : forall (_ : alllist nat (fun q0 : nat => LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul (Z.abs_nat m) (multDrop q0 (map Z nat Z.abs_nat qlist)))) (Zpos xH)) (Z.of_nat (Z.abs_nat n)) (Z.abs_nat n)) (map Z nat Z.abs_nat qlist)) (q : nat) (_ : inlist nat q (map Z nat Z.abs_nat qlist)), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul (Z.abs_nat m) (multDrop q (map Z nat Z.abs_nat qlist)))) (Zpos xH)) (Z.of_nat (Z.abs_nat n)) (Z.abs_nat n)) (_ : forall _ : forall (q : nat) (_ : inlist nat q (map Z nat Z.abs_nat qlist)), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul (Z.abs_nat m) (multDrop q (map Z nat Z.abs_nat qlist)))) (Zpos xH)) (Z.of_nat (Z.abs_nat n)) (Z.abs_nat n), alllist nat (fun q0 : nat => LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul (Z.abs_nat m) (multDrop q0 (map Z nat Z.abs_nat qlist)))) (Zpos xH)) (Z.of_nat (Z.abs_nat n)) (Z.abs_nat n)) (map Z nat Z.abs_nat qlist)), allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) intros. (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) apply H6. (* Goal: forall (q : nat) (_ : inlist nat q (map Z nat Z.abs_nat qlist)), LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul (Z.abs_nat m) (multDrop q (map Z nat Z.abs_nat qlist)))) (Zpos xH)) (Z.of_nat (Z.abs_nat n)) (Z.abs_nat n) *) intros. (* Goal: LinCombMod (Zpos xH) (Z.sub (Exp a (Init.Nat.mul (Z.abs_nat m) (multDrop q (map Z nat Z.abs_nat qlist)))) (Zpos xH)) (Z.of_nat (Z.abs_nat n)) (Z.abs_nat n) *) rewrite <- inj_zexp. (* Goal: LinCombMod (Zpos xH) (Z.sub (ZExp a (Z.of_nat (Init.Nat.mul (Z.abs_nat m) (multDrop q (map Z nat Z.abs_nat qlist))))) (Zpos xH)) (Z.of_nat (Z.abs_nat n)) (Z.abs_nat n) *) rewrite Znat.inj_mult. (* Goal: LinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul (Z.of_nat (Z.abs_nat m)) (Z.of_nat (multDrop q (map Z nat Z.abs_nat qlist))))) (Zpos xH)) (Z.of_nat (Z.abs_nat n)) (Z.abs_nat n) *) rewrite inj_abs_pos. (* Goal: Z.ge m Z0 *) (* Goal: LinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (Z.of_nat (multDrop q (map Z nat Z.abs_nat qlist))))) (Zpos xH)) (Z.of_nat (Z.abs_nat n)) (Z.abs_nat n) *) rewrite inj_abs_pos. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: LinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (Z.of_nat (multDrop q (map Z nat Z.abs_nat qlist))))) (Zpos xH)) n (Z.abs_nat n) *) replace m with (Z_of_nat (Zabs_nat m)). (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: LinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul (Z.of_nat (Z.abs_nat m)) (Z.of_nat (multDrop q (map Z nat Z.abs_nat qlist))))) (Zpos xH)) n (Z.abs_nat n) *) rewrite <- Znat.inj_mult. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: LinCombMod (Zpos xH) (Z.sub (ZExp a (Z.of_nat (Init.Nat.mul (Z.abs_nat m) (multDrop q (map Z nat Z.abs_nat qlist))))) (Zpos xH)) n (Z.abs_nat n) *) apply zlincombmodlincombmod. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.of_nat (Init.Nat.mul (Z.abs_nat m) (multDrop q (map Z nat Z.abs_nat qlist))))) (Zpos xH)) n n *) rewrite Znat.inj_mult. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul (Z.of_nat (Z.abs_nat m)) (Z.of_nat (multDrop q (map Z nat Z.abs_nat qlist))))) (Zpos xH)) n n *) rewrite inj_abs_pos. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: Z.ge m Z0 *) (* Goal: ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (Z.of_nat (multDrop q (map Z nat Z.abs_nat qlist))))) (Zpos xH)) n n *) rewrite multdropzmultdrop. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: Z.ge m Z0 *) (* Goal: ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop (Z.of_nat q) (map nat Z Z.of_nat (map Z nat Z.abs_nat qlist))))) (Zpos xH)) n n *) rewrite inj_abs_pos_list. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: Z.ge m Z0 *) (* Goal: allPos qlist *) (* Goal: ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop (Z.of_nat q) qlist))) (Zpos xH)) n n *) apply H3. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: Z.ge m Z0 *) (* Goal: allPos qlist *) (* Goal: inlist Z (Z.of_nat q) qlist *) (* Goal: alllist Z (fun q : Z => ZLinCombMod (Zpos xH) (Z.sub (ZExp a (Z.mul m (zmultDrop q qlist))) (Zpos xH)) n n) qlist *) assumption. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: Z.ge m Z0 *) (* Goal: allPos qlist *) (* Goal: inlist Z (Z.of_nat q) qlist *) apply inlist_inj_abs_pos_list. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: Z.ge m Z0 *) (* Goal: allPos qlist *) (* Goal: inlist nat q (map Z nat Z.abs_nat qlist) *) (* Goal: allPos qlist *) assumption. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: Z.ge m Z0 *) (* Goal: allPos qlist *) (* Goal: inlist nat q (map Z nat Z.abs_nat qlist) *) assumption. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: Z.ge m Z0 *) (* Goal: allPos qlist *) assumption. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: Z.ge m Z0 *) apply Zle_ge. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) (* Goal: Z.le Z0 m *) assumption. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: @eq Z (Z.of_nat (Z.abs_nat m)) m *) apply inj_abs_pos. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: Z.ge m Z0 *) apply Zle_ge. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) (* Goal: Z.le Z0 m *) assumption. (* Goal: Z.ge m Z0 *) (* Goal: Z.ge n Z0 *) apply Zle_ge. (* Goal: Z.ge m Z0 *) (* Goal: Z.le Z0 n *) assumption. (* Goal: Z.ge m Z0 *) apply Zle_ge. (* Goal: Z.le Z0 m *) assumption. Qed. Theorem Zpocklington : forall (n q m a : Z) (qlist : Zlist), (n > 1)%Z -> (0 <= q)%Z -> (0 <= m)%Z -> n = (q * m + 1)%Z -> q = zproduct qlist -> allZPrime qlist -> ZMod (ZExp a (n - 1)) 1 n -> ZallLinCombMod a n m n qlist -> (n <= q * q)%Z -> ZPrime n. Proof. (* Goal: forall (n q m a : Z) (qlist : Zlist) (_ : Z.gt n (Zpos xH)) (_ : Z.le Z0 q) (_ : Z.le Z0 m) (_ : @eq Z n (Z.add (Z.mul q m) (Zpos xH))) (_ : @eq Z q (zproduct qlist)) (_ : allZPrime qlist) (_ : ZMod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) n) (_ : ZallLinCombMod a n m n qlist) (_ : Z.le n (Z.mul q q)), ZPrime n *) intros. (* Goal: ZPrime n *) cut (0 <= n)%Z. (* Goal: Z.le Z0 n *) (* Goal: forall _ : Z.le Z0 n, ZPrime n *) intros. (* Goal: Z.le Z0 n *) (* Goal: ZPrime n *) rewrite <- (inj_abs_pos n). (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: ZPrime (Z.of_nat (Z.abs_nat n)) *) apply primezprime. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: Prime (Z.abs_nat n) *) apply (pocklington (Zabs_nat n) (Zabs_nat q) (Zabs_nat m) a (map _ _ Zabs_nat qlist)). (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: @eq nat (Z.abs_nat n) (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) *) (* Goal: gt (Z.abs_nat n) (S O) *) change (Zabs_nat n > Zabs_nat 1) in |- *. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: @eq nat (Z.abs_nat n) (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) *) (* Goal: gt (Z.abs_nat n) (Z.abs_nat (Zpos xH)) *) apply gtzgt. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: @eq nat (Z.abs_nat n) (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) *) (* Goal: Z.gt n (Zpos xH) *) (* Goal: Z.le Z0 (Zpos xH) *) (* Goal: Z.le Z0 n *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: @eq nat (Z.abs_nat n) (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) *) (* Goal: Z.gt n (Zpos xH) *) (* Goal: Z.le Z0 (Zpos xH) *) unfold Zle in |- *. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: @eq nat (Z.abs_nat n) (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) *) (* Goal: Z.gt n (Zpos xH) *) (* Goal: not (@eq comparison (Z.compare Z0 (Zpos xH)) Gt) *) simpl in |- *. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: @eq nat (Z.abs_nat n) (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) *) (* Goal: Z.gt n (Zpos xH) *) (* Goal: not (@eq comparison Lt Gt) *) discriminate. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: @eq nat (Z.abs_nat n) (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) *) (* Goal: Z.gt n (Zpos xH) *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: @eq nat (Z.abs_nat n) (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) *) rewrite H2. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: @eq nat (Z.abs_nat (Z.add (Z.mul q m) (Zpos xH))) (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) *) rewrite abs_plus_pos. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: Z.le Z0 (Zpos xH) *) (* Goal: Z.le Z0 (Z.mul q m) *) (* Goal: @eq nat (Init.Nat.add (Z.abs_nat (Z.mul q m)) (Z.abs_nat (Zpos xH))) (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) *) rewrite abs_mult. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: Z.le Z0 (Zpos xH) *) (* Goal: Z.le Z0 (Z.mul q m) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m)) (Z.abs_nat (Zpos xH))) (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) *) rewrite plus_comm. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: Z.le Z0 (Zpos xH) *) (* Goal: Z.le Z0 (Z.mul q m) *) (* Goal: @eq nat (Nat.add (Z.abs_nat (Zpos xH)) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) *) simpl in |- *. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: Z.le Z0 (Zpos xH) *) (* Goal: Z.le Z0 (Z.mul q m) *) (* Goal: @eq nat (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) (S (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat m))) *) reflexivity. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: Z.le Z0 (Zpos xH) *) (* Goal: Z.le Z0 (Z.mul q m) *) apply isnat_mult. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: Z.le Z0 (Zpos xH) *) (* Goal: Z.le Z0 m *) (* Goal: Z.le Z0 q *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: Z.le Z0 (Zpos xH) *) (* Goal: Z.le Z0 m *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: Z.le Z0 (Zpos xH) *) unfold Zle in |- *. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: not (@eq comparison (Z.compare Z0 (Zpos xH)) Gt) *) simpl in |- *. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) (* Goal: not (@eq comparison Lt Gt) *) discriminate. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat q) (product (map Z nat Z.abs_nat qlist)) *) rewrite H3. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) (* Goal: @eq nat (Z.abs_nat (zproduct qlist)) (product (map Z nat Z.abs_nat qlist)) *) apply zproductproduct. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allPrime (map Z nat Z.abs_nat qlist) *) apply allzprimeallprime. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) (* Goal: allZPrime qlist *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (Zpos xH) (Z.abs_nat n) *) apply mod_trans with (ZExp a (n - 1)). (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Mod (Exp a (Init.Nat.pred (Z.abs_nat n))) (ZExp a (Z.sub n (Zpos xH))) (Z.abs_nat n) *) rewrite <- inj_zexp. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Mod (ZExp a (Z.of_nat (Init.Nat.pred (Z.abs_nat n)))) (ZExp a (Z.sub n (Zpos xH))) (Z.abs_nat n) *) rewrite abs_pred_pos. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Mod (ZExp a (Z.of_nat (Z.abs_nat (Z.sub n (Zpos xH))))) (ZExp a (Z.sub n (Zpos xH))) (Z.abs_nat n) *) rewrite inj_abs_pos. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.ge (Z.sub n (Zpos xH)) Z0 *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (ZExp a (Z.sub n (Zpos xH))) (Z.abs_nat n) *) apply mod_refl. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.ge (Z.sub n (Zpos xH)) Z0 *) apply Zle_ge. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.le Z0 (Z.sub n (Zpos xH)) *) unfold Zminus in |- *. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.le Z0 (Z.add n (Z.opp (Zpos xH))) *) simpl in |- *. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.le Z0 (Z.add n (Zneg xH)) *) change (0 <= 0 + n + -1)%Z in |- *. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.le Z0 (Z.add (Z.add Z0 n) (Zneg xH)) *) rewrite (Zplus_assoc_reverse 0). (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.le Z0 (Z.add Z0 (Z.add n (Zneg xH))) *) rewrite Zplus_comm. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.le Z0 (Z.add (Z.add n (Zneg xH)) Z0) *) apply (Zlt_left 0 n). (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.lt Z0 n *) apply Zlt_trans with 1%Z. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.lt (Zpos xH) n *) (* Goal: Z.lt Z0 (Zpos xH) *) unfold Zlt in |- *. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.lt (Zpos xH) n *) (* Goal: @eq comparison (Z.compare Z0 (Zpos xH)) Lt *) simpl in |- *. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.lt (Zpos xH) n *) (* Goal: @eq comparison Lt Lt *) reflexivity. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.lt (Zpos xH) n *) apply Zgt_lt. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) (* Goal: Z.gt n (Zpos xH) *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt Z0 n *) apply Zlt_trans with 1%Z. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt (Zpos xH) n *) (* Goal: Z.lt Z0 (Zpos xH) *) unfold Zlt in |- *. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt (Zpos xH) n *) (* Goal: @eq comparison (Z.compare Z0 (Zpos xH)) Lt *) simpl in |- *. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt (Zpos xH) n *) (* Goal: @eq comparison Lt Lt *) reflexivity. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.lt (Zpos xH) n *) apply Zgt_lt. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) (* Goal: Z.gt n (Zpos xH) *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: Mod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) (Z.abs_nat n) *) apply zmodmod. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) (* Goal: ZMod (ZExp a (Z.sub n (Zpos xH))) (Zpos xH) n *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: allLinCombMod a (Z.abs_nat n) (Z.abs_nat m) (map Z nat Z.abs_nat qlist) *) apply alllincombzalllincomb. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: ZallLinCombMod a n m n qlist *) (* Goal: allPos qlist *) (* Goal: Z.le Z0 m *) (* Goal: Z.le Z0 n *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: ZallLinCombMod a n m n qlist *) (* Goal: allPos qlist *) (* Goal: Z.le Z0 m *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: ZallLinCombMod a n m n qlist *) (* Goal: allPos qlist *) apply allzprimeallpos. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: ZallLinCombMod a n m n qlist *) (* Goal: allZPrime qlist *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) (* Goal: ZallLinCombMod a n m n qlist *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Init.Nat.mul (Z.abs_nat q) (Z.abs_nat q)) *) rewrite <- abs_mult. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: le (Z.abs_nat n) (Z.abs_nat (Z.mul q q)) *) apply lezle. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: Z.le n (Z.mul q q) *) (* Goal: Z.le Z0 (Z.mul q q) *) (* Goal: Z.le Z0 n *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: Z.le n (Z.mul q q) *) (* Goal: Z.le Z0 (Z.mul q q) *) apply isnat_mult. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: Z.le n (Z.mul q q) *) (* Goal: Z.le Z0 q *) (* Goal: Z.le Z0 q *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: Z.le n (Z.mul q q) *) (* Goal: Z.le Z0 q *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) (* Goal: Z.le n (Z.mul q q) *) assumption. (* Goal: Z.le Z0 n *) (* Goal: Z.ge n Z0 *) apply Zle_ge. (* Goal: Z.le Z0 n *) (* Goal: Z.le Z0 n *) assumption. (* Goal: Z.le Z0 n *) apply Zle_trans with 1%Z. (* Goal: Z.le (Zpos xH) n *) (* Goal: Z.le Z0 (Zpos xH) *) unfold Zle in |- *. (* Goal: Z.le (Zpos xH) n *) (* Goal: not (@eq comparison (Z.compare Z0 (Zpos xH)) Gt) *) simpl in |- *. (* Goal: Z.le (Zpos xH) n *) (* Goal: not (@eq comparison Lt Gt) *) discriminate. (* Goal: Z.le (Zpos xH) n *) apply Zlt_le_weak. (* Goal: Z.lt (Zpos xH) n *) apply Zgt_lt. (* Goal: Z.gt n (Zpos xH) *) assumption. Qed.
Require Import syntax. Inductive F : tm -> Prop := | F_abs : forall (v : vari) (s : ty) (e : tm), F (abs v s e) | F_clos : forall (e e1 : tm) (v : vari) (s : ty), F e -> F (clos e v s e1). Inductive Sno : tm -> Prop := | Sno_o : Sno o | Sno_s : forall e : tm, Sno e -> Sno (succ e). Inductive NF : tm -> Prop := | NF_ttt : NF ttt | NF_fff : NF fff | NF_Sno : forall e : tm, Sno e -> NF e | NF_F : forall e : tm, F e -> NF e. Definition NFsucc (e : tm) := match e return Prop with | o => True | ttt => True | fff => True | abs v s e => True | appl e1 e2 => True | cond e1 e2 e3 => True | var v => True | succ n => Sno (succ n) | prd n => True | is_o n => True | Fix v s e => True | clos e v s e1 => True end. Goal forall e : tm, NF (succ e) -> Sno (succ e). intros e HNF. change (NFsucc (succ e)) in |- *. elim HNF; simpl in |- *; intros; exact I || elim H; simpl in |- *; intros; exact I || apply Sno_s; assumption. Save inv_NF_Sno. Definition SnoSucc (e : tm) := match e return Prop with | o => True | ttt => True | fff => True | abs v s e => True | appl e1 e2 => True | cond e1 e2 e3 => True | var v => True | succ n => Sno n | prd n => True | is_o n => True | Fix v s e => True | clos e v s e1 => True end. Goal forall e : tm, Sno (succ e) -> Sno e. intros e HSno. change (SnoSucc (succ e)) in |- *. elim HSno; simpl in |- *; intros; exact I || assumption. Save inv_Sno_s.
Require Export Bool SetoidList RelationClasses Morphisms RelationPairs Equalities Orders OrdersFacts. Set Implicit Arguments. Unset Strict Implicit. Module Type TypElt. Parameters t elt : Type. End TypElt. Module Type HasWOps (Import T:TypElt). Parameter empty : t. Parameter is_empty : t -> bool. Parameter mem : T.elt -> t -> bool. Parameter add : T.elt -> t -> t. Parameter singleton : T.elt -> t. Parameter remove : T.elt -> t -> t. Parameter union : t -> t -> t. Parameter inter : t -> t -> t. Parameter diff : t -> t -> t. Parameter equal : t -> t -> bool. Parameter subset : t -> t -> bool. Parameter fold : forall A : Type, (T.elt -> A -> A) -> t -> A -> A. Parameter for_all : (T.elt -> bool) -> t -> bool. Parameter exists_ : (T.elt -> bool) -> t -> bool. Parameter filter : (T.elt -> bool) -> t -> t. Parameter partition : (T.elt -> bool) -> t -> t * t. Parameter cardinal : t -> nat. Parameter elements : t -> list T.elt. Parameter choose : t -> option T.elt. End HasWOps. Module Type WOps (E : DecidableType). Definition elt := E.t. Parameter t : Type. Include HasWOps. End WOps. Module Type WSetsOn (E : DecidableType). Include WOps E. Parameter In : elt -> t -> Prop. Declare Instance In_compat : Proper (E.eq==>eq==>iff) In. Definition Equal s s' := forall a : elt, In a s <-> In a s'. Definition Subset s s' := forall a : elt, In a s -> In a s'. Definition Empty s := forall a : elt, ~ In a s. Definition For_all (P : elt -> Prop) s := forall x, In x s -> P x. Definition Exists (P : elt -> Prop) s := exists x, In x s /\ P x. Notation "s [=] t" := (Equal s t) (at level 70, no associativity). Notation "s [<=] t" := (Subset s t) (at level 70, no associativity). Definition eq : t -> t -> Prop := Equal. Include IsEq. Include HasEqDec. Section Spec. Variable s s': t. Variable x y : elt. Variable f : elt -> bool. Notation compatb := (Proper (E.eq==>Logic.eq)) (only parsing). Parameter mem_spec : mem x s = true <-> In x s. Parameter equal_spec : equal s s' = true <-> s[=]s'. Parameter subset_spec : subset s s' = true <-> s[<=]s'. Parameter empty_spec : Empty empty. Parameter is_empty_spec : is_empty s = true <-> Empty s. Parameter add_spec : In y (add x s) <-> E.eq y x \/ In y s. Parameter remove_spec : In y (remove x s) <-> In y s /\ ~E.eq y x. Parameter singleton_spec : In y (singleton x) <-> E.eq y x. Parameter union_spec : In x (union s s') <-> In x s \/ In x s'. Parameter inter_spec : In x (inter s s') <-> In x s /\ In x s'. Parameter diff_spec : In x (diff s s') <-> In x s /\ ~In x s'. Parameter fold_spec : forall (A : Type) (i : A) (f : elt -> A -> A), fold f s i = fold_left (flip f) (elements s) i. Parameter cardinal_spec : cardinal s = length (elements s). Parameter filter_spec : compatb f -> (In x (filter f s) <-> In x s /\ f x = true). Parameter for_all_spec : compatb f -> (for_all f s = true <-> For_all (fun x => f x = true) s). Parameter exists_spec : compatb f -> (exists_ f s = true <-> Exists (fun x => f x = true) s). Parameter partition_spec1 : compatb f -> fst (partition f s) [=] filter f s. Parameter partition_spec2 : compatb f -> snd (partition f s) [=] filter (fun x => negb (f x)) s. Parameter elements_spec1 : InA E.eq x (elements s) <-> In x s. Parameter elements_spec2w : NoDupA E.eq (elements s). Parameter choose_spec1 : choose s = Some x -> In x s. Parameter choose_spec2 : choose s = None -> Empty s. End Spec. End WSetsOn. Module Type WSets. Declare Module E : DecidableType. Include WSetsOn E. End WSets. Module Type HasOrdOps (Import T:TypElt). Parameter compare : t -> t -> comparison. Parameter min_elt : t -> option elt. Parameter max_elt : t -> option elt. End HasOrdOps. Module Type Ops (E : OrderedType) := WOps E <+ HasOrdOps. Module Type SetsOn (E : OrderedType). Include WSetsOn E <+ HasOrdOps <+ HasLt <+ IsStrOrder. Section Spec. Variable s s': t. Variable x y : elt. Parameter compare_spec : CompSpec eq lt s s' (compare s s'). Parameter elements_spec2 : sort E.lt (elements s). Parameter min_elt_spec1 : min_elt s = Some x -> In x s. Parameter min_elt_spec2 : min_elt s = Some x -> In y s -> ~ E.lt y x. Parameter min_elt_spec3 : min_elt s = None -> Empty s. Parameter max_elt_spec1 : max_elt s = Some x -> In x s. Parameter max_elt_spec2 : max_elt s = Some x -> In y s -> ~ E.lt x y. Parameter max_elt_spec3 : max_elt s = None -> Empty s. Parameter choose_spec3 : choose s = Some x -> choose s' = Some y -> Equal s s' -> E.eq x y. End Spec. End SetsOn. Module Type Sets. Declare Module E : OrderedType. Include SetsOn E. End Sets. Module Type S := Sets. Module Type WRawSets (E : DecidableType). Include WOps E. Parameter IsOk : t -> Prop. Class Ok (s:t) : Prop := ok : IsOk s. Parameter isok : t -> bool. Declare Instance isok_Ok s `(isok s = true) : Ok s | 10. Parameter In : elt -> t -> Prop. Declare Instance In_compat : Proper (E.eq==>eq==>iff) In. Definition Equal s s' := forall a : elt, In a s <-> In a s'. Definition Subset s s' := forall a : elt, In a s -> In a s'. Definition Empty s := forall a : elt, ~ In a s. Definition For_all (P : elt -> Prop) s := forall x, In x s -> P x. Definition Exists (P : elt -> Prop) s := exists x, In x s /\ P x. Notation "s [=] t" := (Equal s t) (at level 70, no associativity). Notation "s [<=] t" := (Subset s t) (at level 70, no associativity). Definition eq : t -> t -> Prop := Equal. Declare Instance eq_equiv : Equivalence eq. Declare Instance empty_ok : Ok empty. Declare Instance add_ok s x `(Ok s) : Ok (add x s). Declare Instance remove_ok s x `(Ok s) : Ok (remove x s). Declare Instance singleton_ok x : Ok (singleton x). Declare Instance union_ok s s' `(Ok s, Ok s') : Ok (union s s'). Declare Instance inter_ok s s' `(Ok s, Ok s') : Ok (inter s s'). Declare Instance diff_ok s s' `(Ok s, Ok s') : Ok (diff s s'). Declare Instance filter_ok s f `(Ok s) : Ok (filter f s). Declare Instance partition_ok1 s f `(Ok s) : Ok (fst (partition f s)). Declare Instance partition_ok2 s f `(Ok s) : Ok (snd (partition f s)). Section Spec. Variable s s': t. Variable x y : elt. Variable f : elt -> bool. Notation compatb := (Proper (E.eq==>Logic.eq)) (only parsing). Parameter mem_spec : forall `{Ok s}, mem x s = true <-> In x s. Parameter equal_spec : forall `{Ok s, Ok s'}, equal s s' = true <-> s[=]s'. Parameter subset_spec : forall `{Ok s, Ok s'}, subset s s' = true <-> s[<=]s'. Parameter empty_spec : Empty empty. Parameter is_empty_spec : is_empty s = true <-> Empty s. Parameter add_spec : forall `{Ok s}, In y (add x s) <-> E.eq y x \/ In y s. Parameter remove_spec : forall `{Ok s}, In y (remove x s) <-> In y s /\ ~E.eq y x. Parameter singleton_spec : In y (singleton x) <-> E.eq y x. Parameter union_spec : forall `{Ok s, Ok s'}, In x (union s s') <-> In x s \/ In x s'. Parameter inter_spec : forall `{Ok s, Ok s'}, In x (inter s s') <-> In x s /\ In x s'. Parameter diff_spec : forall `{Ok s, Ok s'}, In x (diff s s') <-> In x s /\ ~In x s'. Parameter fold_spec : forall (A : Type) (i : A) (f : elt -> A -> A), fold f s i = fold_left (flip f) (elements s) i. Parameter cardinal_spec : forall `{Ok s}, cardinal s = length (elements s). Parameter filter_spec : compatb f -> (In x (filter f s) <-> In x s /\ f x = true). Parameter for_all_spec : compatb f -> (for_all f s = true <-> For_all (fun x => f x = true) s). Parameter exists_spec : compatb f -> (exists_ f s = true <-> Exists (fun x => f x = true) s). Parameter partition_spec1 : compatb f -> fst (partition f s) [=] filter f s. Parameter partition_spec2 : compatb f -> snd (partition f s) [=] filter (fun x => negb (f x)) s. Parameter elements_spec1 : InA E.eq x (elements s) <-> In x s. Parameter elements_spec2w : forall `{Ok s}, NoDupA E.eq (elements s). Parameter choose_spec1 : choose s = Some x -> In x s. Parameter choose_spec2 : choose s = None -> Empty s. End Spec. End WRawSets. Module WRaw2SetsOn (E:DecidableType)(M:WRawSets E) <: WSetsOn E. Local Unset Elimination Schemes. Definition elt := E.t. Record t_ := Mkt {this :> M.t; is_ok : M.Ok this}. Definition t := t_. Arguments Mkt this {is_ok}. Hint Resolve is_ok : typeclass_instances. Definition In (x : elt)(s : t) := M.In x s.(this). Definition Equal (s s' : t) := forall a : elt, In a s <-> In a s'. Definition Subset (s s' : t) := forall a : elt, In a s -> In a s'. Definition Empty (s : t) := forall a : elt, ~ In a s. Definition For_all (P : elt -> Prop)(s : t) := forall x, In x s -> P x. Definition Exists (P : elt -> Prop)(s : t) := exists x, In x s /\ P x. Definition mem (x : elt)(s : t) := M.mem x s. Definition add (x : elt)(s : t) : t := Mkt (M.add x s). Definition remove (x : elt)(s : t) : t := Mkt (M.remove x s). Definition singleton (x : elt) : t := Mkt (M.singleton x). Definition union (s s' : t) : t := Mkt (M.union s s'). Definition inter (s s' : t) : t := Mkt (M.inter s s'). Definition diff (s s' : t) : t := Mkt (M.diff s s'). Definition equal (s s' : t) := M.equal s s'. Definition subset (s s' : t) := M.subset s s'. Definition empty : t := Mkt M.empty. Definition is_empty (s : t) := M.is_empty s. Definition elements (s : t) : list elt := M.elements s. Definition choose (s : t) : option elt := M.choose s. Definition fold (A : Type)(f : elt -> A -> A)(s : t) : A -> A := M.fold f s. Definition cardinal (s : t) := M.cardinal s. Definition filter (f : elt -> bool)(s : t) : t := Mkt (M.filter f s). Definition for_all (f : elt -> bool)(s : t) := M.for_all f s. Definition exists_ (f : elt -> bool)(s : t) := M.exists_ f s. Definition partition (f : elt -> bool)(s : t) : t * t := let p := M.partition f s in (Mkt (fst p), Mkt (snd p)). Definition eq : t -> t -> Prop := Equal. Definition eq_dec : forall (s s':t), { eq s s' }+{ ~eq s s' }. Proof. (* Goal: forall s s' : t, sumbool (eq s s') (not (eq s s')) *) intros (s,Hs) (s',Hs'). (* Goal: sumbool (eq (@Mkt s Hs) (@Mkt s' Hs')) (not (eq (@Mkt s Hs) (@Mkt s' Hs'))) *) change ({M.Equal s s'}+{~M.Equal s s'}). (* Goal: None *) destruct (M.equal s s') eqn:H; [left|right]; rewrite <- M.equal_spec; congruence. Qed. Section Spec. Variable s s' : t. Variable x y : elt. Variable f : elt -> bool. Notation compatb := (Proper (E.eq==>Logic.eq)) (only parsing). Lemma mem_spec : mem x s = true <-> In x s. Proof. (* Goal: iff (@Logic.eq bool (mem x s) true) (In x s) *) exact (@M.mem_spec _ _ _). Qed. Lemma equal_spec : equal s s' = true <-> Equal s s'. Proof. (* Goal: iff (@Logic.eq bool (equal s s') true) (Equal s s') *) exact (@M.equal_spec _ _ _ _). Qed. Lemma subset_spec : subset s s' = true <-> Subset s s'. Proof. (* Goal: iff (@Logic.eq bool (subset s s') true) (Subset s s') *) exact (@M.subset_spec _ _ _ _). Qed. Lemma empty_spec : Empty empty. Proof. (* Goal: Empty empty *) exact M.empty_spec. Qed. Lemma is_empty_spec : is_empty s = true <-> Empty s. Proof. (* Goal: iff (@Logic.eq bool (is_empty s) true) (Empty s) *) exact (@M.is_empty_spec _). Qed. Lemma add_spec : In y (add x s) <-> E.eq y x \/ In y s. Proof. (* Goal: None *) exact (@M.add_spec _ _ _ _). Qed. Lemma remove_spec : In y (remove x s) <-> In y s /\ ~E.eq y x. Proof. (* Goal: None *) exact (@M.remove_spec _ _ _ _). Qed. Lemma singleton_spec : In y (singleton x) <-> E.eq y x. Proof. (* Goal: None *) exact (@M.singleton_spec _ _). Qed. Lemma union_spec : In x (union s s') <-> In x s \/ In x s'. Proof. (* Goal: iff (In x (union s s')) (or (In x s) (In x s')) *) exact (@M.union_spec _ _ _ _ _). Qed. Lemma inter_spec : In x (inter s s') <-> In x s /\ In x s'. Proof. (* Goal: iff (In x (inter s s')) (and (In x s) (In x s')) *) exact (@M.inter_spec _ _ _ _ _). Qed. Lemma diff_spec : In x (diff s s') <-> In x s /\ ~In x s'. Proof. (* Goal: iff (In x (diff s s')) (and (In x s) (not (In x s'))) *) exact (@M.diff_spec _ _ _ _ _). Qed. Lemma fold_spec : forall (A : Type) (i : A) (f : elt -> A -> A), fold f s i = fold_left (fun a e => f e a) (elements s) i. Proof. (* Goal: forall (A : Type) (i : A) (f : forall (_ : elt) (_ : A), A), @Logic.eq A (@fold A f s i) (@fold_left A elt (fun (a : A) (e : elt) => f e a) (elements s) i) *) exact (@M.fold_spec _). Qed. Lemma cardinal_spec : cardinal s = length (elements s). Proof. (* Goal: @Logic.eq nat (cardinal s) (@length elt (elements s)) *) exact (@M.cardinal_spec s _). Qed. Lemma filter_spec : compatb f -> (In x (filter f s) <-> In x s /\ f x = true). Proof. (* Goal: None *) exact (@M.filter_spec _ _ _). Qed. Lemma for_all_spec : compatb f -> (for_all f s = true <-> For_all (fun x => f x = true) s). Proof. (* Goal: None *) exact (@M.for_all_spec _ _). Qed. Lemma exists_spec : compatb f -> (exists_ f s = true <-> Exists (fun x => f x = true) s). Proof. (* Goal: None *) exact (@M.exists_spec _ _). Qed. Lemma partition_spec1 : compatb f -> Equal (fst (partition f s)) (filter f s). Proof. (* Goal: None *) exact (@M.partition_spec1 _ _). Qed. Lemma partition_spec2 : compatb f -> Equal (snd (partition f s)) (filter (fun x => negb (f x)) s). Proof. (* Goal: None *) exact (@M.partition_spec2 _ _). Qed. Lemma elements_spec1 : InA E.eq x (elements s) <-> In x s. Proof. (* Goal: None *) exact (@M.elements_spec1 _ _). Qed. Lemma elements_spec2w : NoDupA E.eq (elements s). Proof. (* Goal: None *) exact (@M.elements_spec2w _ _). Qed. Lemma choose_spec1 : choose s = Some x -> In x s. Proof. (* Goal: forall _ : @Logic.eq (option elt) (choose s) (@Some elt x), In x s *) exact (@M.choose_spec1 _ _). Qed. Lemma choose_spec2 : choose s = None -> Empty s. Proof. (* Goal: forall _ : @Logic.eq (option elt) (choose s) (@None elt), Empty s *) exact (@M.choose_spec2 _). Qed. End Spec. End WRaw2SetsOn. Module WRaw2Sets (D:DecidableType)(M:WRawSets D) <: WSets with Module E := D. Module E := D. Include WRaw2SetsOn D M. End WRaw2Sets. Module Type RawSets (E : OrderedType). Include WRawSets E <+ HasOrdOps <+ HasLt <+ IsStrOrder. Section Spec. Variable s s': t. Variable x y : elt. Parameter compare_spec : forall `{Ok s, Ok s'}, CompSpec eq lt s s' (compare s s'). Parameter elements_spec2 : forall `{Ok s}, sort E.lt (elements s). Parameter min_elt_spec1 : min_elt s = Some x -> In x s. Parameter min_elt_spec2 : forall `{Ok s}, min_elt s = Some x -> In y s -> ~ E.lt y x. Parameter min_elt_spec3 : min_elt s = None -> Empty s. Parameter max_elt_spec1 : max_elt s = Some x -> In x s. Parameter max_elt_spec2 : forall `{Ok s}, max_elt s = Some x -> In y s -> ~ E.lt x y. Parameter max_elt_spec3 : max_elt s = None -> Empty s. Parameter choose_spec3 : forall `{Ok s, Ok s'}, choose s = Some x -> choose s' = Some y -> Equal s s' -> E.eq x y. End Spec. End RawSets. Module Raw2SetsOn (O:OrderedType)(M:RawSets O) <: SetsOn O. Include WRaw2SetsOn O M. Definition compare (s s':t) := M.compare s s'. Definition min_elt (s:t) : option elt := M.min_elt s. Definition max_elt (s:t) : option elt := M.max_elt s. Definition lt (s s':t) := M.lt s s'. Section Spec. Variable s s' s'' : t. Variable x y : elt. Lemma compare_spec : CompSpec eq lt s s' (compare s s'). Proof. (* Goal: @CompSpec t eq lt s s' (compare s s') *) unfold compare; destruct (@M.compare_spec s s' _ _); auto. Qed. Lemma elements_spec2 : sort O.lt (elements s). Proof. (* Goal: None *) exact (@M.elements_spec2 _ _). Qed. Lemma min_elt_spec1 : min_elt s = Some x -> In x s. Proof. (* Goal: forall _ : @Logic.eq (option elt) (min_elt s) (@Some elt x), In x s *) exact (@M.min_elt_spec1 _ _). Qed. Lemma min_elt_spec2 : min_elt s = Some x -> In y s -> ~ O.lt y x. Proof. (* Goal: None *) exact (@M.min_elt_spec2 _ _ _ _). Qed. Lemma min_elt_spec3 : min_elt s = None -> Empty s. Proof. (* Goal: forall _ : @Logic.eq (option elt) (min_elt s) (@None elt), Empty s *) exact (@M.min_elt_spec3 _). Qed. Lemma max_elt_spec1 : max_elt s = Some x -> In x s. Proof. (* Goal: forall _ : @Logic.eq (option elt) (max_elt s) (@Some elt x), In x s *) exact (@M.max_elt_spec1 _ _). Qed. Lemma max_elt_spec2 : max_elt s = Some x -> In y s -> ~ O.lt x y. Proof. (* Goal: None *) exact (@M.max_elt_spec2 _ _ _ _). Qed. Lemma max_elt_spec3 : max_elt s = None -> Empty s. Proof. (* Goal: forall _ : @Logic.eq (option elt) (max_elt s) (@None elt), Empty s *) exact (@M.max_elt_spec3 _). Qed. Lemma choose_spec3 : choose s = Some x -> choose s' = Some y -> Equal s s' -> O.eq x y. Proof. (* Goal: None *) exact (@M.choose_spec3 _ _ _ _ _ _). Qed. End Spec. End Raw2SetsOn. Module Raw2Sets (O:OrderedType)(M:RawSets O) <: Sets with Module E := O. Module E := O. Include Raw2SetsOn O M. End Raw2Sets. Module Type IN (O:OrderedType). Parameter Inline t : Type. Parameter Inline In : O.t -> t -> Prop. Declare Instance In_compat : Proper (O.eq==>eq==>iff) In. Definition Equal s s' := forall x, In x s <-> In x s'. Definition Empty s := forall x, ~In x s. End IN. Module MakeSetOrdering (O:OrderedType)(Import M:IN O). Module Import MO := OrderedTypeFacts O. Definition eq : t -> t -> Prop := Equal. Definition Below x s := forall y, In y s -> O.lt y x. Definition Above x s := forall y, In y s -> O.lt x y. Definition EquivBefore x s s' := forall y, O.lt y x -> (In y s <-> In y s'). Definition EmptyBetween x y s := forall z, In z s -> O.lt z y -> O.lt z x. Definition lt s s' := exists x, EquivBefore x s s' /\ ((In x s' /\ Below x s) \/ (In x s /\ exists y, In y s' /\ O.lt x y /\ EmptyBetween x y s')). Lemma lt_empty_r : forall s s', Empty s' -> ~ lt s s'. Proof. (* Goal: None *) intros s s' Hs' (x & _ & [(IN,_)|(_ & y & IN & _)]). (* Goal: False *) (* Goal: False *) elim (Hs' x IN). (* Goal: False *) elim (Hs' y IN). Qed. Definition Add x s s' := forall y, In y s' <-> O.eq x y \/ In y s. Lemma lt_empty_l : forall x s1 s2 s2', Empty s1 -> Above x s2 -> Add x s2 s2' -> lt s1 s2'. Proof. (* Goal: None *) intros x s1 s2 s2' Em Ab Ad. (* Goal: lt s1 s2' *) exists x; split. (* Goal: None *) (* Goal: EquivBefore x s1 s2' *) intros y Hy; split; intros IN. (* Goal: None *) (* Goal: None *) (* Goal: None *) elim (Em y IN). (* Goal: None *) (* Goal: None *) rewrite (Ad y) in IN; destruct IN as [EQ|IN]. (* Goal: None *) (* Goal: None *) (* Goal: None *) order. (* Goal: None *) (* Goal: None *) specialize (Ab y IN). (* Goal: None *) (* Goal: None *) order. (* Goal: None *) left; split. (* Goal: Below x s1 *) (* Goal: None *) rewrite (Ad x). (* Goal: Below x s1 *) (* Goal: None *) now left. (* Goal: Below x s1 *) intros y Hy. (* Goal: None *) elim (Em y Hy). Qed. Lemma lt_add_lt : forall x1 x2 s1 s1' s2 s2', Above x1 s1 -> Above x2 s2 -> Add x1 s1 s1' -> Add x2 s2 s2' -> O.lt x1 x2 -> lt s1' s2'. Proof. (* Goal: None *) intros x1 x2 s1 s1' s2 s2' Ab1 Ab2 Ad1 Ad2 LT. (* Goal: lt s1' s2' *) exists x1; split; [ | right; split]; auto. (* Goal: None *) (* Goal: None *) (* Goal: EquivBefore x1 s1' s2' *) intros y Hy. (* Goal: None *) (* Goal: None *) (* Goal: None *) rewrite (Ad1 y), (Ad2 y). (* Goal: None *) (* Goal: None *) (* Goal: None *) split; intros [U|U]; try order. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) specialize (Ab1 y U). (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) order. (* Goal: None *) (* Goal: None *) (* Goal: None *) specialize (Ab2 y U). (* Goal: None *) (* Goal: None *) (* Goal: None *) order. (* Goal: None *) (* Goal: None *) rewrite (Ad1 x1); auto with *. (* Goal: None *) exists x2; repeat split; auto. (* Goal: EmptyBetween x1 x2 s2' *) (* Goal: None *) rewrite (Ad2 x2); now left. (* Goal: EmptyBetween x1 x2 s2' *) intros y. (* Goal: None *) rewrite (Ad2 y). (* Goal: None *) intros [U|U]. (* Goal: None *) (* Goal: None *) order. (* Goal: None *) specialize (Ab2 y U). (* Goal: None *) order. Qed. Lemma lt_add_eq : forall x1 x2 s1 s1' s2 s2', Above x1 s1 -> Above x2 s2 -> Add x1 s1 s1' -> Add x2 s2 s2' -> O.eq x1 x2 -> lt s1 s2 -> lt s1' s2'. Proof. (* Goal: None *) intros x1 x2 s1 s1' s2 s2' Ab1 Ab2 Ad1 Ad2 Hx (x & EQ & Disj). (* Goal: lt s1' s2' *) assert (O.lt x1 x). (* Goal: lt s1' s2' *) (* Goal: None *) destruct Disj as [(IN,_)|(IN,_)]; auto. (* Goal: lt s1' s2' *) (* Goal: None *) rewrite Hx; auto. (* Goal: lt s1' s2' *) exists x; split. (* Goal: None *) (* Goal: EquivBefore x s1' s2' *) intros z Hz. (* Goal: None *) (* Goal: None *) rewrite (Ad1 z), (Ad2 z). (* Goal: None *) (* Goal: None *) split; intros [U|U]; try (left; order); right. (* Goal: None *) (* Goal: None *) (* Goal: None *) rewrite <- (EQ z); auto. (* Goal: None *) (* Goal: None *) rewrite (EQ z); auto. (* Goal: None *) destruct Disj as [(IN,Em)|(IN & y & INy & LTy & Be)]. (* Goal: None *) (* Goal: None *) left; split; auto. (* Goal: None *) (* Goal: Below x s1' *) (* Goal: None *) rewrite (Ad2 x); auto. (* Goal: None *) (* Goal: Below x s1' *) intros z. (* Goal: None *) (* Goal: None *) rewrite (Ad1 z); intros [U|U]; try specialize (Ab1 z U); auto; order. (* Goal: None *) right; split; auto. (* Goal: None *) (* Goal: None *) rewrite (Ad1 x); auto. (* Goal: None *) exists y; repeat split; auto. (* Goal: EmptyBetween x y s2' *) (* Goal: None *) rewrite (Ad2 y); auto. (* Goal: EmptyBetween x y s2' *) intros z. (* Goal: None *) rewrite (Ad2 z). (* Goal: None *) intros [U|U]; try specialize (Ab2 z U); auto; order. Qed. End MakeSetOrdering. Module MakeListOrdering (O:OrderedType). Module MO:=OrderedTypeFacts O. Local Notation t := (list O.t). Local Notation In := (InA O.eq). Definition eq s s' := forall x, In x s <-> In x s'. Instance eq_equiv : Equivalence eq := _. Inductive lt_list : t -> t -> Prop := | lt_nil : forall x s, lt_list nil (x :: s) | lt_cons_lt : forall x y s s', O.lt x y -> lt_list (x :: s) (y :: s') | lt_cons_eq : forall x y s s', O.eq x y -> lt_list s s' -> lt_list (x :: s) (y :: s'). Hint Constructors lt_list. Definition lt := lt_list. Lemma eq_cons : forall l1 l2 x y, O.eq x y -> eq l1 l2 -> eq (x :: l1) (y :: l2). Proof. (* Goal: None *) unfold eq; intros l1 l2 x y Exy E12 z. (* Goal: None *) split; inversion_clear 1. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) left; MO.order. (* Goal: None *) (* Goal: None *) (* Goal: None *) right; rewrite <- E12; auto. (* Goal: None *) (* Goal: None *) left; MO.order. (* Goal: None *) right; rewrite E12; auto. Qed. Hint Resolve eq_cons. Lemma cons_CompSpec : forall c x1 x2 l1 l2, O.eq x1 x2 -> Proof. (* Goal: None *) destruct c; simpl; inversion_clear 2; auto with relations. Qed. Hint Resolve cons_CompSpec. End MakeListOrdering.
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinear4. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma lemma_paralleldef2A : forall A B C D, TP A B C D -> Par A B C D. Proof. (* Goal: forall (A B C D : @Point Ax0) (_ : @TP Ax0 A B C D), @Par Ax0 A B C D *) intros. (* Goal: @Par Ax0 A B C D *) assert ((neq A B /\ neq C D /\ ~ Meet A B C D /\ OS C D A B)) by (conclude_def TP ). (* Goal: @Par Ax0 A B C D *) let Tf:=fresh in assert (Tf:exists a b e, (Col A B a /\ Col A B b /\ BetS C a e /\ BetS D b e /\ nCol A B C /\ nCol A B D)) by (conclude_def OS );destruct Tf as [a[b[e]]];spliter. (* Goal: @Par Ax0 A B C D *) assert (Col C a e) by (conclude_def Col ). (* Goal: @Par Ax0 A B C D *) assert (Col D b e) by (conclude_def Col ). (* Goal: @Par Ax0 A B C D *) assert (neq a e) by (forward_using lemma_betweennotequal). (* Goal: @Par Ax0 A B C D *) assert (neq e a) by (conclude lemma_inequalitysymmetric). (* Goal: @Par Ax0 A B C D *) assert (neq C e) by (forward_using lemma_betweennotequal). (* Goal: @Par Ax0 A B C D *) assert (neq e C) by (conclude lemma_inequalitysymmetric). (* Goal: @Par Ax0 A B C D *) assert (neq D e) by (forward_using lemma_betweennotequal). (* Goal: @Par Ax0 A B C D *) assert (neq e D) by (conclude lemma_inequalitysymmetric). (* Goal: @Par Ax0 A B C D *) assert (~ eq a b). (* Goal: @Par Ax0 A B C D *) (* Goal: not (@eq Ax0 a b) *) { (* Goal: not (@eq Ax0 a b) *) intro. (* Goal: False *) assert (Col D a e) by (conclude cn_equalitysub). (* Goal: False *) assert (Col a e C) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col a e D) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col e C D) by (conclude lemma_collinear4). (* Goal: False *) assert (Col e D C) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col e D b) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col D C b) by (conclude lemma_collinear4). (* Goal: False *) assert (Col C D b) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Meet A B C D) by (conclude_def Meet ). (* Goal: False *) contradict. (* BG Goal: @Par Ax0 A B C D *) } (* Goal: @Par Ax0 A B C D *) assert (~ Col C e D). (* Goal: @Par Ax0 A B C D *) (* Goal: not (@Col Ax0 C e D) *) { (* Goal: not (@Col Ax0 C e D) *) intro. (* Goal: False *) assert (Col C e a) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col e D a) by (conclude lemma_collinear4). (* Goal: False *) assert (Col e D b) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col D a b) by (conclude lemma_collinear4). (* Goal: False *) assert (Col e D C) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Col D C a) by (conclude lemma_collinear4). (* Goal: False *) assert (Col C D a) by (forward_using lemma_collinearorder). (* Goal: False *) assert (Meet A B C D) by (conclude_def Meet ). (* Goal: False *) contradict. (* BG Goal: @Par Ax0 A B C D *) } (* Goal: @Par Ax0 A B C D *) let Tf:=fresh in assert (Tf:exists M, (BetS C M b /\ BetS D M a)) by (conclude postulate_Pasch_inner);destruct Tf as [M];spliter. (* Goal: @Par Ax0 A B C D *) assert (BetS a M D) by (conclude axiom_betweennesssymmetry). (* Goal: @Par Ax0 A B C D *) assert (eq C C) by (conclude cn_equalityreflexive). (* Goal: @Par Ax0 A B C D *) assert (Col C D C) by (conclude_def Col ). (* Goal: @Par Ax0 A B C D *) assert (eq D D) by (conclude cn_equalityreflexive). (* Goal: @Par Ax0 A B C D *) assert (Col C D D) by (conclude_def Col ). (* Goal: @Par Ax0 A B C D *) assert (Par A B C D) by (conclude_def Par ). (* Goal: @Par Ax0 A B C D *) close. Qed. End Euclid.
Require Export Numerals. Require Export Compare_Num. Require Export Linear_Structures. Section comparator. Variable BASE : BT. Let Digit := digit BASE. Let valB := val BASE. Let ValB := Val BASE. Let Num := num BASE. Let Val_bound := val_bound BASE. Let Cons := cons Digit. Let Nil := nil Digit. Let f_cell (o : order) (x y : Digit) : order := match o return order with | L => L | E => Compare_Nat.comparison (valB x) (valB y) | G => G end. Inductive cell : order -> Digit -> Digit -> order -> Prop := cell_constr : forall (o o' : order) (x y : Digit), o' = f_cell o x y -> cell o x y o'. Let f_circ (n : nat) (o : order) (X Y : Num n) : order := match o return order with | L => L | E => Compare_Nat.comparison (ValB n X) (ValB n Y) | G => G end. Let Connection := connection order Digit Digit cell. Let Comparator (n : nat) (o : order) (X Y : Num n) := Connection n E X Y o. Let Specif (n : nat) (X Y : inf n) : order := Compare_Nat.comparison (val_inf n X) (val_inf n Y). Remark general_correct : forall (n : nat) (X Y : Num n) (o o' : order), Connection n o X Y o' -> o' = f_circ n o X Y. Proof. (* Goal: forall (n : nat) (X Y : Num n) (o o' : order) (_ : Connection n o X Y o'), @eq order o' (f_circ n o X Y) *) simple induction 1. (* Goal: forall (n : nat) (a a1 a' : order) (b c : Digit) (lb lc : list Digit n) (_ : cell a b c a1) (_ : connection order Digit Digit cell n a1 lb lc a') (_ : @eq order a' (f_circ n a1 lb lc)), @eq order a' (f_circ (S n) a (cons Digit n b lb) (cons Digit n c lc)) *) (* Goal: forall a : order, @eq order a (f_circ O a (nil Digit) (nil Digit)) *) clear H o' o Y X n. (* Goal: forall (n : nat) (a a1 a' : order) (b c : Digit) (lb lc : list Digit n) (_ : cell a b c a1) (_ : connection order Digit Digit cell n a1 lb lc a') (_ : @eq order a' (f_circ n a1 lb lc)), @eq order a' (f_circ (S n) a (cons Digit n b lb) (cons Digit n c lc)) *) (* Goal: forall a : order, @eq order a (f_circ O a (nil Digit) (nil Digit)) *) intros o; case o; simpl in |- *; auto. (* Goal: forall (n : nat) (a a1 a' : order) (b c : Digit) (lb lc : list Digit n) (_ : cell a b c a1) (_ : connection order Digit Digit cell n a1 lb lc a') (_ : @eq order a' (f_circ n a1 lb lc)), @eq order a' (f_circ (S n) a (cons Digit n b lb) (cons Digit n c lc)) *) auto. (* Goal: forall (n : nat) (a a1 a' : order) (b c : Digit) (lb lc : list Digit n) (_ : cell a b c a1) (_ : connection order Digit Digit cell n a1 lb lc a') (_ : @eq order a' (f_circ n a1 lb lc)), @eq order a' (f_circ (S n) a (cons Digit n b lb) (cons Digit n c lc)) *) clear H o' o Y X n. (* Goal: forall (n : nat) (a a1 a' : order) (b c : Digit) (lb lc : list Digit n) (_ : cell a b c a1) (_ : connection order Digit Digit cell n a1 lb lc a') (_ : @eq order a' (f_circ n a1 lb lc)), @eq order a' (f_circ (S n) a (cons Digit n b lb) (cons Digit n c lc)) *) intros n o o1 o' x y X Y H_cell H_n H_rec. (* Goal: @eq order o' (f_circ (S n) o (cons Digit n x X) (cons Digit n y Y)) *) inversion_clear H_cell. (* Goal: @eq order o' (f_circ (S n) o (cons Digit n x X) (cons Digit n y Y)) *) rewrite H_rec; rewrite H. (* Goal: @eq order (f_circ n (f_cell o x y) X Y) (f_circ (S n) o (cons Digit n x X) (cons Digit n y Y)) *) cut (o = o); auto. (* Goal: forall _ : @eq order o o, @eq order (f_circ n (f_cell o x y) X Y) (f_circ (S n) o (cons Digit n x X) (cons Digit n y Y)) *) pattern o at 2 3 in |- *; case o; intros e; rewrite e; unfold f_cell in |- *; unfold f_circ in |- *; auto. (* Goal: @eq order match comparison (valB x) (valB y) with | L => L | E => comparison (ValB n X) (ValB n Y) | G => G end (comparison (ValB (S n) (cons Digit n x X)) (ValB (S n) (cons Digit n y Y))) *) cut (Compare_Nat.comparison (valB x) (valB y) = Compare_Nat.comparison (valB x) (valB y)); auto. (* Goal: forall _ : @eq order (comparison (valB x) (valB y)) (comparison (valB x) (valB y)), @eq order match comparison (valB x) (valB y) with | L => L | E => comparison (ValB n X) (ValB n Y) | G => G end (comparison (ValB (S n) (cons Digit n x X)) (ValB (S n) (cons Digit n y Y))) *) pattern (Compare_Nat.comparison (valB x) (valB y)) at 2 3 in |- *; case (Compare_Nat.comparison (valB x) (valB y)); intros C; apply sym_equal; unfold ValB in |- *; unfold Digit in |- *; auto. Qed. Remark correctness : forall (n : nat) (X Y : Num n) (o : order), Comparator n o X Y -> o = Specif (exp (base BASE) n) (Val_bound n X) (Val_bound n Y). Proof. (* Goal: forall (n : nat) (X Y : Num n) (o : order) (_ : Comparator n o X Y), @eq order o (Specif (exp (base BASE) n) (Val_bound n X) (Val_bound n Y)) *) unfold Comparator in |- *; unfold Specif in |- *. (* Goal: forall (n : nat) (X Y : Num n) (o : order) (_ : Connection n E X Y o), @eq order o (comparison (val_inf (exp (base BASE) n) (Val_bound n X)) (val_inf (exp (base BASE) n) (Val_bound n Y))) *) intros n X Y o H. (* Goal: @eq order o (comparison (val_inf (exp (base BASE) n) (Val_bound n X)) (val_inf (exp (base BASE) n) (Val_bound n Y))) *) rewrite (general_correct n X Y E o H). (* Goal: @eq order (f_circ n E X Y) (comparison (val_inf (exp (base BASE) n) (Val_bound n X)) (val_inf (exp (base BASE) n) (Val_bound n Y))) *) auto. Qed. End comparator.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrfun ssrbool eqtype ssrnat seq div choice fintype. From mathcomp Require Import tuple finfun bigop ssralg finalg zmodp matrix vector falgebra. From mathcomp Require Import poly polydiv mxpoly generic_quotient. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Local Open Scope ring_scope. Import GRing.Theory. Module FieldExt. Import GRing. Section FieldExt. Variable R : ringType. Record class_of T := Class { base : Falgebra.class_of R T; comm_ext : commutative (Ring.mul base); idomain_ext : IntegralDomain.axiom (Ring.Pack base); field_ext : Field.mixin_of (UnitRing.Pack base) }. Local Coercion base : class_of >-> Falgebra.class_of. Section Bases. Variables (T : Type) (c : class_of T). Definition base1 := ComRing.Class (@comm_ext T c). Definition base2 := @ComUnitRing.Class T base1 c. Definition base3 := @IntegralDomain.Class T base2 (@idomain_ext T c). Definition base4 := @Field.Class T base3 (@field_ext T c). End Bases. Local Coercion base1 : class_of >-> ComRing.class_of. Local Coercion base2 : class_of >-> ComUnitRing.class_of. Local Coercion base3 : class_of >-> IntegralDomain.class_of. Local Coercion base4 : class_of >-> Field.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 : Falgebra.type phR) b & phant_id (Falgebra.class bT : Falgebra.class_of R bT) (b : Falgebra.class_of R T) => fun mT Cm IDm Fm & phant_id (Field.class mT) (@Field.Class T (@IntegralDomain.Class T (@ComUnitRing.Class T (@ComRing.Class T b Cm) b) IDm) Fm) => Pack phR (@Class T b Cm IDm Fm). Definition pack_eta K := let cK := Field.class K in let Cm := ComRing.mixin cK in let IDm := IntegralDomain.mixin cK in let Fm := Field.mixin cK in fun (bT : Falgebra.type phR) b & phant_id (Falgebra.class bT) b => fun cT_ & phant_id (@Class T b) cT_ => @Pack phR T (cT_ Cm IDm Fm). Definition eqType := @Equality.Pack cT xclass. Definition choiceType := @Choice.Pack cT xclass. Definition zmodType := @Zmodule.Pack cT xclass. Definition ringType := @Ring.Pack cT xclass. Definition unitRingType := @UnitRing.Pack cT xclass. Definition comRingType := @ComRing.Pack cT xclass. Definition comUnitRingType := @ComUnitRing.Pack cT xclass. Definition idomainType := @IntegralDomain.Pack cT xclass. Definition fieldType := @Field.Pack cT xclass. Definition lmodType := @Lmodule.Pack R phR cT xclass. Definition lalgType := @Lalgebra.Pack R phR cT xclass. Definition algType := @Algebra.Pack R phR cT xclass. Definition unitAlgType := @UnitAlgebra.Pack R phR cT xclass. Definition vectType := @Vector.Pack R phR cT xclass. Definition FalgType := @Falgebra.Pack R phR cT xclass. Definition Falg_comRingType := @ComRing.Pack FalgType xclass. Definition Falg_comUnitRingType := @ComUnitRing.Pack FalgType xclass. Definition Falg_idomainType := @IntegralDomain.Pack FalgType xclass. Definition Falg_fieldType := @Field.Pack FalgType xclass. Definition vect_comRingType := @ComRing.Pack vectType xclass. Definition vect_comUnitRingType := @ComUnitRing.Pack vectType xclass. Definition vect_idomainType := @IntegralDomain.Pack vectType xclass. Definition vect_fieldType := @Field.Pack vectType xclass. Definition unitAlg_comRingType := @ComRing.Pack unitAlgType xclass. Definition unitAlg_comUnitRingType := @ComUnitRing.Pack unitAlgType xclass. Definition unitAlg_idomainType := @IntegralDomain.Pack unitAlgType xclass. Definition unitAlg_fieldType := @Field.Pack unitAlgType xclass. Definition alg_comRingType := @ComRing.Pack algType xclass. Definition alg_comUnitRingType := @ComUnitRing.Pack algType xclass. Definition alg_idomainType := @IntegralDomain.Pack algType xclass. Definition alg_fieldType := @Field.Pack algType xclass. Definition lalg_comRingType := @ComRing.Pack lalgType xclass. Definition lalg_comUnitRingType := @ComUnitRing.Pack lalgType xclass. Definition lalg_idomainType := @IntegralDomain.Pack lalgType xclass. Definition lalg_fieldType := @Field.Pack lalgType xclass. Definition lmod_comRingType := @ComRing.Pack lmodType xclass. Definition lmod_comUnitRingType := @ComUnitRing.Pack lmodType xclass. Definition lmod_idomainType := @IntegralDomain.Pack lmodType xclass. Definition lmod_fieldType := @Field.Pack lmodType xclass. End FieldExt. Module Exports. Coercion sort : type >-> Sortclass. Bind Scope ring_scope with sort. Coercion base : class_of >-> Falgebra.class_of. Coercion base4 : class_of >-> Field.class_of. Coercion eqType : type >-> Equality.type. Canonical eqType. Coercion choiceType : type >-> Choice.type. Canonical choiceType. Coercion zmodType : type >-> Zmodule.type. Canonical zmodType. Coercion ringType : type >-> Ring.type. Canonical ringType. Coercion unitRingType : type >-> UnitRing.type. Canonical unitRingType. Coercion comRingType : type >-> ComRing.type. Canonical comRingType. Coercion comUnitRingType : type >-> ComUnitRing.type. Canonical comUnitRingType. Coercion idomainType : type >-> IntegralDomain.type. Canonical idomainType. Coercion fieldType : type >-> Field.type. Canonical fieldType. Coercion lmodType : type >-> Lmodule.type. Canonical lmodType. Coercion lalgType : type >-> Lalgebra.type. Canonical lalgType. Coercion algType : type >-> Algebra.type. Canonical algType. Coercion unitAlgType : type >-> UnitAlgebra.type. Canonical unitAlgType. Coercion vectType : type >-> Vector.type. Canonical vectType. Coercion FalgType : type >-> Falgebra.type. Canonical FalgType. Canonical Falg_comRingType. Canonical Falg_comUnitRingType. Canonical Falg_idomainType. Canonical Falg_fieldType. Canonical vect_comRingType. Canonical vect_comUnitRingType. Canonical vect_idomainType. Canonical vect_fieldType. Canonical unitAlg_comRingType. Canonical unitAlg_comUnitRingType. Canonical unitAlg_idomainType. Canonical unitAlg_fieldType. Canonical alg_comRingType. Canonical alg_comUnitRingType. Canonical alg_idomainType. Canonical alg_fieldType. Canonical lalg_comRingType. Canonical lalg_comUnitRingType. Canonical lalg_idomainType. Canonical lalg_fieldType. Canonical lmod_comRingType. Canonical lmod_comUnitRingType. Canonical lmod_idomainType. Canonical lmod_fieldType. Notation fieldExtType R := (type (Phant R)). Notation "[ 'fieldExtType' F 'of' L ]" := (@pack _ (Phant F) L _ _ id _ _ _ _ id) (at level 0, format "[ 'fieldExtType' F 'of' L ]") : form_scope. Notation "[ 'fieldExtType' F 'of' L 'for' K ]" := (@pack_eta _ (Phant F) L K _ _ id _ id) (at level 0, format "[ 'fieldExtType' F 'of' L 'for' K ]") : form_scope. Notation "{ 'subfield' L }" := (@aspace_of _ (FalgType _) (Phant L)) (at level 0, format "{ 'subfield' L }") : type_scope. End Exports. End FieldExt. Export FieldExt.Exports. Canonical regular_fieldExtType (F : fieldType) := [fieldExtType F of F^o for F]. Section FieldExtTheory. Variables (F0 : fieldType) (L : fieldExtType F0). Implicit Types (U V M : {vspace L}) (E F K : {subfield L}). Lemma dim_cosetv U x : x != 0 -> \dim (U * <[x]>) = \dim U. Proof. (* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) x (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))), @eq nat (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x))) (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U) *) move=> nz_x; rewrite -limg_amulr limg_dim_eq //. (* Goal: @eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@capv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) U (@lker F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@amulr F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x))) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) *) apply/eqP; rewrite -subv0; apply/subvP=> y. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) y (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@capv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) U (@lker F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@amulr F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))))), is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) y (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))))) *) by rewrite memv_cap memv0 memv_ker lfunE mulf_eq0 (negPf nz_x) orbF => /andP[]. Qed. Lemma prodvC : commutative (@prodv F0 L). Proof. (* Goal: @commutative (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) *) move=> U V; without loss suffices subC: U V / (U * V <= V * U)%VS. (* Goal: is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U V) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V U)) *) (* Goal: @eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U V) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V U) *) by apply/eqP; rewrite eqEsubv !{1}subC. (* Goal: is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U V) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V U)) *) by apply/prodvP=> x y Ux Vy; rewrite mulrC memv_mul. Qed. Canonical prodv_comoid := Monoid.ComLaw prodvC. Lemma prodvCA : left_commutative (@prodv F0 L). Proof. (* Goal: @left_commutative (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) *) exact: Monoid.mulmCA. Qed. Lemma prodvAC : right_commutative (@prodv F0 L). Proof. (* Goal: @right_commutative (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) *) exact: Monoid.mulmAC. Qed. Lemma mem1v K : 1 \in K. Proof. by rewrite -algid_eq1 algid1. Qed. Proof. (* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))) *) by rewrite -algid_eq1 algid1. Qed. Lemma subfield_closed K : agenv K = K. Proof. (* Goal: @eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) *) by apply/eqP; rewrite eqEsubv sub_agenv agenv_sub_modr ?sub1v ?asubv. Qed. Lemma AHom_lker0 (rT : FalgType F0) (f : 'AHom(L, rT)) : lker f == 0%VS. Proof. (* Goal: is_true (@eq_op (@space_eqType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@lker F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rT) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) rT f)) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) by apply/lker0P; apply: fmorph_inj. Qed. Fact aimg_is_aspace (rT : FalgType F0) (f : 'AHom(L, rT)) (E : {subfield L}) : is_aspace (f @: E). Proof. (* Goal: is_true (@is_aspace F0 rT (@lfun_img F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rT) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) rT f) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) *) rewrite /is_aspace -aimgM limgS ?prodv_id // has_algid1 //. (* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rT)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rT)) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rT)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rT))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rT) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rT)) (@lfun_img F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rT) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) rT f) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))))) *) by apply/memv_imgP; exists 1; rewrite ?mem1v ?rmorph1. Qed. Canonical aimg_aspace rT f E := ASpace (@aimg_is_aspace rT f E). Lemma Fadjoin_idP {K x} : reflect (<<K; x>>%VS = K) (x \in K). Proof. (* Goal: Bool.reflect (@eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))) *) apply: (iffP idP) => [/addv_idPl-> | <-]; first exact: subfield_closed. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x)))))) *) exact: memv_adjoin. Qed. Lemma Fadjoin0 K : <<K; 0>>%VS = K. Proof. (* Goal: @eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) *) by rewrite addv0 subfield_closed. Qed. Lemma Fadjoin_nil K : <<K & [::]>>%VS = K. Proof. (* Goal: @eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@span F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nil (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) *) by rewrite adjoin_nil subfield_closed. Qed. Lemma FadjoinP {K x E} : reflect (K <= E /\ x \in E)%VS (<<K; x>>%AS <= E)%VS. Proof. (* Goal: Bool.reflect (and (is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) (is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)))))) (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@agenv_aspace F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x)))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) *) apply: (iffP idP) => [sKxE | /andP]. (* Goal: forall _ : is_true (andb (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))))), is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@agenv_aspace F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x)))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) *) (* Goal: and (is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) (is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))))) *) by rewrite (subvP sKxE) ?memv_adjoin // (subv_trans _ sKxE) ?subv_adjoin. (* Goal: forall _ : is_true (andb (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))))), is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@agenv_aspace F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x)))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) *) by rewrite -subv_add => /agenvS; rewrite subfield_closed. Qed. Lemma Fadjoin_seqP {K} {rs : seq L} {E} : reflect (K <= E /\ {subset rs <= E})%VS (<<K & rs>> <= E)%VS. Proof. (* Goal: Bool.reflect (and (is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) (@sub_mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (seq_predType (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) rs) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))))) (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) rs))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) *) apply: (iffP idP) => [sKrsE | [sKE /span_subvP/(conj sKE)/andP]]. (* Goal: forall _ : is_true (andb (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) (@subsetv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) rs) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))), is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) rs))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) *) (* Goal: and (is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) (@sub_mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (seq_predType (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) rs) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)))) *) split=> [|x rs_x]; first exact: subv_trans (subv_adjoin_seq _ _) sKrsE. (* Goal: forall _ : is_true (andb (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) (@subsetv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) rs) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))), is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) rs))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) *) (* Goal: is_true (@in_mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)))) *) by rewrite (subvP sKrsE) ?seqv_sub_adjoin. (* Goal: forall _ : is_true (andb (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) (@subsetv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) rs) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))), is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) rs))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) *) by rewrite -subv_add => /agenvS; rewrite subfield_closed. Qed. Lemma alg_polyOver E p : map_poly (in_alg L) p \is a polyOver E. Proof. (* Goal: is_true (@in_mem (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L))))) (@map_poly (GRing.Field.ringType F0) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@GRing.in_alg_head (GRing.Field.ringType F0) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) p) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)))))) *) by apply/(polyOverS (subvP (sub1v _)))/polyOver1P; exists p. Qed. Lemma sub_adjoin1v x E : (<<1; x>> <= E)%VS = (x \in E)%VS. Proof. (* Goal: @eq bool (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)))) *) by rewrite (sameP FadjoinP andP) sub1v. Qed. Fact vsval_multiplicative K : multiplicative (vsval : subvs_of K -> L). Proof. (* Goal: @GRing.RMorphism.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@vsval F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) : forall _ : @subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K), @FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) *) by split => //=; apply: algid1. Qed. Canonical vsval_rmorphism K := AddRMorphism (vsval_multiplicative K). Canonical vsval_lrmorphism K : {lrmorphism subvs_of K -> L} := [lrmorphism of vsval]. Lemma vsval_invf K (w : subvs_of K) : val w^-1 = (vsval w)^-1. Proof. (* Goal: @eq (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@val (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun x : @Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => @in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))) (@subvs_subType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) (@GRing.inv (@subvs_unitRingType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) w)) (@GRing.inv (@Falgebra.vect_unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vsval F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) w)) *) have [-> | Uv] := eqVneq w 0; first by rewrite !invr0. (* Goal: @eq (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@val (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun x : @Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => @in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))) (@subvs_subType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) (@GRing.inv (@subvs_unitRingType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) w)) (@GRing.inv (@Falgebra.vect_unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vsval F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) w)) *) by apply: vsval_invr; rewrite unitfE. Qed. Fact aspace_divr_closed K : divr_closed K. Proof. (* Goal: @GRing.divr_closed (@Falgebra.vect_unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) *) by split=> [|u v Ku Kv]; rewrite ?mem1v ?memvM ?memvV. Qed. Canonical aspace_mulrPred K := MulrPred (aspace_divr_closed K). Canonical aspace_divrPred K := DivrPred (aspace_divr_closed K). Canonical aspace_smulrPred K := SmulrPred (aspace_divr_closed K). Canonical aspace_sdivrPred K := SdivrPred (aspace_divr_closed K). Canonical aspace_semiringPred K := SemiringPred (aspace_divr_closed K). Canonical aspace_subringPred K := SubringPred (aspace_divr_closed K). Canonical aspace_subalgPred K := SubalgPred (memv_submod_closed K). Canonical aspace_divringPred K := DivringPred (aspace_divr_closed K). Canonical aspace_divalgPred K := DivalgPred (memv_submod_closed K). Definition subvs_mulC K := [comRingMixin of subvs_of K by <:]. Canonical subvs_comRingType K := Eval hnf in ComRingType (subvs_of K) (@subvs_mulC K). Canonical subvs_comUnitRingType K := Eval hnf in [comUnitRingType of subvs_of K]. Definition subvs_mul_eq0 K := [idomainMixin of subvs_of K by <:]. Canonical subvs_idomainType K := Eval hnf in IdomainType (subvs_of K) (@subvs_mul_eq0 K). Lemma subvs_fieldMixin K : GRing.Field.mixin_of (@subvs_idomainType K). Proof. (* Goal: GRing.Field.mixin_of (GRing.IntegralDomain.unitRingType (subvs_idomainType K)) *) by move=> w nz_w; rewrite unitrE -val_eqE /= vsval_invf algid1 divff. Qed. Canonical subvs_fieldType K := Eval hnf in FieldType (subvs_of K) (@subvs_fieldMixin K). Canonical subvs_fieldExtType K := Eval hnf in [fieldExtType F0 of subvs_of K]. Lemma polyOver_subvs {K} {p : {poly L}} : reflect (exists q : {poly subvs_of K}, p = map_poly vsval q) (p \is a polyOver K). Proof. (* Goal: Bool.reflect (@ex (@poly_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (Phant (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))) (fun q : @poly_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (Phant (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) p (@map_poly (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vsval F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) q))) (@in_mem (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))))) *) apply: (iffP polyOverP) => [Hp | [q ->] i]; last by rewrite coef_map // subvsP. (* Goal: @ex (@poly_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (Phant (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))) (fun q : @poly_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (Phant (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) p (@map_poly (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vsval F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) q)) *) exists (\poly_(i < size p) (Subvs (Hp i))); rewrite -{1}[p]coefK. (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@poly (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@size (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p)) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p) i)) (@map_poly (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vsval F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) (@poly (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@size (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p)) (fun i : nat => @Subvs F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p) i) (Hp i)))) *) by apply/polyP=> i; rewrite coef_map !coef_poly; case: ifP. Qed. Lemma divp_polyOver K : {in polyOver K &, forall p q, p %/ q \is a polyOver K}. Proof. (* Goal: @prop_in2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))) (fun p q : @poly_of (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.IntegralDomain.sort (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) => is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))))) (Pdiv.Field.divp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p q) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (inPhantom (forall p q : @poly_of (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.IntegralDomain.sort (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))), is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))))) (Pdiv.Field.divp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p q) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))))))) *) move=> _ _ /polyOver_subvs[p ->] /polyOver_subvs[q ->]. (* Goal: is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))))) (Pdiv.Field.divp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@map_poly (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vsval F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) p) (@map_poly (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vsval F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) q)) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))))) *) by apply/polyOver_subvs; exists (p %/ q); rewrite map_divp. Qed. Lemma modp_polyOver K : {in polyOver K &, forall p q, p %% q \is a polyOver K}. Proof. (* Goal: @prop_in2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))) (fun p q : @poly_of (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.IntegralDomain.sort (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) => is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))))) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p q) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (inPhantom (forall p q : @poly_of (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.IntegralDomain.sort (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))), is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))))) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p q) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))))))) *) move=> _ _ /polyOver_subvs[p ->] /polyOver_subvs[q ->]. (* Goal: is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))))) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@map_poly (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vsval F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) p) (@map_poly (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vsval F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) q)) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))))) *) by apply/polyOver_subvs; exists (p %% q); rewrite map_modp. Qed. Lemma gcdp_polyOver K : {in polyOver K &, forall p q, gcdp p q \is a polyOver K}. Proof. (* Goal: @prop_in2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))) (fun p q : @poly_of (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.IntegralDomain.sort (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) => is_true (@in_mem (@poly_of (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.IntegralDomain.sort (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (gcdp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p q) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (inPhantom (forall p q : @poly_of (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.IntegralDomain.sort (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))), is_true (@in_mem (@poly_of (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.IntegralDomain.sort (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (gcdp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p q) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))))))) *) move=> _ _ /polyOver_subvs[p ->] /polyOver_subvs[q ->]. (* Goal: is_true (@in_mem (@poly_of (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.IntegralDomain.sort (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (gcdp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@map_poly (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vsval F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) p) (@map_poly (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vsval F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) q)) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))))) *) by apply/polyOver_subvs; exists (gcdp p q); rewrite gcdp_map. Qed. Fact prodv_is_aspace E F : is_aspace (E * F). Proof. (* Goal: is_true (@is_aspace F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) *) rewrite /is_aspace prodvCA -!prodvA prodvA !prodv_id has_algid1 //=. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))))) *) by rewrite -[1]mulr1 memv_mul ?mem1v. Qed. Canonical capv_aspace E F : {subfield L} := aspace_cap (field_mem_algid E F). Lemma polyOverSv U V : (U <= V)%VS -> {subset polyOver U <= polyOver V}. Proof. (* Goal: forall _ : is_true (@subsetv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U V), @sub_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) U)))) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) *) by move/subvP=> sUV; apply: polyOverS. Qed. Lemma field_subvMl F U : (U <= F * U)%VS. Proof. (* Goal: is_true (@subsetv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) U)) *) by rewrite -{1}[U]prod1v prodvSl ?sub1v. Qed. Lemma field_subvMr U F : (U <= U * F)%VS. Proof. (* Goal: is_true (@subsetv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) *) by rewrite prodvC field_subvMl. Qed. Lemma field_module_eq F M : (F * M <= M)%VS -> (F * M)%VS = M. Proof. (* Goal: forall _ : is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) M) M), @eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) M) M *) by move=> modM; apply/eqP; rewrite eqEsubv modM field_subvMl. Qed. Lemma sup_field_module F E : (F * E <= E)%VS = (F <= E)%VS. Lemma field_module_dimS F M : (F * M <= M)%VS -> (\dim F %| \dim M)%N. Proof. (* Goal: forall _ : is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) M) M), is_true (dvdn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M)) *) exact/skew_field_module_dimS/fieldP. Qed. Lemma field_dimS F E : (F <= E)%VS -> (\dim F %| \dim E)%N. Proof. (* Goal: forall _ : is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)), is_true (dvdn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) *) exact/skew_field_dimS/fieldP. Qed. Lemma dim_field_module F M : (F * M <= M)%VS -> \dim M = (\dim_F M * \dim F)%N. Proof. (* Goal: forall _ : is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) M) M), @eq nat (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (muln (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) *) by move/field_module_dimS/divnK. Qed. Lemma dim_sup_field F E : (F <= E)%VS -> \dim E = (\dim_F E * \dim F)%N. Proof. (* Goal: forall _ : is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)), @eq nat (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) (muln (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) *) by move/field_dimS/divnK. Qed. Lemma field_module_semisimple F M (m := \dim_F M) : (F * M <= M)%VS -> {X : m.-tuple L | {subset X <= M} /\ 0 \notin X Proof. (* Goal: forall _ : is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) M) M), @sig2 (tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => and (@sub_mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) M))) (is_true (negb (@in_mem (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X))))) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => let FX := @BigOp.bigop (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (Finite.sort (ordinal_finType m)) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (ordinal m) i (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))) in and (@eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX M) (is_true (@directv_def F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@proper_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nary_addv_expr F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.sort (ordinal_finType m)) (index_enum (ordinal_finType m)) (fun _ : ordinal m => true) (fun i : ordinal m => @trivial_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))))) (Phantom (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX)))) *) move=> modM; have dimM: (m * \dim F)%N = \dim M by rewrite -dim_field_module. (* Goal: @sig2 (tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => and (@sub_mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) M))) (is_true (negb (@in_mem (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X))))) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => let FX := @BigOp.bigop (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (Finite.sort (ordinal_finType m)) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (ordinal m) i (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))) in and (@eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX M) (is_true (@directv_def F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@proper_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nary_addv_expr F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.sort (ordinal_finType m)) (index_enum (ordinal_finType m)) (fun _ : ordinal m => true) (fun i : ordinal m => @trivial_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))))) (Phantom (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX)))) *) have [X [defM dxFX nzX]] := skew_field_module_semisimple (@fieldP L) modM. (* Goal: @sig2 (tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => and (@sub_mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) M))) (is_true (negb (@in_mem (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X))))) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => let FX := @BigOp.bigop (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (Finite.sort (ordinal_finType m)) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (ordinal m) i (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))) in and (@eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX M) (is_true (@directv_def F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@proper_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nary_addv_expr F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.sort (ordinal_finType m)) (index_enum (ordinal_finType m)) (fun _ : ordinal m => true) (fun i : ordinal m => @trivial_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))))) (Phantom (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX)))) *) have szX: size X == m. (* Goal: @sig2 (tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => and (@sub_mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) M))) (is_true (negb (@in_mem (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X))))) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => let FX := @BigOp.bigop (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (Finite.sort (ordinal_finType m)) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (ordinal m) i (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))) in and (@eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX M) (is_true (@directv_def F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@proper_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nary_addv_expr F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.sort (ordinal_finType m)) (index_enum (ordinal_finType m)) (fun _ : ordinal m => true) (fun i : ordinal m => @trivial_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))))) (Phantom (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX)))) *) (* Goal: is_true (@eq_op nat_eqType (@size (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) X) m) *) rewrite -(eqn_pmul2r (adim_gt0 F)) dimM -defM (directvP dxFX) /=. (* Goal: @sig2 (tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => and (@sub_mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) M))) (is_true (negb (@in_mem (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X))))) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => let FX := @BigOp.bigop (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (Finite.sort (ordinal_finType m)) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (ordinal m) i (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))) in and (@eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX M) (is_true (@directv_def F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@proper_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nary_addv_expr F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.sort (ordinal_finType m)) (index_enum (ordinal_finType m)) (fun _ : ordinal m => true) (fun i : ordinal m => @trivial_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))))) (Phantom (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX)))) *) (* Goal: is_true (@eq_op nat_eqType (muln (@size (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@BigOp.bigop nat (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) O X (fun i : @FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L => @BigBody nat (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) i addn true (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) i)))))) *) rewrite -sum1_size big_distrl; apply/eqP/eq_big_seq => x Xx /=. (* Goal: @sig2 (tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => and (@sub_mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) M))) (is_true (negb (@in_mem (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X))))) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => let FX := @BigOp.bigop (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (Finite.sort (ordinal_finType m)) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (ordinal m) i (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))) in and (@eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX M) (is_true (@directv_def F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@proper_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nary_addv_expr F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.sort (ordinal_finType m)) (index_enum (ordinal_finType m)) (fun _ : ordinal m => true) (fun i : ordinal m => @trivial_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))))) (Phantom (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX)))) *) (* Goal: @eq nat (muln (S O) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x))) *) by rewrite mul1n dim_cosetv ?(memPn nzX). (* Goal: @sig2 (tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => and (@sub_mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) M))) (is_true (negb (@in_mem (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X))))) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => let FX := @BigOp.bigop (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (Finite.sort (ordinal_finType m)) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (ordinal m) i (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))) in and (@eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX M) (is_true (@directv_def F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@proper_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nary_addv_expr F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.sort (ordinal_finType m)) (index_enum (ordinal_finType m)) (fun _ : ordinal m => true) (fun i : ordinal m => @trivial_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))))) (Phantom (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX)))) *) rewrite directvE /= !(big_nth 0) (eqP szX) !big_mkord -directvE /= in defM dxFX. (* Goal: @sig2 (tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => and (@sub_mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) M))) (is_true (negb (@in_mem (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType m (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X))))) (fun X : tuple_of m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) => let FX := @BigOp.bigop (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (Finite.sort (ordinal_finType m)) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (ordinal m) i (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))) in and (@eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX M) (is_true (@directv_def F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@proper_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nary_addv_expr F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.sort (ordinal_finType m)) (index_enum (ordinal_finType m)) (fun _ : ordinal m => true) (fun i : ordinal m => @trivial_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval m (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) X) (@nat_of_ord m i))))))) (Phantom (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX)))) *) exists (Tuple szX) => //; split=> // _ /tnthP[i ->]; rewrite (tnth_nth 0) /=. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) X (@nat_of_ord m i)) (@mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) M))) *) by rewrite -defM memvE (sumv_sup i) ?field_subvMl. Qed. Section FadjoinPolyDefinitions. Variables (U : {vspace L}) (x : L). Definition adjoin_degree := (\dim_U <<U; x>>).-1.+1. Local Notation n := adjoin_degree. Definition Fadjoin_sum := (\sum_(i < n) U * <[x ^+ i]>)%VS. Definition Fadjoin_poly v : {poly L} := \poly_(i < n) (sumv_pi Fadjoin_sum (inord i) v / x ^+ i). Definition minPoly : {poly L} := 'X^n - Fadjoin_poly (x ^+ n). Lemma size_Fadjoin_poly v : size (Fadjoin_poly v) <= n. Proof. (* Goal: is_true (leq (@size (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Fadjoin_poly v))) adjoin_degree) *) exact: size_poly. Qed. Lemma Fadjoin_polyOver v : Fadjoin_poly v \is a polyOver U. Proof. (* Goal: is_true (@in_mem (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Fadjoin_poly v) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) U))))) *) apply/(all_nthP 0) => i _; rewrite coef_poly /=. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (if leq (S i) adjoin_degree then @GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@sumv_pi_for F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.eqType (ordinal_finType adjoin_degree)) (index_enum (ordinal_finType adjoin_degree)) (fun _ : ordinal adjoin_degree => true) (fun i : ordinal adjoin_degree => @prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord adjoin_degree i)))) Fadjoin_sum (@Logic.eq_refl (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) Fadjoin_sum) (@inord (Nat.pred (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U))) i)) v) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x i)) else GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) U))) *) case: ifP => lti; last exact: mem0v. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@sumv_pi_for F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.eqType (ordinal_finType adjoin_degree)) (index_enum (ordinal_finType adjoin_degree)) (fun _ : ordinal adjoin_degree => true) (fun i : ordinal adjoin_degree => @prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord adjoin_degree i)))) Fadjoin_sum (@Logic.eq_refl (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) Fadjoin_sum) (@inord (Nat.pred (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U))) i)) v) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x i))) (@mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) U))) *) have /memv_cosetP[y Uy ->] := memv_sum_pi (erefl Fadjoin_sum) (inord i) v. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) y (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord adjoin_degree (@inord (Nat.pred (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U))) i)))) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x i))) (@mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) U))) *) rewrite inordK //; have [-> | /mulfK-> //] := eqVneq (x ^+ i) 0. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) y (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) U))) *) by rewrite mulr0 mul0r mem0v. Qed. Fact Fadjoin_poly_is_linear : linear_for (in_alg L \; *:%R) Fadjoin_poly. Proof. (* Goal: @GRing.Linear.axiom (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@catcomp (forall _ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@GRing.Lmodule.base (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@GRing.Lmodule.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@GRing.Lmodule.class (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@GRing.Lmodule.base (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@GRing.Lmodule.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@GRing.Lmodule.class (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L))))))) (@GRing.Lalgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (GRing.Ring.sort (GRing.Field.ringType F0)) tt (@GRing.in_alg_head (GRing.Field.ringType F0) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.scale (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L))))) Fadjoin_poly (@GRing.Scale.comp_law (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.scale (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@GRing.Scale.scale_law (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (GRing.Field.ringType F0) (@GRing.in_alg_rmorphism (GRing.Field.ringType F0) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L))) (@Logic.eq_refl (forall (_ : GRing.Ring.sort (GRing.Field.ringType F0)) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@GRing.Lmodule.base (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@GRing.Lmodule.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@GRing.Lmodule.class (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L))))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@GRing.Lmodule.base (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@GRing.Lmodule.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@GRing.Lmodule.class (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L))))))) (@catcomp (forall _ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@GRing.Lmodule.base (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@GRing.Lmodule.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@GRing.Lmodule.class (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@GRing.Lmodule.base (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@GRing.Lmodule.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@GRing.Lmodule.class (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L))))))) (@GRing.Lalgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (GRing.Ring.sort (GRing.Field.ringType F0)) tt (@GRing.in_alg_head (GRing.Field.ringType F0) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.scale (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (poly_lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))))) *) move=> a u v; apply/polyP=> i; rewrite coefD coefZ !coef_poly. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (if leq (S i) adjoin_degree then @GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@sumv_pi_for F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.eqType (ordinal_finType adjoin_degree)) (index_enum (ordinal_finType adjoin_degree)) (fun _ : ordinal adjoin_degree => true) (fun i : ordinal adjoin_degree => @prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord adjoin_degree i)))) Fadjoin_sum (@Logic.eq_refl (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) Fadjoin_sum) (@inord (Nat.pred (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U))) i)) (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) a u) v)) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x i)) else GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.in_alg_head (GRing.Field.ringType F0) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) a) (if leq (S i) adjoin_degree then @GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@sumv_pi_for F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.eqType (ordinal_finType adjoin_degree)) (index_enum (ordinal_finType adjoin_degree)) (fun _ : ordinal adjoin_degree => true) (fun i : ordinal adjoin_degree => @prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord adjoin_degree i)))) Fadjoin_sum (@Logic.eq_refl (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) Fadjoin_sum) (@inord (Nat.pred (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U))) i)) u) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x i)) else GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (if leq (S i) adjoin_degree then @GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@sumv_pi_for F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.eqType (ordinal_finType adjoin_degree)) (index_enum (ordinal_finType adjoin_degree)) (fun _ : ordinal adjoin_degree => true) (fun i : ordinal adjoin_degree => @prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord adjoin_degree i)))) Fadjoin_sum (@Logic.eq_refl (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) Fadjoin_sum) (@inord (Nat.pred (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U))) i)) v) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x i)) else GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) *) case: ifP => lti; last by rewrite mulr0 addr0. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@sumv_pi_for F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.eqType (ordinal_finType adjoin_degree)) (index_enum (ordinal_finType adjoin_degree)) (fun _ : ordinal adjoin_degree => true) (fun i : ordinal adjoin_degree => @prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord adjoin_degree i)))) Fadjoin_sum (@Logic.eq_refl (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) Fadjoin_sum) (@inord (Nat.pred (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U))) i)) (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) a u) v)) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x i))) (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.in_alg_head (GRing.Field.ringType F0) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) a) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@sumv_pi_for F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.eqType (ordinal_finType adjoin_degree)) (index_enum (ordinal_finType adjoin_degree)) (fun _ : ordinal adjoin_degree => true) (fun i : ordinal adjoin_degree => @prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord adjoin_degree i)))) Fadjoin_sum (@Logic.eq_refl (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) Fadjoin_sum) (@inord (Nat.pred (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U))) i)) u) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x i)))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@sumv_pi_for F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.eqType (ordinal_finType adjoin_degree)) (index_enum (ordinal_finType adjoin_degree)) (fun _ : ordinal adjoin_degree => true) (fun i : ordinal adjoin_degree => @prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord adjoin_degree i)))) Fadjoin_sum (@Logic.eq_refl (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) Fadjoin_sum) (@inord (Nat.pred (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) U))) i)) v) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x i)))) *) by rewrite linearP mulrA -mulrDl mulr_algl. Qed. Canonical Fadjoin_poly_additive := Additive Fadjoin_poly_is_linear. Canonical Fadjoin_poly_linear := AddLinear Fadjoin_poly_is_linear. Lemma size_minPoly : size minPoly = n.+1. Proof. (* Goal: @eq nat (@size (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) minPoly)) (S adjoin_degree) *) by rewrite size_addl ?size_polyXn // size_opp ltnS size_poly. Qed. Lemma monic_minPoly : minPoly \is monic. Proof. (* Goal: is_true (@in_mem (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) minPoly (@mem (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (predPredType (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@has_quality O (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@monic (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) *) rewrite monicE /lead_coef size_minPoly coefB coefXn eqxx. (* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.natmul (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (nat_of_bool true)) (@GRing.opp (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Fadjoin_poly (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x adjoin_degree))) (Nat.pred (S adjoin_degree))))) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) *) by rewrite nth_default ?subr0 ?size_poly. Qed. End FadjoinPolyDefinitions. Section FadjoinPoly. Variables (K : {subfield L}) (x : L). Local Notation n := (adjoin_degree (asval K) x). Local Notation sumKx := (Fadjoin_sum (asval K) x). Lemma adjoin_degreeE : n = \dim_K <<K; x>>. Proof. (* Goal: @eq nat (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))) *) by rewrite [n]prednK // divn_gt0 ?adim_gt0 // dimvS ?subv_adjoin. Qed. Lemma dim_Fadjoin : \dim <<K; x>> = (n * \dim K)%N. Proof. (* Goal: @eq nat (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (muln (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))) *) by rewrite adjoin_degreeE -dim_sup_field ?subv_adjoin. Qed. Lemma adjoin0_deg : adjoin_degree K 0 = 1%N. Proof. (* Goal: @eq nat (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (S O) *) by rewrite /adjoin_degree addv0 subfield_closed divnn adim_gt0. Qed. Lemma adjoin_deg_eq1 : (n == 1%N) = (x \in K). Proof. (* Goal: @eq bool (@eq_op nat_eqType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) (S O)) (@in_mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))) *) rewrite (sameP Fadjoin_idP eqP) adjoin_degreeE; have sK_Kx := subv_adjoin K x. (* Goal: @eq bool (@eq_op nat_eqType (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))) (S O)) (@eq_op (@space_eqType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) *) apply/eqP/idP=> [dimKx1 | /eqP->]; last by rewrite divnn adim_gt0. (* Goal: is_true (@eq_op (@space_eqType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) *) by rewrite eq_sym eqEdim sK_Kx /= (dim_sup_field sK_Kx) dimKx1 mul1n. Qed. Lemma Fadjoin_sum_direct : directv sumKx. Let nz_x_i (i : 'I_n) : x ^+ i != 0. Proof. (* Goal: is_true (negb (@eq_op (GRing.Ring.eqType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i)) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) *) by rewrite expf_eq0; case: eqP i => [->|_] [[]] //; rewrite adjoin0_deg. Qed. Lemma Fadjoin_eq_sum : <<K; x>>%VS = sumKx. Proof. (* Goal: @eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x))) (Fadjoin_sum (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) *) apply/esym/eqP; rewrite eqEdim eq_leq ?andbT. (* Goal: @eq nat (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Fadjoin_sum (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) *) (* Goal: is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Fadjoin_sum (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) *) apply/subv_sumP=> i _; rewrite -agenvM prodvS ?subv_adjoin //. (* Goal: @eq nat (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Fadjoin_sum (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) *) (* Goal: is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) *) by rewrite -expv_line (subv_trans (subX_agenv _ _)) ?agenvS ?addvSr. (* Goal: @eq nat (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Fadjoin_sum (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) *) rewrite dim_Fadjoin -[n]card_ord -sum_nat_const (directvP Fadjoin_sum_direct). (* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) O (index_enum (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (fun i : Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) => @BigBody nat (Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) i addn (@in_mem (Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) i (@mem (Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (predPredType (Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)))) (@sort_of_simpl_pred (ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) (pred_of_argType (ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)))))) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))) (@proper_addv_dim F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nary_addv_expr F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (index_enum (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (fun _ : ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) => true) (fun i : ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) => @trivial_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i))))))) *) by apply: eq_bigr => i _; rewrite /= dim_cosetv. Qed. Lemma Fadjoin_poly_eq v : v \in <<K; x>>%VS -> (Fadjoin_poly K x v).[x] = v. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) v (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@horner (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Fadjoin_poly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x v) x) v *) move/(sumv_pi_sum Fadjoin_eq_sum)=> {2}<-; rewrite horner_poly. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (index_enum (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (fun i : ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) i (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@sumv_pi_for F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.eqType (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (index_enum (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (fun _ : ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) => true) (fun i0 : ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) => @prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i0)))) (Fadjoin_sum (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) (@Logic.eq_refl (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (Fadjoin_sum (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) (@inord (Nat.pred (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))) (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i))) v) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i)))) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i))))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (index_enum (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (fun i : Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) => @BigBody (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) i (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) true (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@sumv_pi_for F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.eqType (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (index_enum (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (fun _ : ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) => true) (fun i0 : ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) => @prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i0)))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x))) Fadjoin_eq_sum i) v))) *) by apply: eq_bigr => i _; rewrite inord_val mulfVK. Qed. Lemma mempx_Fadjoin p : p \is a polyOver K -> p.[x] \in <<K; x>>%VS. Proof. (* Goal: forall _ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))))), is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p x) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))))) *) move=> Kp; rewrite rpred_horner ?memv_adjoin ?(polyOverS _ Kp) //. (* Goal: @sub_mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))) (@mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@agenv_aspace F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x))))) (@GRing.Pred.add_key (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@agenv_aspace F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x))))) (@GRing.Pred.semiring_add (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@agenv_aspace F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x))))) (aspace_semiringPred (@agenv_aspace F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))))) (@vspace_keyed F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@agenv_aspace F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x))))))) *) exact: subvP_adjoin. Qed. Lemma Fadjoin_polyP {v} : reflect (exists2 p, p \in polyOver K & v = p.[x]) (v \in <<K; x>>%VS). Proof. (* Goal: Bool.reflect (@ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) v (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p x))) (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) v (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))))) *) apply: (iffP idP) => [Kx_v | [p Kp ->]]; last exact: mempx_Fadjoin. (* Goal: @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) v (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p x)) *) by exists (Fadjoin_poly K x v); rewrite ?Fadjoin_polyOver ?Fadjoin_poly_eq. Qed. Lemma Fadjoin_poly_unique p v : p \is a polyOver K -> size p <= n -> p.[x] = v -> Fadjoin_poly K x v = p. Proof. (* Goal: forall (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (_ : is_true (leq (@size (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p)) (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (_ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p x) v), @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Fadjoin_poly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x v) p *) have polyKx q i: q \is a polyOver K -> q`_i * x ^+ i \in (K * <[x ^+ i]>)%VS. (* Goal: forall (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (_ : is_true (leq (@size (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p)) (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (_ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p x) v), @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Fadjoin_poly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x v) p *) (* Goal: forall _ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) q (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))))), is_true (@in_mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) q) i) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x i)) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x i)))))) *) by move/polyOverP=> Kq; rewrite memv_mul ?Kq ?memv_line. (* Goal: forall (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (_ : is_true (leq (@size (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p)) (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (_ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p x) v), @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Fadjoin_poly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x v) p *) move=> Kp szp Dv; have /Fadjoin_poly_eq/eqP := mempx_Fadjoin Kp. (* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@horner (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Fadjoin_poly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p x)) x) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p x)), @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Fadjoin_poly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x v) p *) rewrite {1}Dv {Dv} !(@horner_coef_wide _ n) ?size_poly //. (* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (index_enum (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (fun i : ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) i (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Fadjoin_poly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x v)) (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (index_enum (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (fun i : ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) i (@GRing.add (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) true (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p) (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i)) (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i)))))), @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Fadjoin_poly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x v) p *) move/polyKx in Kp; have /polyKx K_pv := Fadjoin_polyOver K x v. (* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (index_enum (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (fun i : ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) i (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Fadjoin_poly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x v)) (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Finite.sort (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (index_enum (ordinal_finType (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (fun i : ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (ordinal (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) i (@GRing.add (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) true (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p) (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i)) (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x (@nat_of_ord (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) i)))))), @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Fadjoin_poly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x v) p *) rewrite (directv_sum_unique Fadjoin_sum_direct) // => /eqfunP eq_pq. (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Fadjoin_poly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x v) p *) apply/polyP=> i; have [leni|?] := leqP n i; last exact: mulIf (eq_pq (Sub i _)). (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Fadjoin_poly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x v)) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p) i) *) by rewrite !nth_default ?(leq_trans _ leni) ?size_poly. Qed. Lemma Fadjoin_polyC v : v \in K -> Fadjoin_poly K x v = v%:P. Lemma Fadjoin_polyX : x \notin K -> Fadjoin_poly K x x = 'X. Lemma minPolyOver : minPoly K x \is a polyOver K. Proof. (* Goal: is_true (@in_mem (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))))) *) by rewrite /minPoly rpredB ?rpredX ?polyOverX ?Fadjoin_polyOver. Qed. Lemma minPolyxx : (minPoly K x).[x] = 0. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@horner (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) x) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) *) by rewrite !hornerE hornerXn Fadjoin_poly_eq ?subrr ?rpredX ?memv_adjoin. Qed. Lemma Fadjoin_poly_mod p : p \is a polyOver K -> Fadjoin_poly K x p.[x] = p %% minPoly K x. Lemma minPoly_XsubC : reflect (minPoly K x = 'X - x%:P) (x \in K). Proof. (* Goal: Bool.reflect (@eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) (@GRing.add (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (polyX (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.opp (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@polyC (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@in_mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))) *) set p := minPoly K x; apply: (iffP idP) => [Kx | Dp]; last first. (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) p (@GRing.add (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (polyX (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.opp (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@polyC (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x))) *) (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))) *) suffices ->: x = - p`_0 by rewrite rpredN (polyOverP minPolyOver). (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) p (@GRing.add (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (polyX (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.opp (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@polyC (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x))) *) (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@GRing.opp (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p) O)) *) by rewrite Dp coefB coefX coefC add0r opprK. (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) p (@GRing.add (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (polyX (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.opp (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@polyC (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x))) *) rewrite (@all_roots_prod_XsubC _ p [:: x]) /= ?root_minPoly //. (* Goal: @eq nat (@size (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@polyseq (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p)) (S (S O)) *) (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.scale (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.Lalgebra.lmod_ringType (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (poly_lalgType (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@lead_coef (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p) (@BigOp.bigop (@poly_of (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (GRing.one (poly_ringType (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@cons (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@nil (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun z : @FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L => @BigBody (@poly_of (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (polyX (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyC (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) z)))))) (@GRing.add (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (polyX (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.opp (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@polyC (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x))) *) by rewrite big_seq1 (monicP (monic_minPoly K x)) scale1r. (* Goal: @eq nat (@size (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@polyseq (GRing.UnitRing.ringType (@FieldExt.unitRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p)) (S (S O)) *) by apply/eqP; rewrite size_minPoly eqSS adjoin_deg_eq1. Qed. Lemma root_small_adjoin_poly p : p \is a polyOver K -> size p <= n -> root p x = (p == 0). Proof. (* Goal: forall (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (_ : is_true (leq (@size (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p)) (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))), @eq bool (@root (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p x) (@eq_op (poly_eqType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) p (GRing.zero (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) *) move=> Kp szp; apply/rootP/eqP=> [px0 | ->]; last by rewrite horner0. (* Goal: @eq (Equality.sort (poly_eqType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) p (GRing.zero (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) *) rewrite -(Fadjoin_poly_unique Kp szp px0). (* Goal: @eq (Equality.sort (poly_eqType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Fadjoin_poly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (GRing.zero (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) *) by apply: Fadjoin_poly_unique; rewrite ?polyOver0 ?size_poly0 ?horner0. Qed. Lemma minPoly_irr p : p \is a polyOver K -> p %| minPoly K x -> (p %= minPoly K x) || (p %= 1). Proof. (* Goal: forall (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (_ : is_true (Pdiv.Field.dvdp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))), is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) rewrite dvdp_eq; set q := _ %/ _ => Kp def_pq. (* Goal: is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) have Kq: q \is a polyOver K by rewrite divp_polyOver // minPolyOver. (* Goal: is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) move: q Kq def_pq root_minPoly (size_minPoly K x) => q Kq /eqP->. (* Goal: forall (_ : is_true (@root (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p) x)) (_ : @eq nat (@size (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p))) (S (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))), is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) rewrite rootM => pqx0 szpq. (* Goal: is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) have [nzq nzp]: q != 0 /\ p != 0. (* Goal: is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) (* Goal: and (is_true (negb (@eq_op (GRing.Zmodule.eqType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))))) q (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))))))))) (is_true (negb (@eq_op (poly_eqType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) p (GRing.zero (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) *) by apply/norP; rewrite -mulf_eq0 -size_poly_eq0 szpq. (* Goal: is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) without loss{pqx0} qx0: q p Kp Kq nzp nzq szpq / root q x. (* Goal: is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) (* Goal: forall _ : forall (q : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))))) (p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (_ : is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))))) q (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (_ : is_true (negb (@eq_op (poly_eqType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) p (GRing.zero (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (_ : is_true (negb (@eq_op (GRing.Zmodule.eqType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))))) q (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))))))))) (_ : @eq nat (@size (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p))) (S (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x))) (_ : is_true (@root (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) q x)), is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))), is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) move=> IH; case/orP: pqx0 => /IH{IH}IH; first exact: IH. (* Goal: is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) (* Goal: is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) have{IH} /orP[]: (q %= p * q) || (q %= 1) by apply: IH => //; rewrite mulrC. (* Goal: is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) (* Goal: forall _ : is_true (Pdiv.Field.eqp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) q (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))), is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) (* Goal: forall _ : is_true (Pdiv.Field.eqp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) q (@GRing.mul (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) p q)), is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) by rewrite orbC -{1}[q]mul1r eqp_mul2r // eqp_sym => ->. (* Goal: is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) (* Goal: forall _ : is_true (Pdiv.Field.eqp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) q (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))), is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) by rewrite -{1}[p]mul1r eqp_sym eqp_mul2r // => ->. (* Goal: is_true (orb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) q p)) (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) *) apply/orP; right; rewrite -size_poly_eq1 eqn_leq lt0n size_poly_eq0 nzp andbT. (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@polyseq (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p)) (S O)) *) rewrite -(leq_add2r (size q)) -leq_subLR subn1 -size_mul // mulrC szpq. (* Goal: is_true (leq (S (adjoin_degree (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) (@size (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyseq (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) q))) *) by rewrite ltnNge; apply: contra nzq => /(root_small_adjoin_poly Kq) <-. Qed. Lemma minPoly_dvdp p : p \is a polyOver K -> root p x -> (minPoly K x) %| p. Proof. (* Goal: forall (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (_ : is_true (@root (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p x)), is_true (Pdiv.Field.dvdp (@FieldExt.idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) p) *) move=> Kp rootp. (* Goal: is_true (Pdiv.Field.dvdp (@FieldExt.idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) p) *) have gcdK : gcdp (minPoly K x) p \is a polyOver K. (* Goal: is_true (Pdiv.Field.dvdp (@FieldExt.idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) p) *) (* Goal: is_true (@in_mem (@poly_of (GRing.IntegralDomain.ringType (@FieldExt.idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.IntegralDomain.sort (@FieldExt.idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (gcdp (@FieldExt.idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) p) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))))) *) by rewrite gcdp_polyOver ?minPolyOver. (* Goal: is_true (Pdiv.Field.dvdp (@FieldExt.idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) p) *) have /orP[gcd_eqK|gcd_eq1] := minPoly_irr gcdK (dvdp_gcdl (minPoly K x) p). (* Goal: is_true (Pdiv.Field.dvdp (@FieldExt.idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) p) *) (* Goal: is_true (Pdiv.Field.dvdp (@FieldExt.idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) p) *) by rewrite -(eqp_dvdl _ gcd_eqK) dvdp_gcdr. (* Goal: is_true (Pdiv.Field.dvdp (@FieldExt.idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (minPoly (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) p) *) case/negP: (root1 x). (* Goal: is_true (@root (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (GRing.one (poly_ringType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x) *) by rewrite -(eqp_root gcd_eq1) root_gcd rootp root_minPoly. Qed. End FadjoinPoly. Lemma minPolyS K E a : (K <= E)%VS -> minPoly E a %| minPoly K a. Arguments Fadjoin_polyP {K x v}. Lemma Fadjoin1_polyP x v : reflect (exists p, v = (map_poly (in_alg L) p).[x]) (v \in <<1; x>>%VS). Proof. (* Goal: Bool.reflect (@ex (@poly_of (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0)))) (fun p : @poly_of (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) v (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@map_poly (GRing.Field.ringType F0) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@GRing.in_alg_head (GRing.Field.ringType F0) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) p) x))) (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) v (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) x)))))) *) apply: (iffP Fadjoin_polyP) => [[_ /polyOver1P]|] [p ->]; first by exists p. (* Goal: @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@aspace1 F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))))) (fun p0 : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@map_poly (GRing.Field.ringType F0) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@GRing.in_alg_head (GRing.Field.ringType F0) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) p) x) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) p0 x)) *) by exists (map_poly (in_alg L) p) => //; apply: alg_polyOver. Qed. Section Horner. Variables z : L. Definition fieldExt_horner := horner_morph (fun x => mulrC z (in_alg L x)). Canonical fieldExtHorner_additive := [additive of fieldExt_horner]. Canonical fieldExtHorner_rmorphism := [rmorphism of fieldExt_horner]. Lemma fieldExt_hornerC b : fieldExt_horner b%:P = b%:A. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType (@FieldExt.comRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (fieldExt_horner (@polyC (GRing.Field.ringType F0) b)) (@GRing.scale (GRing.Field.ringType F0) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) b (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) *) exact: horner_morphC. Qed. Lemma fieldExt_hornerX : fieldExt_horner 'X = z. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType (@FieldExt.comRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (fieldExt_horner (polyX (GRing.Field.ringType F0))) z *) exact: horner_morphX. Qed. Fact fieldExt_hornerZ : scalable fieldExt_horner. Proof. (* Goal: @GRing.Linear.mixin_of (GRing.Field.ringType F0) (poly_lmodType (GRing.Field.ringType F0)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L))))) (@GRing.scale (GRing.Field.ringType F0) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L))) fieldExt_horner *) move=> a p; rewrite -mul_polyC rmorphM /= fieldExt_hornerC. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.mul (GRing.ComRing.ringType (@FieldExt.comRingType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.scale (GRing.Field.ringType F0) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) a (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)))) (fieldExt_horner p)) (@GRing.scale (GRing.Field.ringType F0) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) a (fieldExt_horner p)) *) by rewrite -scalerAl mul1r. Qed. Canonical fieldExt_horner_linear := AddLinear fieldExt_hornerZ. Canonical fieldExt_horner_lrmorhism := [lrmorphism of fieldExt_horner]. End Horner. End FieldExtTheory. Notation "E :&: F" := (capv_aspace E F) : aspace_scope. Notation "'C_ E [ x ]" := (capv_aspace E 'C[x]) : aspace_scope. Notation "'C_ ( E ) [ x ]" := (capv_aspace E 'C[x]) (only parsing) : aspace_scope. Notation "'C_ E ( V )" := (capv_aspace E 'C(V)) : aspace_scope. Notation "'C_ ( E ) ( V )" := (capv_aspace E 'C(V)) (only parsing) : aspace_scope. Notation "E * F" := (prodv_aspace E F) : aspace_scope. Notation "f @: E" := (aimg_aspace f E) : aspace_scope. Arguments Fadjoin_idP {F0 L K x}. Arguments FadjoinP {F0 L K x E}. Arguments Fadjoin_seqP {F0 L K rs E}. Arguments polyOver_subvs {F0 L K p}. Arguments Fadjoin_polyP {F0 L K x v}. Arguments Fadjoin1_polyP {F0 L x v}. Arguments minPoly_XsubC {F0 L K x}. Section MapMinPoly. Variables (F0 : fieldType) (L rL : fieldExtType F0) (f : 'AHom(L, rL)). Variables (K : {subfield L}) (x : L). Lemma adjoin_degree_aimg : adjoin_degree (f @: K) (f x) = adjoin_degree K x. Proof. (* Goal: @eq nat (@adjoin_degree F0 rL (@lfun_img F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f) x)) (@adjoin_degree F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) *) rewrite !adjoin_degreeE -aimg_adjoin. (* Goal: @eq nat (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@lfun_img F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x))))) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) (@aimg_aspace F0 L (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f K)))) (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@agenv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x)))) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))) *) by rewrite !limg_dim_eq ?(eqP (AHom_lker0 f)) ?capv0. Qed. Lemma map_minPoly : map_poly f (minPoly K x) = minPoly (f @: K) (f x). Proof. (* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) (@minPoly F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) (@minPoly F0 rL (@lfun_img F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f) x)) *) set fp := minPoly (f @: K) (f x); pose fM := [rmorphism of f]. (* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) (@minPoly F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) fp *) have [p Kp Dp]: exists2 p, p \is a polyOver K & map_poly f p = fp. (* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) (@minPoly F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) fp *) (* Goal: @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) => @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) p) fp) *) have Kfp: fp \is a polyOver (f @: K)%VS by apply: minPolyOver. (* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) (@minPoly F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) fp *) (* Goal: @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K))))))) (fun p : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) => @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) p) fp) *) exists (map_poly f^-1%VF fp). (* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) (@minPoly F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) fp *) (* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@inv_lfun F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f))) fp)) fp *) (* Goal: is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@inv_lfun F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f))) fp) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))))) *) apply/polyOver_poly=> j _; have /memv_imgP[y Ky ->] := polyOverP Kfp j. (* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) (@minPoly F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) fp *) (* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@inv_lfun F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f))) fp)) fp *) (* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@inv_lfun F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f) y)) (@mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K)))) *) by rewrite lker0_lfunK ?AHom_lker0. (* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) (@minPoly F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) fp *) (* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@inv_lfun F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f))) fp)) fp *) rewrite -map_poly_comp map_poly_id // => _ /(allP Kfp)/memv_imgP[y _ ->]. (* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) (@minPoly F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) fp *) (* Goal: @eq (Equality.sort (GRing.Ring.eqType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))))) (@funcomp (GRing.Zmodule.sort (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))))) (GRing.Zmodule.sort (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))) tt (@GRing.Additive.apply (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))) (Phant (forall _ : GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))), GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))))) (@lfun_additive (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@inv_lfun F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f) y)) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f) y) *) by rewrite /= limg_lfunVK ?memv_img ?memvf. (* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@fun_of_lfun (GRing.Field.ringType F0) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@ahval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f)) (@minPoly F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) fp *) apply/eqP; rewrite -eqp_monic ?monic_map ?monic_minPoly // -Dp eqp_map. (* Goal: is_true (Pdiv.Field.eqp (GRing.Field.idomainType (@FieldExt.lalg_fieldType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@minPoly F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) p) *) have: ~~ (p %= 1) by rewrite -size_poly_eq1 -(size_map_poly fM) Dp size_minPoly. (* Goal: forall _ : is_true (negb (Pdiv.Field.eqp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))))), is_true (Pdiv.Field.eqp (GRing.Field.idomainType (@FieldExt.lalg_fieldType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (@minPoly F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x) p) *) apply: implyP; rewrite implyNb orbC eqp_sym minPoly_irr //. (* Goal: is_true (Pdiv.Field.dvdp (@FieldExt.vect_idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) p (@minPoly F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) *) rewrite -(dvdp_map fM) Dp minPoly_dvdp ?fmorph_root ?root_minPoly //. (* Goal: is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))))) (@map_poly (GRing.Field.ringType (@FieldExt.lalg_fieldType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (GRing.IntegralDomain.ringType (@FieldExt.lalg_idomainType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) rL)) (@GRing.RMorphism.apply (GRing.Field.ringType (@FieldExt.lalg_fieldType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L)) (GRing.IntegralDomain.ringType (@FieldExt.lalg_idomainType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) rL)) (Phant (forall _ : GRing.Field.sort (@FieldExt.lalg_fieldType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) L), GRing.IntegralDomain.sort (@FieldExt.lalg_idomainType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) rL))) fM) (@minPoly F0 L (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) K) x)) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) (@aimg_aspace F0 L (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) rL) f K))))))) *) by apply/polyOver_poly=> j _; apply/memv_img/polyOverP/minPolyOver. Qed. End MapMinPoly. Section FieldOver. Variables (F0 : fieldType) (L : fieldExtType F0) (F : {subfield L}). Definition fieldOver of {vspace L} : Type := L. Local Notation K_F := (subvs_of F). Local Notation L_F := (fieldOver F). Canonical fieldOver_eqType := [eqType of L_F]. Canonical fieldOver_choiceType := [choiceType of L_F]. Canonical fieldOver_zmodType := [zmodType of L_F]. Canonical fieldOver_ringType := [ringType of L_F]. Canonical fieldOver_unitRingType := [unitRingType of L_F]. Canonical fieldOver_comRingType := [comRingType of L_F]. Canonical fieldOver_comUnitRingType := [comUnitRingType of L_F]. Canonical fieldOver_idomainType := [idomainType of L_F]. Canonical fieldOver_fieldType := [fieldType of L_F]. Definition fieldOver_scale (a : K_F) (u : L_F) : L_F := vsval a * u. Local Infix "*F:" := fieldOver_scale (at level 40). Fact fieldOver_scaleA a b u : a *F: (b *F: u) = (a * b) *F: u. Proof. (* Goal: @eq (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (fieldOver_scale a (fieldOver_scale b u)) (fieldOver_scale (@GRing.mul (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) a b) u) *) exact: mulrA. Qed. Fact fieldOver_scale1 u : 1 *F: u = u. Proof. (* Goal: @eq (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (fieldOver_scale (GRing.one (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) u) u *) by rewrite /(1 *F: u) /= algid1 mul1r. Qed. Fact fieldOver_scaleDr a u v : a *F: (u + v) = a *F: u + a *F: v. Proof. (* Goal: @eq (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (fieldOver_scale a (@GRing.add fieldOver_zmodType u v)) (@GRing.add fieldOver_zmodType (fieldOver_scale a u) (fieldOver_scale a v)) *) exact: mulrDr. Qed. Fact fieldOver_scaleDl v a b : (a + b) *F: v = a *F: v + b *F: v. Proof. (* Goal: @eq (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (fieldOver_scale (@GRing.add (@subvs_zmodType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) a b) v) (@GRing.add fieldOver_zmodType (fieldOver_scale a v) (fieldOver_scale b v)) *) exact: mulrDl. Qed. Definition fieldOver_lmodMixin := LmodMixin fieldOver_scaleA fieldOver_scale1 fieldOver_scaleDr fieldOver_scaleDl. Canonical fieldOver_lmodType := LmodType K_F L_F fieldOver_lmodMixin. Lemma fieldOver_scaleE a (u : L) : a *: (u : L_F) = vsval a * u. Proof. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (Phant (GRing.Ring.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) fieldOver_lmodType) (@GRing.Lmodule.base (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@GRing.Lmodule.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (Phant (GRing.Ring.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) fieldOver_lmodType) (@GRing.Lmodule.class (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (Phant (GRing.Ring.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) fieldOver_lmodType)))) (@GRing.scale (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType a (u : fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vsval F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) a) u) *) by []. Qed. Fact fieldOver_scaleAl a u v : a *F: (u * v) = (a *F: u) * v. Proof. (* Goal: @eq (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (fieldOver_scale a (@GRing.mul fieldOver_ringType u v)) (@GRing.mul fieldOver_ringType (fieldOver_scale a u) v) *) exact: mulrA. Qed. Canonical fieldOver_lalgType := LalgType K_F L_F fieldOver_scaleAl. Fact fieldOver_scaleAr a u v : a *F: (u * v) = u * (a *F: v). Proof. (* Goal: @eq (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (fieldOver_scale a (@GRing.mul fieldOver_ringType u v)) (@GRing.mul fieldOver_ringType u (fieldOver_scale a v)) *) exact: mulrCA. Qed. Canonical fieldOver_algType := AlgType K_F L_F fieldOver_scaleAr. Canonical fieldOver_unitAlgType := [unitAlgType K_F of L_F]. Fact fieldOver_vectMixin : Vector.mixin_of fieldOver_lmodType. Proof. (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) have [bL [_ nz_bL] [defL dxSbL]] := field_module_semisimple (subvf (F * _)). (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) do [set n := \dim_F {:L} in bL nz_bL *; set SbL := (\sum_i _)%VS] in defL dxSbL. (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) have in_bL i (a : K_F) : val a * (bL`_i : L_F) \in (F * <[bL`_i]>)%VS. (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) (* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@val (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun x : @Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => @in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)))) (@subvs_subType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) a) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) bL) i)) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) bL) i)))))) *) by rewrite memv_mul ?(valP a) ?memv_line. (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) have nz_bLi (i : 'I_n): bL`_i != 0 by rewrite (memPn nz_bL) ?memt_nth. (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) pose r2v (v : 'rV[K_F]_n) : L_F := \sum_i v 0 i *: (bL`_i : L_F). (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) have r2v_lin: linear r2v. (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) (* Goal: @GRing.Linear.axiom (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (matrix_lmodType (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (S O) n) fieldOver_zmodType (@GRing.scale (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType) r2v (@GRing.Scale.scale_law (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType) (@Logic.eq_refl (forall (_ : GRing.Ring.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (Phant (GRing.Ring.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) fieldOver_lmodType) (@GRing.Lmodule.base (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@GRing.Lmodule.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (Phant (GRing.Ring.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) fieldOver_lmodType) (@GRing.Lmodule.class (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (Phant (GRing.Ring.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) fieldOver_lmodType)))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (Phant (GRing.Ring.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) fieldOver_lmodType) (@GRing.Lmodule.base (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@GRing.Lmodule.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (Phant (GRing.Ring.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) fieldOver_lmodType) (@GRing.Lmodule.class (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (Phant (GRing.Ring.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) fieldOver_lmodType)))) (@GRing.scale (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType)) *) move=> a u v; rewrite /r2v scaler_sumr -big_split /=; apply: eq_bigr => i _. (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) (* Goal: @eq (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@GRing.scale (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType (@fun_of_matrix (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n (@GRing.add (@GRing.Zmodule.Pack (matrix (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n) (@GRing.Zmodule.Class (matrix (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n) (@Choice.Class (matrix (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)))) (S O) n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (S O) n)) (matrix_zmodMixin (GRing.Ring.zmodType (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n))) (@GRing.scale (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (matrix_lmodType (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (S O) n) a u) v) (GRing.zero (Zp_zmodType O)) i) (@nth (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) bL) (@nat_of_ord n i))) (@GRing.add fieldOver_zmodType (@GRing.scale (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType a (@GRing.scale (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType (@fun_of_matrix (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n u (GRing.zero (Zp_zmodType O)) i) (@nth (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) bL) (@nat_of_ord n i)))) (@GRing.scale (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType (@fun_of_matrix (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n v (GRing.zero (Zp_zmodType O)) i) (@nth (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) bL) (@nat_of_ord n i)))) *) by rewrite scalerA -scalerDl !mxE. (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) have v2rP x: {r : 'rV[K_F]_n | x = r2v r}. (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) (* Goal: @sig (matrix (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n) (fun r : matrix (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n => @eq (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) x (r2v r)) *) apply: sig_eqW; have /memv_sumP[y Fy ->]: x \in SbL by rewrite defL memvf. (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) (* Goal: @ex (Choice.sort (matrix_choiceType (@subvs_choiceType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n)) (fun x : Choice.sort (matrix_choiceType (@subvs_choiceType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n) => @eq (Equality.sort fieldOver_eqType) (@BigOp.bigop (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Finite.sort (ordinal_finType n)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Finite.sort (ordinal_finType n)) i (@GRing.add (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (y i))) (r2v x)) *) have /fin_all_exists[r Dr] i: exists r, y i = r *: (bL`_i : L_F). (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) (* Goal: @ex (Choice.sort (matrix_choiceType (@subvs_choiceType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n)) (fun x : Choice.sort (matrix_choiceType (@subvs_choiceType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n) => @eq (Equality.sort fieldOver_eqType) (@BigOp.bigop (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Finite.sort (ordinal_finType n)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Finite.sort (ordinal_finType n)) i (@GRing.add (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (y i))) (r2v x)) *) (* Goal: @ex (GRing.Ring.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (fun r : GRing.Ring.sort (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) => @eq (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (y i) (@GRing.scale (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType r (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) bL) (@nat_of_ord n i)))) *) by have /memv_cosetP[a Fa ->] := Fy i isT; exists (Subvs Fa). (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) (* Goal: @ex (Choice.sort (matrix_choiceType (@subvs_choiceType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n)) (fun x : Choice.sort (matrix_choiceType (@subvs_choiceType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n) => @eq (Equality.sort fieldOver_eqType) (@BigOp.bigop (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Finite.sort (ordinal_finType n)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (Finite.sort (ordinal_finType n)) i (@GRing.add (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (y i))) (r2v x)) *) by exists (\row_i r i); apply: eq_bigr => i _; rewrite mxE. (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) pose v2r x := sval (v2rP x). (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) have v2rK: cancel v2r (Linear r2v_lin) by rewrite /v2r => x; case: (v2rP x). (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) suffices r2vK: cancel r2v v2r. (* Goal: @cancel (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (matrix (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n) r2v v2r *) (* Goal: @Vector.mixin_of (@subvs_ringType F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) fieldOver_lmodType *) by exists n, v2r; [apply: can2_linear v2rK | exists r2v]. (* Goal: @cancel (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (matrix (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n) r2v v2r *) move=> r; apply/rowP=> i; apply/val_inj/(mulIf (nz_bLi i))/eqP; move: i isT. (* Goal: forall (i : ordinal n) (_ : is_true true), is_true (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType (@FieldExt.idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (GRing.IntegralDomain.ringType (@FieldExt.idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@val (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun x : @Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => @in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)))) (@subvs_subType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@fun_of_matrix (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n (v2r (r2v r)) (GRing.zero (Zp_zmodType O)) i)) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) bL) (@nat_of_ord n i))) (@GRing.mul (GRing.IntegralDomain.ringType (@FieldExt.idomainType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@val (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun x : @Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => @in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)))) (@subvs_subType F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@fun_of_matrix (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (S O) n r (GRing.zero (Zp_zmodType O)) i)) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) bL) (@nat_of_ord n i)))) *) by apply/forall_inP; move/directv_sum_unique: dxSbL => <- //; apply/eqP/v2rK. Qed. Canonical fieldOver_vectType := VectType K_F L_F fieldOver_vectMixin. Canonical fieldOver_FalgType := [FalgType K_F of L_F]. Canonical fieldOver_fieldExtType := [fieldExtType K_F of L_F]. Implicit Types (V : {vspace L}) (E : {subfield L}). Lemma trivial_fieldOver : (1%VS : {vspace L_F}) =i F. Proof. (* Goal: @eq_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@vline (@subvs_fieldType F0 L F) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_FalgType) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_FalgType)) : @Vector.space (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)))))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) *) move=> x; apply/vlineP/idP=> [[{x}x ->] | Fx]. (* Goal: @ex (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F))) (fun k : GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) => @eq (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) x (@GRing.scale (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType) k (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_FalgType)))) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@GRing.scale (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType) x (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_FalgType))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)))) *) by rewrite fieldOver_scaleE mulr1 (valP x). (* Goal: @ex (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F))) (fun k : GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) => @eq (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) x (@GRing.scale (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType) k (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_FalgType)))) *) by exists (vsproj F x); rewrite fieldOver_scaleE mulr1 vsprojK. Qed. Definition vspaceOver V := <<vbasis V : seq L_F>>%VS. Lemma mem_vspaceOver V : vspaceOver V =i (F * V)%VS. Proof. (* Goal: @eq_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (vspaceOver V))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) V))) *) move=> y; apply/idP/idP; last rewrite unlock; move/coord_span->. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (index_enum (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) (fun i : Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) true (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@coord F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) i y) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@tval (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V))) (@nat_of_ord (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) i))))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (vspaceOver V)))) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType))))) (Finite.sort (ordinal_finType (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType))))) (index_enum (ordinal_finType (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V))) (fun i : Finite.sort (ordinal_finType (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType))))) (Finite.sort (ordinal_finType (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType))))) true (@GRing.scale (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType) (@coord (@subvs_fieldType F0 L F) fieldOver_vectType (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V) (@vbasis F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V) i y) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@tval (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V) (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@vbasis F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V)) (@nat_of_ord (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V) i))))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) V)))) *) rewrite (@memv_suml F0 L) // => i _. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (index_enum (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) (fun i : Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) true (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@coord F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) i y) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@tval (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V))) (@nat_of_ord (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) i))))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (vspaceOver V)))) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@GRing.scale (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType) (@coord (@subvs_fieldType F0 L F) fieldOver_vectType (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V) (@vbasis F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V) i y) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@tval (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V) (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@vbasis F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V)) (@nat_of_ord (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V) i))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) V)))) *) by rewrite memv_mul ?subvsP // vbasis_mem ?memt_nth. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (index_enum (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) (fun i : Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) true (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@coord F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) i y) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@tval (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V))) (@nat_of_ord (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) i))))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (vspaceOver V)))) *) rewrite memv_suml // => ij _; rewrite -tnth_nth; set x := tnth _ ij. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@coord F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) ij y) x) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (vspaceOver V)))) *) have/allpairsP[[u z] /= [Fu Vz {x}->]]: x \in _ := mem_tnth ij _. (* Goal: is_true (@in_mem (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@coord F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)) ij y) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) u z)) (@mem (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (predPredType (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (vspaceOver V)))) *) by rewrite scalerAl (memvZ (Subvs _)) ?memvZ ?memv_span //= vbasis_mem. Qed. Lemma mem_aspaceOver E : (F <= E)%VS -> vspaceOver E =i E. Proof. (* Goal: forall _ : is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)), @eq_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (vspaceOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) *) by move=> sFE y; rewrite mem_vspaceOver field_module_eq ?sup_field_module. Qed. Fact aspaceOver_suproof E : is_aspace (vspaceOver E). Proof. (* Goal: is_true (@is_aspace (@subvs_fieldType F0 L F) fieldOver_FalgType (vspaceOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) *) rewrite /is_aspace has_algid1; last by rewrite mem_vspaceOver (@mem1v _ L). (* Goal: is_true (andb true (@subsetv (@subvs_fieldType F0 L F) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_FalgType) (@prodv (@subvs_fieldType F0 L F) fieldOver_FalgType (vspaceOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) (vspaceOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) (vspaceOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)))) *) by apply/prodvP=> u v; rewrite !mem_vspaceOver; apply: memvM. Qed. Canonical aspaceOver E := ASpace (aspaceOver_suproof E). Lemma dim_vspaceOver M : (F * M <= M)%VS -> \dim (vspaceOver M) = \dim_F M. Proof. (* Goal: forall _ : is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) M) M), @eq nat (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType (vspaceOver M)) (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) *) move=> modM; have [] := field_module_semisimple modM. (* Goal: forall (x : tuple_of (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (_ : and (@sub_mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) M))) (is_true (negb (@in_mem (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@mem (Equality.sort (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (tuple_predType (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@FieldExt.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) x))))) (_ : let FX := @BigOp.bigop (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (Finite.sort (ordinal_finType (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))))) (@vline F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (index_enum (ordinal_finType (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))))) (fun i : ordinal (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) => @BigBody (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (ordinal (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)))) i (@addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) true (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x) (@nat_of_ord (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) i))))) in and (@eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX M) (is_true (@directv_def F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@proper_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@nary_addv_expr F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Finite.sort (ordinal_finType (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))))) (index_enum (ordinal_finType (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))))) (fun _ : ordinal (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) => true) (fun i : ordinal (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) => @trivial_addv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@vline F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x) (@nat_of_ord (divn (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) i))))))) (Phantom (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) FX)))), @eq nat (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType (vspaceOver M)) (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) M) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) *) set n := \dim_F M => b [Mb nz_b] [defM dx_b]. (* Goal: @eq nat (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType (vspaceOver M)) n *) suff: basis_of (vspaceOver M) b by apply: size_basis. (* Goal: is_true (@basis_of (@subvs_fieldType F0 L F) fieldOver_vectType (vspaceOver M) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b)) *) apply/andP; split. (* Goal: is_true (@free (@subvs_fieldType F0 L F) fieldOver_vectType (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b)) *) (* Goal: is_true (@eq_op (@space_eqType (@subvs_fieldType F0 L F) fieldOver_vectType) (@span (@subvs_fieldType F0 L F) fieldOver_vectType (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b)) (vspaceOver M)) *) rewrite eqEsubv; apply/andP; split; apply/span_subvP=> u. (* Goal: is_true (@free (@subvs_fieldType F0 L F) fieldOver_vectType (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b)) *) (* Goal: forall _ : is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) u (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (seq_predType (@Vector.eqType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@tval (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@vbasis F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M)))), is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) u (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@span (@subvs_fieldType F0 L F) fieldOver_vectType (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b))))) *) (* Goal: forall _ : is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) u (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (seq_predType (@Vector.eqType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b))), is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) u (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (vspaceOver M)))) *) by rewrite mem_vspaceOver field_module_eq // => /Mb. (* Goal: is_true (@free (@subvs_fieldType F0 L F) fieldOver_vectType (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b)) *) (* Goal: forall _ : is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) u (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (seq_predType (@Vector.eqType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@tval (@dimv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@vbasis F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) M)))), is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) u (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@span (@subvs_fieldType F0 L F) fieldOver_vectType (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b))))) *) move/(@vbasis_mem _ _ _ M); rewrite -defM => /memv_sumP[{u}u Fu ->]. (* Goal: is_true (@free (@subvs_fieldType F0 L F) fieldOver_vectType (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b)) *) (* Goal: is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@BigOp.bigop (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Finite.sort (ordinal_finType n)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (Finite.sort (ordinal_finType n)) i (@GRing.add (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) true (u i))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@span (@subvs_fieldType F0 L F) fieldOver_vectType (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b))))) *) apply: memv_suml => i _; have /memv_cosetP[a Fa ->] := Fu i isT. (* Goal: is_true (@free (@subvs_fieldType F0 L F) fieldOver_vectType (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b)) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) a (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b) (@nat_of_ord n i))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@span (@subvs_fieldType F0 L F) fieldOver_vectType (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b))))) *) by apply: (memvZ (Subvs Fa)); rewrite memv_span ?memt_nth. (* Goal: is_true (@free (@subvs_fieldType F0 L F) fieldOver_vectType (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b)) *) apply/freeP=> a /(directv_sum_independent dx_b) a_0 i. (* Goal: @eq (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F))) (a i) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)))) *) have{a_0}: a i *: (b`_i : L_F) == 0. (* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType)))) (@GRing.scale (GRing.Field.ringType (@subvs_fieldType F0 L F)) fieldOver_lmodType (a i) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b) (@nat_of_ord n i))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType))))), @eq (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F))) (a i) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)))) *) (* Goal: is_true (@eq_op (GRing.Zmodule.eqType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType)))) (@GRing.scale (GRing.Field.ringType (@subvs_fieldType F0 L F)) fieldOver_lmodType (a i) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b) (@nat_of_ord n i))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType))))) *) by rewrite a_0 {i}// => i _; rewrite memv_mul ?memv_line ?subvsP. (* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType)))) (@GRing.scale (GRing.Field.ringType (@subvs_fieldType F0 L F)) fieldOver_lmodType (a i) (@nth (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@tval n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) b) (@nat_of_ord n i))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_lmodType))))), @eq (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F))) (a i) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)))) *) by rewrite scaler_eq0=> /predU1P[] // /idPn[]; rewrite (memPn nz_b) ?memt_nth. Qed. Lemma dim_aspaceOver E : (F <= E)%VS -> \dim (vspaceOver E) = \dim_F E. Proof. (* Goal: forall _ : is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)), @eq nat (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType (vspaceOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) (divn (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) *) by rewrite -sup_field_module; apply: dim_vspaceOver. Qed. Lemma vspaceOverP V_F : {V | [/\ V_F = vspaceOver V, (F * V <= V)%VS & V_F =i V]}. Proof. (* Goal: @sig (@Vector.space F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun V : @Vector.space F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => and3 (@eq (@Vector.space (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType))) V_F (vspaceOver V)) (is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) V) V)) (@eq_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) V_F)) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) *) pose V := (F * <<vbasis V_F : seq L>>)%VS. (* Goal: @sig (@Vector.space F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun V : @Vector.space F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => and3 (@eq (@Vector.space (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType))) V_F (vspaceOver V)) (is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) V) V)) (@eq_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) V_F)) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) *) have idV: (F * V)%VS = V by rewrite prodvA prodv_id. (* Goal: @sig (@Vector.space F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun V : @Vector.space F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => and3 (@eq (@Vector.space (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType))) V_F (vspaceOver V)) (is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) V) V)) (@eq_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) V_F)) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) *) suffices defVF: V_F = vspaceOver V. (* Goal: @eq (@Vector.space (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType))) V_F (vspaceOver V) *) (* Goal: @sig (@Vector.space F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun V : @Vector.space F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => and3 (@eq (@Vector.space (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType))) V_F (vspaceOver V)) (is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) V) V)) (@eq_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) V_F)) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@pred_of_vspace F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) V)))) *) by exists V; split=> [||u]; rewrite ?defVF ?mem_vspaceOver ?idV. (* Goal: @eq (@Vector.space (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType))) V_F (vspaceOver V) *) apply/vspaceP=> v; rewrite mem_vspaceOver idV. (* Goal: @eq bool (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) v (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) V_F))) (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) v (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) V))) *) do [apply/idP/idP; last rewrite /V unlock] => [/coord_vbasis|/coord_span] ->. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (index_enum (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))))) (fun i : Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) true (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@coord F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) i v) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@tval (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))))) (@nat_of_ord (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) i))))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) V_F))) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType))))) (Finite.sort (ordinal_finType (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType))))) (index_enum (ordinal_finType (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F))) (fun i : ordinal (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType))))) (ordinal (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType))))) true (@GRing.scale (GRing.Field.ringType (@subvs_fieldType F0 L F)) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType) (@coord (@subvs_fieldType F0 L F) fieldOver_vectType (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F) i v) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType))) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)) (@nat_of_ord (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) i))))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) V))) *) by apply: memv_suml => i _; rewrite memv_mul ?subvsP ?memv_span ?memt_nth. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (index_enum (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))))) (fun i : Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) (Finite.sort (ordinal_finType (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))))) true (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@coord F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) i v) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@tval (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))))) (@nat_of_ord (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) i))))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) V_F))) *) apply: memv_suml => i _; rewrite -tnth_nth; set xu := tnth _ i. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@coord F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)))) fieldOver_vectType)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) i v) xu) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) V_F))) *) have /allpairsP[[x u] /=]: xu \in _ := mem_tnth i _. (* Goal: forall _ : and3 (is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) x (@mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (seq_predType (GRing.Ring.eqType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@tval (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)))))) (is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) u (@mem (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (seq_predType (GRing.Ring.eqType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))))) (@tval (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))))))) (@eq (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) xu (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x u)), is_true (@in_mem (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@coord F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) i v) xu) (@mem (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (predPredType (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) V_F))) *) case=> /vbasis_mem Fx /vbasis_mem Vu ->. (* Goal: is_true (@in_mem (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@coord F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) i v) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) x u)) (@mem (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (predPredType (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F))) V_F))) *) rewrite scalerAl (coord_span Vu) mulr_sumr memv_suml // => j_. (* Goal: forall _ : is_true true, is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@GRing.scale (GRing.Field.ringType F0) (@GRing.Lalgebra.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@coord F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (muln (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) (@allpairs_tuple (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)))) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vect_lalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@span F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F))))) i v) x) (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@coord F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F) j_ u) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@tval (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@vbasis (@subvs_fieldType F0 L F) fieldOver_vectType V_F)) (@nat_of_ord (@dimv (@subvs_fieldType F0 L F) fieldOver_vectType V_F) j_)))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) (@pred_of_vspace (@subvs_fieldType F0 L F) fieldOver_vectType (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_vectType)) V_F))) *) by rewrite -scalerCA (memvZ (Subvs _)) ?memvZ // vbasis_mem ?memt_nth. Qed. Lemma aspaceOverP (E_F : {subfield L_F}) : {E | [/\ E_F = aspaceOver E, (F <= E)%VS & E_F =i E]}. Proof. (* Goal: @sig (@aspace_of F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun E : @aspace_of F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => and3 (@eq (@aspace_of (@subvs_fieldType F0 L F) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType) (Phant (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)))) E_F (aspaceOver E)) (is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) (@eq_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType)))) (@pred_of_vspace (@subvs_fieldType F0 L F) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType)) (Phant (@Falgebra.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (@asval (@subvs_fieldType F0 L F) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType) E_F))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))))) *) have [V [defEF modV memV]] := vspaceOverP E_F. (* Goal: @sig (@aspace_of F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun E : @aspace_of F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => and3 (@eq (@aspace_of (@subvs_fieldType F0 L F) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType) (Phant (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)))) E_F (aspaceOver E)) (is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) (@eq_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType)))) (@pred_of_vspace (@subvs_fieldType F0 L F) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType)) (Phant (@Falgebra.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (@asval (@subvs_fieldType F0 L F) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType) E_F))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))))) *) have algE: has_algid V && (V * V <= V)%VS. (* Goal: @sig (@aspace_of F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun E : @aspace_of F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => and3 (@eq (@aspace_of (@subvs_fieldType F0 L F) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType) (Phant (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)))) E_F (aspaceOver E)) (is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) (@eq_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType)))) (@pred_of_vspace (@subvs_fieldType F0 L F) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType)) (Phant (@Falgebra.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (@asval (@subvs_fieldType F0 L F) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType) E_F))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))))) *) (* Goal: is_true (andb (@has_algid F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V) (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V V) V)) *) rewrite has_algid1; last by rewrite -memV mem1v. (* Goal: @sig (@aspace_of F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun E : @aspace_of F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => and3 (@eq (@aspace_of (@subvs_fieldType F0 L F) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType) (Phant (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)))) E_F (aspaceOver E)) (is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) (@eq_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType)))) (@pred_of_vspace (@subvs_fieldType F0 L F) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType)) (Phant (@Falgebra.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (@asval (@subvs_fieldType F0 L F) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType) E_F))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))))) *) (* Goal: is_true (andb true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) V V) V)) *) by apply/prodvP=> u v; rewrite -!memV; apply: memvM. (* Goal: @sig (@aspace_of F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (fun E : @aspace_of F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) => and3 (@eq (@aspace_of (@subvs_fieldType F0 L F) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType) (Phant (fieldOver (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F)))) E_F (aspaceOver E)) (is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) (@eq_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType)))) (@pred_of_vspace (@subvs_fieldType F0 L F) (@Falgebra.vectType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType)) (Phant (@Falgebra.sort (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType))) (@asval (@subvs_fieldType F0 L F) (@FieldExt.FalgType (GRing.Field.ringType (@subvs_fieldType F0 L F)) (Phant (GRing.Field.sort (@subvs_fieldType F0 L F))) fieldOver_fieldExtType) E_F))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))))) *) by exists (ASpace algE); rewrite -sup_field_module; split; first apply: val_inj. Qed. End FieldOver. Section BaseField. Variables (F0 : fieldType) (F : fieldExtType F0) (L : fieldExtType F). Definition baseField_type of phant L : Type := L. Notation L0 := (baseField_type (Phant (FieldExt.sort L))). Canonical baseField_eqType := [eqType of L0]. Canonical baseField_choiceType := [choiceType of L0]. Canonical baseField_zmodType := [zmodType of L0]. Canonical baseField_ringType := [ringType of L0]. Canonical baseField_unitRingType := [unitRingType of L0]. Canonical baseField_comRingType := [comRingType of L0]. Canonical baseField_comUnitRingType := [comUnitRingType of L0]. Canonical baseField_idomainType := [idomainType of L0]. Canonical baseField_fieldType := [fieldType of L0]. Definition baseField_scale (a : F0) (u : L0) : L0 := in_alg F a *: u. Local Infix "*F0:" := baseField_scale (at level 40). Fact baseField_scaleA a b u : a *F0: (b *F0: u) = (a * b) *F0: u. Proof. (* Goal: @eq (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (baseField_scale a (baseField_scale b u)) (baseField_scale (@GRing.mul (GRing.Field.ringType F0) a b) u) *) by rewrite [_ *F0: _]scalerA -rmorphM. Qed. Fact baseField_scale1 u : 1 *F0: u = u. Proof. (* Goal: @eq (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (baseField_scale (GRing.one (GRing.Field.ringType F0)) u) u *) by rewrite /(1 *F0: u) rmorph1 scale1r. Qed. Fact baseField_scaleDr a u v : a *F0: (u + v) = a *F0: u + a *F0: v. Proof. (* Goal: @eq (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (baseField_scale a (@GRing.add baseField_zmodType u v)) (@GRing.add baseField_zmodType (baseField_scale a u) (baseField_scale a v)) *) exact: scalerDr. Qed. Fact baseField_scaleDl v a b : (a + b) *F0: v = a *F0: v + b *F0: v. Proof. (* Goal: @eq (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (baseField_scale (@GRing.add (GRing.Field.zmodType F0) a b) v) (@GRing.add baseField_zmodType (baseField_scale a v) (baseField_scale b v)) *) by rewrite -scalerDl -rmorphD. Qed. Definition baseField_lmodMixin := LmodMixin baseField_scaleA baseField_scale1 baseField_scaleDr baseField_scaleDl. Canonical baseField_lmodType := LmodType F0 L0 baseField_lmodMixin. Lemma baseField_scaleE a (u : L) : a *: (u : L0) = a%:A *: u. Proof. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_lmodType) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_lmodType) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_lmodType)))) (@GRing.scale (GRing.Field.ringType F0) baseField_lmodType a (u : baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)))) (@GRing.scale (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) F)) (@FieldExt.lmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) F)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) F)))) L) (@GRing.scale (GRing.Field.ringType F0) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) F)) a (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) F)))) u) *) by []. Qed. Fact baseField_scaleAl a (u v : L0) : a *F0: (u * v) = (a *F0: u) * v. Proof. (* Goal: @eq (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (baseField_scale a (@GRing.mul baseField_ringType u v)) (@GRing.mul baseField_ringType (baseField_scale a u) v) *) exact: scalerAl. Qed. Canonical baseField_lalgType := LalgType F0 L0 baseField_scaleAl. Fact baseField_scaleAr a u v : a *F0: (u * v) = u * (a *F0: v). Proof. (* Goal: @eq (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (baseField_scale a (@GRing.mul baseField_ringType u v)) (@GRing.mul baseField_ringType u (baseField_scale a v)) *) exact: scalerAr. Qed. Canonical baseField_algType := AlgType F0 L0 baseField_scaleAr. Canonical baseField_unitAlgType := [unitAlgType F0 of L0]. Let n := \dim {:F}. Let bF : n.-tuple F := vbasis {:F}. Let coordF (x : F) := (coord_vbasis (memvf x)). Fact baseField_vectMixin : Vector.mixin_of baseField_lmodType. Canonical baseField_vectType := VectType F0 L0 baseField_vectMixin. Canonical baseField_FalgType := [FalgType F0 of L0]. Canonical baseField_extFieldType := [fieldExtType F0 of L0]. Let F0ZEZ a x v : a *: ((x *: v : L) : L0) = (a *: x) *: v. Proof. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_lmodType) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_lmodType) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_lmodType)))) (@GRing.scale (GRing.Field.ringType F0) baseField_lmodType a ((@GRing.scale (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.lmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) x v : @FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) : baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)))) (@GRing.scale (@GRing.Lalgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) F)) (@FieldExt.lmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (@GRing.scale (GRing.Field.ringType F0) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.lalgType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) F)) a x) v) *) by rewrite [a *: _]scalerA -scalerAl mul1r. Qed. Let baseVspace_basis V : seq L0 := [seq tnth bF ij.2 *: tnth (vbasis V) ij.1 | ij : 'I_(\dim V) * 'I_n]. Definition baseVspace V := <<baseVspace_basis V>>%VS. Lemma mem_baseVspace V : baseVspace V =i V. Proof. (* Goal: @eq_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (@pred_of_vspace F0 baseField_vectType (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (baseVspace V))) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) V)) *) move=> y; apply/idP/idP=> [/coord_span->|/coord_vbasis->]; last first. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) (Finite.sort (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) (index_enum (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))))) (fun i : Finite.sort (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n))))))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) (Finite.sort (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) true (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType) (@coord F0 baseField_vectType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) (@image_tuple (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (fun ij : prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) => @GRing.scale (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (@tnth n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) bF (@snd (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij)) (@tnth (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@fst (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n))))) i y) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (@tval (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@image_tuple (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (fun ij : prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) => @GRing.scale (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (@tnth n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) bF (@snd (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij)) (@tnth (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@fst (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) (@nat_of_ord (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) i))))) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) V))) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.base (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.class (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))))) (Finite.sort (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.base (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.class (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))))) (index_enum (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V))) (fun i : ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.base (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.class (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))))) (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.base (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.class (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))))) true (@GRing.scale (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (@coord (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) i y) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))) (@tval (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (@nat_of_ord (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) i))))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (@pred_of_vspace F0 baseField_vectType (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (baseVspace V)))) *) apply: memv_suml => i _; rewrite (coordF (coord _ i (y : L))) scaler_suml -/n. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) (Finite.sort (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) (index_enum (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))))) (fun i : Finite.sort (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n))))))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) (Finite.sort (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) true (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType) (@coord F0 baseField_vectType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) (@image_tuple (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (fun ij : prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) => @GRing.scale (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (@tnth n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) bF (@snd (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij)) (@tnth (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@fst (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n))))) i y) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (@tval (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@image_tuple (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (fun ij : prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) => @GRing.scale (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (@tnth n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) bF (@snd (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij)) (@tnth (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@fst (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) (@nat_of_ord (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) i))))) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) V))) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.base (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.class (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.base (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.class (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))))) (index_enum (ordinal_finType n)) (fun i0 : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.base (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.class (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))))) (Finite.sort (ordinal_finType n)) i0 (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.base (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.class (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))))) true (@GRing.scale (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@coord F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) n (@vbasis F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@fullv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) i0 (@coord (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) i y)) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@tval n (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@vbasis F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@fullv F0 (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@nat_of_ord n i0))) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))) (@tval (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (@nat_of_ord (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) i))))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (@pred_of_vspace F0 baseField_vectType (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (baseVspace V)))) *) apply: memv_suml => j _; rewrite -/bF -F0ZEZ memvZ ?memv_span // -!tnth_nth. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) (Finite.sort (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) (index_enum (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))))) (fun i : Finite.sort (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n))))))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) (Finite.sort (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) true (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType) (@coord F0 baseField_vectType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) (@image_tuple (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (fun ij : prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) => @GRing.scale (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (@tnth n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) bF (@snd (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij)) (@tnth (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@fst (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n))))) i y) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (@tval (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@image_tuple (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (fun ij : prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) => @GRing.scale (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (@tnth n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) bF (@snd (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij)) (@tnth (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@fst (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) (@nat_of_ord (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) i))))) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) V))) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@GRing.scale (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.lmodType (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (@tnth n (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@FieldExt.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) bF j) (@tnth (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) i)) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (seq_predType (@Vector.eqType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (baseVspace_basis V))) *) by apply/imageP; exists (i, j). (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) (Finite.sort (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) (index_enum (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))))) (fun i : Finite.sort (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n))))))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) (Finite.sort (ordinal_finType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.base (GRing.Field.ringType F0) (@GRing.Lmodule.sort (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType)) (@GRing.Lmodule.class (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType))))) true (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Ring.sort (GRing.Field.ringType F0))) baseField_vectType) (@coord F0 baseField_vectType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) (@image_tuple (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (fun ij : prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) => @GRing.scale (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (@tnth n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) bF (@snd (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij)) (@tnth (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@fst (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n))))) i y) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType)) (@tval (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@image_tuple (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (fun ij : prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) => @GRing.scale (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (@tnth n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) bF (@snd (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij)) (@tnth (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V) (@fst (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n) ij))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) (@nat_of_ord (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)) (@mem (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n))) (predPredType (Finite.sort (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal_finType n)))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) V)) (ordinal n)))))) i))))) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) V))) *) apply: memv_suml => k _; rewrite nth_image; case: (enum_val k) => i j /=. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) (@GRing.scale (GRing.Field.ringType F0) (@Vector.lmodType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@coord F0 baseField_vectType (@card (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V)) (ordinal_finType n)) (@mem (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V)) (ordinal n)) (predPredType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V)) (ordinal n))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V)) (ordinal n)))))) (@image_tuple (prod_finType (ordinal_finType (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V)) (ordinal_finType n)) (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (fun ij : prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V)) (ordinal n) => @GRing.scale (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)) (@tnth n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) bF (@snd (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V)) (ordinal n) ij)) (@tnth (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V) (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V) (@fst (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V)) (ordinal n) ij))) (@sort_of_simpl_pred (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V)) (ordinal n)) (pred_of_argType (prod (ordinal (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V)) (ordinal n))))) k y) (@GRing.scale (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)) (@tnth n (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) bF j) (@tnth (@dimv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V) (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) (@vbasis (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) V) i))) (@mem (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)) V))) *) by rewrite F0ZEZ memvZ ?vbasis_mem ?mem_tnth. Qed. Lemma dim_baseVspace V : \dim (baseVspace V) = (\dim V * n)%N. Fact baseAspace_suproof (E : {subfield L}) : is_aspace (baseVspace E). Proof. (* Goal: is_true (@is_aspace F0 baseField_FalgType (baseVspace (@asval (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) E))) *) rewrite /is_aspace has_algid1; last by rewrite mem_baseVspace (mem1v E). (* Goal: is_true (andb true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (@prodv F0 baseField_FalgType (baseVspace (@asval (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) E)) (baseVspace (@asval (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) E))) (baseVspace (@asval (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) E)))) *) by apply/prodvP=> u v; rewrite !mem_baseVspace; apply: memvM. Qed. Definition refBaseField := locked_with refBaseField_key (baseAspace 1). Canonical refBaseField_unlockable := [unlockable of refBaseField]. Notation F1 := refBaseField. Lemma dim_refBaseField : \dim F1 = n. Proof. (* Goal: @eq nat (@dimv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (@asval F0 baseField_FalgType refBaseField)) n *) by rewrite [F1]unlock dim_baseVspace dimv1 mul1n. Qed. Lemma baseVspace_module V (V0 := baseVspace V) : (F1 * V0 <= V0)%VS. Proof. (* Goal: is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (@prodv F0 baseField_FalgType (@asval F0 baseField_FalgType refBaseField) V0) V0) *) apply/prodvP=> u v; rewrite [F1]unlock !mem_baseVspace => /vlineP[x ->] Vv. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_vectType) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (@GRing.scale (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) x (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)))) v) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) V))) *) by rewrite -(@scalerAl F L) mul1r; apply: memvZ. Qed. Lemma sub_baseField (E : {subfield L}) : (F1 <= baseVspace E)%VS. Proof. (* Goal: is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (@asval F0 baseField_FalgType refBaseField) (baseVspace (@asval (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) E))) *) by rewrite -sup_field_module baseVspace_module. Qed. Lemma vspaceOver_refBase V : vspaceOver F1 (baseVspace V) =i V. Proof. (* Goal: @eq_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@pred_of_vspace (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@vspaceOver F0 baseField_extFieldType refBaseField (baseVspace V)))) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) V)) *) move=> v; rewrite mem_vspaceOver field_module_eq ?baseVspace_module //. (* Goal: @eq bool (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) v (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)))) (baseVspace V)))) (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) v (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) V))) *) by rewrite mem_baseVspace. Qed. Lemma module_baseVspace M0 : (F1 * M0 <= M0)%VS -> {V | M0 = baseVspace V & M0 =i V}. Proof. (* Goal: forall _ : is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (@prodv F0 baseField_FalgType (@asval F0 baseField_FalgType refBaseField) M0) M0), @sig2 (@Vector.space (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))) (fun V : @Vector.space (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) => @eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType))) M0 (baseVspace V)) (fun V : @Vector.space (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) => @eq_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) M0)) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) V))) *) move=> modM0; pose V := <<vbasis (vspaceOver F1 M0) : seq L>>%VS. (* Goal: @sig2 (@Vector.space (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))) (fun V : @Vector.space (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) => @eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType))) M0 (baseVspace V)) (fun V : @Vector.space (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) => @eq_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) M0)) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) V))) *) suffices memM0: M0 =i V. (* Goal: @eq_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) M0)) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) V)) *) (* Goal: @sig2 (@Vector.space (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))) (fun V : @Vector.space (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) => @eq (@Vector.space F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType))) M0 (baseVspace V)) (fun V : @Vector.space (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) => @eq_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) M0)) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) V))) *) by exists V => //; apply/vspaceP=> v; rewrite mem_baseVspace memM0. (* Goal: @eq_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) M0)) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) V)) *) move=> v; rewrite -{1}(field_module_eq modM0) -(mem_vspaceOver M0) {}/V. (* Goal: @eq bool (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) v (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@pred_of_vspace (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@vspaceOver F0 baseField_extFieldType refBaseField M0)))) (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) v (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@span (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (@tval (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) (@vspaceOver F0 baseField_extFieldType refBaseField M0)) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) (@vspaceOver F0 baseField_extFieldType refBaseField M0))))))) *) move: (vspaceOver F1 M0) => M. (* Goal: @eq bool (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) v (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@pred_of_vspace (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) M))) (@in_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) v (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@span (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (@tval (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M)))))) *) apply/idP/idP=> [/coord_vbasis|/coord_span]->; apply/memv_suml=> i _. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (@GRing.scale (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (@coord (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i v) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@tval (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M)) (@nat_of_ord (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@pred_of_vspace (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) M))) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (@GRing.scale (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (@coord (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i v) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)))) (@tval (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M)) (@nat_of_ord (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i))) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (Phant (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@span (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (@tval (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (@GRing.Lmodule.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M)))))) *) rewrite /(_ *: _) /= /fieldOver_scale; case: (coord _ i _) => /= x. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (@GRing.scale (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (@coord (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i v) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@tval (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M)) (@nat_of_ord (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@pred_of_vspace (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) M))) *) (* Goal: forall _ : is_true (@in_mem (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) x (@mem (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (predPredType (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)) (Phant (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType) refBaseField)))), is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)) x (@nth (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType) refBaseField))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType) refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)))) (@tval (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M)) (@nat_of_ord (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i))) (@mem (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)) (@span (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) (@tval (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M)))))) *) rewrite {1}[F1]unlock mem_baseVspace => /vlineP[{x}x ->]. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (@GRing.scale (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (@coord (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i v) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@tval (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M)) (@nat_of_ord (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@pred_of_vspace (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) M))) *) (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)) (@GRing.scale (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) x (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)))) (@nth (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType) refBaseField))) (@Vector.lmodType (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (@subvs_of F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType) refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)))) (@tval (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M)) (@nat_of_ord (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i))) (@mem (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)) (@span (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L) (@tval (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M)))))) *) by rewrite -(@scalerAl F L) mul1r memvZ ?memv_span ?memt_nth. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (@GRing.scale (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@Vector.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (@coord (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i v) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@tval (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M)) (@nat_of_ord (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i))) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@pred_of_vspace (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) M))) *) move: (coord _ i _) => x; rewrite -[_`_i]mul1r scalerAl -tnth_nth. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Falgebra.vect_lalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.scale (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@GRing.Lalgebra.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Falgebra.vect_lalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) x (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)))) (@tnth (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i)) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@pred_of_vspace (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) M))) *) have F1x: x%:A \in F1. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Falgebra.vect_lalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.scale (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@GRing.Lalgebra.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Falgebra.vect_lalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) x (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)))) (@tnth (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i)) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@pred_of_vspace (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) M))) *) (* Goal: is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.lalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.base (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@GRing.Lmodule.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.lalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.Lmodule.class (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.lalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))))) (@GRing.scale (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.lalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)) x (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.lalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L)))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType)) (@asval F0 baseField_FalgType refBaseField)))) *) by rewrite [F1]unlock mem_baseVspace (@memvZ F L) // mem1v. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Falgebra.vect_lalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) (@GRing.scale (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (@GRing.Lalgebra.lmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@Falgebra.vect_lalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Ring.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)))) L))) x (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)))) (@tnth (@dimv (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@vbasis (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) M) i)) (@mem (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField)) (predPredType (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) (@pred_of_vspace (@subvs_fieldType F0 baseField_extFieldType refBaseField) (@fieldOver_vectType F0 baseField_extFieldType refBaseField) (Phant (@Vector.sort (GRing.Field.ringType (@subvs_fieldType F0 baseField_extFieldType refBaseField)) (Phant (GRing.Field.sort (@subvs_fieldType F0 baseField_extFieldType refBaseField))) (@fieldOver_vectType F0 baseField_extFieldType refBaseField))) M))) *) by congr (_ \in M): (memvZ (Subvs F1x) (vbasis_mem (mem_tnth i _))). Qed. Lemma module_baseAspace (E0 : {subfield L0}) : (F1 <= E0)%VS -> {E | E0 = baseAspace E & E0 =i E}. Proof. (* Goal: forall _ : is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_FalgType) (@asval F0 baseField_FalgType refBaseField) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType) E0)), @sig2 (@aspace_of (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (fun E : @aspace_of (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)) => @eq (@aspace_of F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType) (Phant (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))))) E0 (baseAspace E)) (fun E : @aspace_of (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)) => @eq_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType) E0))) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@Falgebra.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@Falgebra.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@Falgebra.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (Phant (@Falgebra.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@asval (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) E)))) *) rewrite -sup_field_module => /module_baseVspace[E defE0 memE0]. (* Goal: @sig2 (@aspace_of (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))) (fun E : @aspace_of (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)) => @eq (@aspace_of F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType) (Phant (baseField_type (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L))))) E0 (baseAspace E)) (fun E : @aspace_of (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) (Phant (@FieldExt.sort (@FieldExt.ringType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (Phant (@FieldExt.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) L)) => @eq_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) baseField_extFieldType) E0))) (@mem (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@Falgebra.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (predPredType (@Vector.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@Falgebra.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)))) (@pred_of_vspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@Falgebra.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (Phant (@Falgebra.sort (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L))) (@asval (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) E)))) *) suffices algE: is_aspace E by exists (ASpace algE); first apply: val_inj. (* Goal: is_true (@is_aspace (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) E) *) rewrite /is_aspace has_algid1 -?memE0 ?mem1v //. (* Goal: is_true (andb true (@subsetv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@Falgebra.vectType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L)) (@prodv (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F) (@FieldExt.FalgType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F)) (Phant (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) F))) L) E E) E)) *) by apply/prodvP=> u v; rewrite -!memE0; apply: memvM. Qed. End BaseField. Notation baseFieldType L := (baseField_type (Phant L)). Section MoreFieldOver. Variables (F0 : fieldType) (L : fieldExtType F0) (F : {subfield L}). Lemma base_vspaceOver V : baseVspace (vspaceOver F V) =i (F * V)%VS. Proof. (* Goal: @eq_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F)))) (@pred_of_vspace F0 (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F)))) (@baseVspace F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F) (@vspaceOver F0 L F V)))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) V))) *) by move=> v; rewrite mem_baseVspace mem_vspaceOver. Qed. Lemma base_moduleOver V : (F * V <= V)%VS -> baseVspace (vspaceOver F V) =i V. Proof. (* Goal: forall _ : is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@prodv F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) V) V), @eq_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F)))) (@pred_of_vspace F0 (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F)))) (@baseVspace F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F) (@vspaceOver F0 L F V)))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) V)) *) by move=> /field_module_eq defV v; rewrite base_vspaceOver defV. Qed. Lemma base_aspaceOver (E : {subfield L}) : (F <= E)%VS -> baseVspace (vspaceOver F E) =i E. Proof. (* Goal: forall _ : is_true (@subsetv F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) F) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E)), @eq_mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F)))) (@pred_of_vspace F0 (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F)) (Phant (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@baseField_vectType F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F)))) (@baseVspace F0 (@subvs_fieldExtType F0 L F) (@fieldOver_fieldExtType F0 L F) (@vspaceOver F0 L F (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))))) (@mem (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)))) (@pred_of_vspace F0 (@Falgebra.vectType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L))) (@asval F0 (@FieldExt.FalgType (GRing.Field.ringType F0) (Phant (GRing.Field.sort F0)) L) E))) *) by rewrite -sup_field_module; apply: base_moduleOver. Qed. End MoreFieldOver. Section SubFieldExtension. Local Open Scope quotient_scope. Variables (F L : fieldType) (iota : {rmorphism F -> L}). Variables (z : L) (p : {poly F}). Local Notation "p ^iota" := (map_poly (GRing.RMorphism.apply iota) p) (at level 2, format "p ^iota") : ring_scope. Let wf_p := (p != 0) && root p^iota z. Let p0 : {poly F} := if wf_p then (lead_coef p)^-1 *: p else 'X. Let z0 := if wf_p then z else 0. Let n := (size p0).-1. Let p0_mon : p0 \is monic. Proof. (* Goal: is_true (@in_mem (@poly_of (GRing.Field.ringType F) (Phant (GRing.Field.sort F))) p0 (@mem (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (predPredType (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))))) (@has_quality O (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (@monic (GRing.Field.ringType F))))) *) rewrite /p0; case: ifP => [/andP[nz_p _] | _]; last exact: monicX. (* Goal: is_true (@in_mem (@poly_of (GRing.Field.ringType F) (Phant (GRing.Field.sort F))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (poly_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.inv (GRing.Field.unitRingType F) (@lead_coef (GRing.Field.ringType F) p)) p) (@mem (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (predPredType (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))))) (@has_quality O (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (@monic (GRing.Field.ringType F))))) *) by rewrite monicE lead_coefZ mulVf ?lead_coef_eq0. Qed. Let p0z0 : root p0^iota z0. Proof. (* Goal: is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) p0) z0) *) rewrite /p0 /z0; case: ifP => [/andP[_ pz0]|]; last by rewrite map_polyX rootX. (* Goal: is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (poly_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.inv (GRing.Field.unitRingType F) (@lead_coef (GRing.Field.ringType F) p)) p)) z) *) by rewrite map_polyZ rootE hornerZ (rootP pz0) mulr0. Qed. Let n_gt0: 0 < n. Proof. (* Goal: is_true (leq (S O) n) *) rewrite /n -subn1 subn_gt0 -(size_map_poly iota). (* Goal: is_true (leq (S (S O)) (@size (GRing.Ring.sort (GRing.Field.ringType L)) (@polyseq (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort (GRing.Field.ringType L))) iota) p0)))) *) by rewrite (root_size_gt1 _ p0z0) ?map_poly_eq0. Qed. Local Notation iotaPz := (horner_morph z0Ciota). Let iotaFz (x : 'rV[F]_n) := iotaPz (rVpoly x). Definition equiv_subfext x y := (iotaFz x == iotaFz y). Fact equiv_subfext_is_equiv : equiv_class_of equiv_subfext. Proof. (* Goal: @equiv_class_of (matrix (GRing.Field.sort F) (S O) n) equiv_subfext *) by rewrite /equiv_subfext; split=> x // y w /eqP->. Qed. Canonical equiv_subfext_equiv := EquivRelPack equiv_subfext_is_equiv. Canonical equiv_subfext_encModRel := defaultEncModRel equiv_subfext. Definition subFExtend := {eq_quot equiv_subfext}. Canonical subFExtend_eqType := [eqType of subFExtend]. Canonical subFExtend_choiceType := [choiceType of subFExtend]. Canonical subFExtend_quotType := [quotType of subFExtend]. Canonical subFExtend_eqQuotType := [eqQuotType equiv_subfext of subFExtend]. Definition subfx_inj := lift_fun1 subFExtend iotaFz. Fact pi_subfx_inj : {mono \pi : x / iotaFz x >-> subfx_inj x}. Proof. (* Goal: @monomorphism_1 (matrix (GRing.Field.sort F) (S O) n) (@quot_sort (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType L))) (@Pi.f (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType (Phant (@quot_sort (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType))) (fun x : matrix (GRing.Field.sort F) (S O) n => iotaFz x) (fun x : @quot_sort (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType => subfx_inj x) *) unlock subfx_inj => x; apply/eqP; rewrite -/(equiv_subfext _ x). (* Goal: is_true (equiv_subfext (@Repr.f (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType (@Pi.f (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType (Phant (@quot_sort (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType)) x)) x) *) by rewrite -eqmodE reprK. Qed. Canonical pi_subfx_inj_morph := PiMono1 pi_subfx_inj. Let iotaPz_repr x : iotaPz (rVpoly (repr (\pi_(subFExtend) x))) = iotaFz x. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType L))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@rVpoly (GRing.Field.ringType F) n (@Repr.f (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType (@Pi.f (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType (Phant subFExtend) x)))) (iotaFz x) *) by rewrite -/(iotaFz _) -!pi_subfx_inj reprK. Qed. Definition subfext0 := lift_cst subFExtend 0. Canonical subfext0_morph := PiConst subfext0. Definition subfext_add := lift_op2 subFExtend +%R. Fact pi_subfext_add : {morph \pi : x y / x + y >-> subfext_add x y}. Canonical pi_subfx_add_morph := PiMorph2 pi_subfext_add. Definition subfext_opp := lift_op1 subFExtend -%R. Fact pi_subfext_opp : {morph \pi : x / - x >-> subfext_opp x}. Canonical pi_subfext_opp_morph := PiMorph1 pi_subfext_opp. Fact addfxA : associative subfext_add. Proof. (* Goal: @associative subFExtend subfext_add *) by move=> x y t; rewrite -[x]reprK -[y]reprK -[t]reprK !piE addrA. Qed. Fact addfxC : commutative subfext_add. Proof. (* Goal: @commutative subFExtend subFExtend subfext_add *) by move=> x y; rewrite -[x]reprK -[y]reprK !piE addrC. Qed. Fact add0fx : left_id subfext0 subfext_add. Proof. (* Goal: @left_id subFExtend subFExtend subfext0 subfext_add *) by move=> x; rewrite -[x]reprK !piE add0r. Qed. Fact addfxN : left_inverse subfext0 subfext_opp subfext_add. Proof. (* Goal: @left_inverse subFExtend subFExtend subFExtend subfext0 subfext_opp subfext_add *) by move=> x; rewrite -[x]reprK !piE addNr. Qed. Definition subfext_zmodMixin := ZmodMixin addfxA addfxC add0fx addfxN. Canonical subfext_zmodType := Eval hnf in ZmodType subFExtend subfext_zmodMixin. Let poly_rV_modp_K q : rVpoly (poly_rV (q %% p0) : 'rV[F]_n) = q %% p0. Proof. (* Goal: @eq (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (@rVpoly (GRing.Field.ringType F) n (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) q p0) : matrix (GRing.Field.sort F) (S O) n)) (Pdiv.Field.modp (GRing.Field.idomainType F) q p0) *) by apply: poly_rV_K; rewrite -ltnS -polySpred // ltn_modp. Qed. Let iotaPz_modp q : iotaPz (q %% p0) = iotaPz q. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType L))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (Pdiv.Field.modp (GRing.Field.idomainType F) q p0)) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota q) *) rewrite {2}(divp_eq q p0) rmorphD rmorphM /=. (* Goal: @eq (GRing.Field.sort L) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (Pdiv.Field.modp (GRing.Field.idomainType F) q p0)) (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType L)) (@GRing.mul (GRing.Field.ringType L) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (Pdiv.Field.divp (GRing.Field.idomainType F) q p0)) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota p0)) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (Pdiv.Field.modp (GRing.Field.idomainType F) q p0))) *) by rewrite [iotaPz p0](rootP p0z0) mulr0 add0r. Qed. Definition subfx_mul_rep (x y : 'rV[F]_n) : 'rV[F]_n := poly_rV ((rVpoly x) * (rVpoly y) %% p0). Definition subfext_mul := lift_op2 subFExtend subfx_mul_rep. Fact pi_subfext_mul : {morph \pi : x y / subfx_mul_rep x y >-> subfext_mul x y}. Canonical pi_subfext_mul_morph := PiMorph2 pi_subfext_mul. Definition subfext1 := lift_cst subFExtend (poly_rV 1). Canonical subfext1_morph := PiConst subfext1. Fact mulfxA : associative (subfext_mul). Proof. (* Goal: @associative subFExtend subfext_mul *) elim/quotW=> x; elim/quotW=> y; elim/quotW=> w; rewrite !piE /subfx_mul_rep. (* Goal: @eq subFExtend (@Pi.f (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType (Phant (@quot_sort (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType)) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.Field.ringType F)) (@rVpoly (GRing.Field.ringType F) n x) (@rVpoly (GRing.Field.ringType F) n (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.Field.ringType F)) (@rVpoly (GRing.Field.ringType F) n y) (@rVpoly (GRing.Field.ringType F) n w)) p0)))) p0))) (@Pi.f (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType (Phant (@quot_sort (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType)) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.Field.ringType F)) (@rVpoly (GRing.Field.ringType F) n (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.Field.ringType F)) (@rVpoly (GRing.Field.ringType F) n x) (@rVpoly (GRing.Field.ringType F) n y)) p0))) (@rVpoly (GRing.Field.ringType F) n w)) p0))) *) by rewrite !poly_rV_modp_K [_ %% p0 * _]mulrC !modp_mul // mulrA mulrC. Qed. Fact mulfxC : commutative subfext_mul. Proof. (* Goal: @commutative subFExtend subFExtend subfext_mul *) by elim/quotW=> x; elim/quotW=> y; rewrite !piE /subfx_mul_rep /= mulrC. Qed. Fact mul1fx : left_id subfext1 subfext_mul. Proof. (* Goal: @left_id subFExtend subFExtend subfext1 subfext_mul *) elim/quotW=> x; rewrite !piE /subfx_mul_rep poly_rV_K ?size_poly1 // mul1r. (* Goal: @eq subFExtend (@Pi.f (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType (Phant (@quot_sort (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType)) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@rVpoly (GRing.Field.ringType F) n x) p0))) (@Pi.f (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType (Phant (@quot_sort (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType)) x) *) by rewrite modp_small ?rVpolyK // (polySpred nz_p0) ltnS size_poly. Qed. Fact mulfx_addl : left_distributive subfext_mul subfext_add. Proof. (* Goal: @left_distributive subFExtend subFExtend subfext_mul subfext_add *) elim/quotW=> x; elim/quotW=> y; elim/quotW=> w; rewrite !piE /subfx_mul_rep. (* Goal: @eq subFExtend (@Pi.f (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType (Phant (@quot_sort (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType)) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.Field.ringType F)) (@rVpoly (GRing.Field.ringType F) n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) (S O) n) x y)) (@rVpoly (GRing.Field.ringType F) n w)) p0))) (@Pi.f (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (S O) n)) subFExtend_quotType (Phant (@quot_sort (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (S O) n)) subFExtend_quotType)) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) (S O) n) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.Field.ringType F)) (@rVpoly (GRing.Field.ringType F) n x) (@rVpoly (GRing.Field.ringType F) n w)) p0)) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.Field.ringType F)) (@rVpoly (GRing.Field.ringType F) n y) (@rVpoly (GRing.Field.ringType F) n w)) p0)))) *) by rewrite linearD /= mulrDl modp_add linearD. Qed. Fact nonzero1fx : subfext1 != subfext0. Proof. (* Goal: is_true (negb (@eq_op subFExtend_eqType subfext1 subfext0)) *) rewrite !piE /equiv_subfext /iotaFz !linear0. (* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType L))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@rVpoly (GRing.Field.ringType F) n (@poly_rV (GRing.Field.ringType F) n (GRing.one (poly_ringType (GRing.Field.ringType F)))))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType L))))) *) by rewrite poly_rV_K ?rmorph1 ?oner_eq0 // size_poly1. Qed. Definition subfext_comRingMixin := ComRingMixin mulfxA mulfxC mul1fx mulfx_addl nonzero1fx. Canonical subfext_Ring := Eval hnf in RingType subFExtend subfext_comRingMixin. Canonical subfext_comRing := Eval hnf in ComRingType subFExtend mulfxC. Definition subfx_poly_inv (q : {poly F}) : {poly F} := if iotaPz q == 0 then 0 else let r := gdcop q p0 in let: (u, v) := egcdp q r in ((u * q + v * r)`_0)^-1 *: u. Let subfx_poly_invE q : iotaPz (subfx_poly_inv q) = (iotaPz q)^-1. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType L))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (subfx_poly_inv q)) (@GRing.inv (GRing.Field.unitRingType L) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota q)) *) rewrite /subfx_poly_inv. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType L))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (if @eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType L))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota q) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType L))) then GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))))))) else let 'pair u v := egcdp (GRing.Field.idomainType F) q (gdcop (GRing.Field.idomainType F) q p0) in @GRing.scale (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F)))) (@GRing.inv (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) u q) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) v (gdcop (GRing.Field.idomainType F) q p0)))) O)) u)) (@GRing.inv (GRing.Field.unitRingType L) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota q)) *) have [-> | nzq] := altP eqP; first by rewrite rmorph0 invr0. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType L))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (let 'pair u v := egcdp (GRing.Field.idomainType F) q (gdcop (GRing.Field.idomainType F) q p0) in @GRing.scale (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F)))) (@GRing.inv (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) u q) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) v (gdcop (GRing.Field.idomainType F) q p0)))) O)) u)) (@GRing.inv (GRing.Field.unitRingType L) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota q)) *) rewrite [nth]lock -[_^-1]mul1r; apply: canRL (mulfK nzq) _; rewrite -rmorphM /=. (* Goal: @eq (GRing.Field.sort L) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (poly_lalgType (GRing.Field.ringType F))) (let 'pair u v := egcdp (GRing.Field.idomainType F) q (gdcop (GRing.Field.idomainType F) q p0) in @GRing.scale (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F)))) (@GRing.inv (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F)) (@locked (forall (_ : GRing.Field.sort F) (_ : list (GRing.Field.sort F)) (_ : nat), GRing.Field.sort F) (@nth (GRing.Field.sort F)) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) u q) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) v (gdcop (GRing.Field.idomainType F) q p0)))) O)) u) q)) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType L))) *) have rz0: iotaPz (gdcop q p0) = 0. (* Goal: @eq (GRing.Field.sort L) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (poly_lalgType (GRing.Field.ringType F))) (let 'pair u v := egcdp (GRing.Field.idomainType F) q (gdcop (GRing.Field.idomainType F) q p0) in @GRing.scale (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F)))) (@GRing.inv (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F)) (@locked (forall (_ : GRing.Field.sort F) (_ : list (GRing.Field.sort F)) (_ : nat), GRing.Field.sort F) (@nth (GRing.Field.sort F)) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) u q) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) v (gdcop (GRing.Field.idomainType F) q p0)))) O)) u) q)) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType L))) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType L))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (gdcop (GRing.Field.idomainType F) q p0)) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType L))) *) by apply/rootP; rewrite gdcop_map root_gdco ?map_poly_eq0 // p0z0 nzq. (* Goal: @eq (GRing.Field.sort L) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (poly_lalgType (GRing.Field.ringType F))) (let 'pair u v := egcdp (GRing.Field.idomainType F) q (gdcop (GRing.Field.idomainType F) q p0) in @GRing.scale (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) (poly_lmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F)))) (@GRing.inv (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F)) (@locked (forall (_ : GRing.Field.sort F) (_ : list (GRing.Field.sort F)) (_ : nat), GRing.Field.sort F) (@nth (GRing.Field.sort F)) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) u q) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) v (gdcop (GRing.Field.idomainType F) q p0)))) O)) u) q)) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType L))) *) do [case: gdcopP => r _; rewrite (negPf nz_p0) orbF => co_r_q _] in rz0 *. case: (egcdp q r) (egcdpE q r) => u v /=/eqp_size/esym/eqP. rewrite coprimep_size_gcd 1?coprimep_sym // => /size_poly1P[a nz_a Da]. rewrite Da -scalerAl (canRL (addrK _) Da) -lock coefC linearZ linearB /=. by rewrite rmorphM /= rz0 mulr0 subr0 horner_morphC -rmorphM mulVf ?rmorph1. Qed. Qed. Definition subfx_inv_rep (x : 'rV[F]_n) : 'rV[F]_n := poly_rV (subfx_poly_inv (rVpoly x) %% p0). Definition subfext_inv := lift_op1 subFExtend subfx_inv_rep. Fact pi_subfext_inv : {morph \pi : x / subfx_inv_rep x >-> subfext_inv x}. Proof. (* Goal: @morphism_1 (matrix (GRing.Field.sort F) (S O) n) (@quot_sort (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType) (@Pi.f (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType (Phant (@quot_sort (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType))) (fun x : matrix (GRing.Field.sort F) (S O) n => subfx_inv_rep x) (fun x : @quot_sort (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType => subfext_inv x) *) unlock subfext_inv => x /=; apply/eqmodP/eqP; rewrite /iotaFz. (* Goal: @eq (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType L)))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@rVpoly (GRing.Field.ringType F) n (subfx_inv_rep x))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@rVpoly (GRing.Field.ringType F) n (subfx_inv_rep (@Repr.f (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType (@Pi.f (matrix (GRing.Field.sort F) (S O) n) subFExtend_quotType (Phant subFExtend) x))))) *) by rewrite 2!{1}poly_rV_modp_K 2!{1}iotaPz_modp !subfx_poly_invE iotaPz_repr. Qed. Canonical pi_subfext_inv_morph := PiMorph1 pi_subfext_inv. Fact subfx_fieldAxiom : GRing.Field.axiom (subfext_inv : subFExtend -> subFExtend). Proof. (* Goal: @GRing.Field.axiom subfext_Ring (subfext_inv : forall _ : subFExtend, subFExtend) *) elim/quotW=> x; apply: contraNeq; rewrite !piE /equiv_subfext /iotaFz !linear0. (* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType L))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@rVpoly (GRing.Field.ringType F) n (subfx_mul_rep (subfx_inv_rep x) x))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@rVpoly (GRing.Field.ringType F) n (@poly_rV (GRing.Field.ringType F) n (GRing.one (poly_ringType (GRing.Field.ringType F)))))))), is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType L))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@rVpoly (GRing.Field.ringType F) n x)) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType L)))) *) apply: contraR => nz_x; rewrite poly_rV_K ?size_poly1 // !poly_rV_modp_K. (* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType L))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.Field.ringType F)) (Pdiv.Field.modp (GRing.Field.idomainType F) (subfx_poly_inv (@rVpoly (GRing.Field.ringType F) n x)) p0) (@rVpoly (GRing.Field.ringType F) n x)) p0)) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (GRing.one (poly_ringType (GRing.Field.ringType F))))) *) by rewrite iotaPz_modp rmorph1 rmorphM /= iotaPz_modp subfx_poly_invE mulVf. Qed. Fact subfx_inv0 : subfext_inv (0 : subFExtend) = (0 : subFExtend). Proof. (* Goal: @eq subFExtend (subfext_inv (GRing.zero subfext_zmodType : subFExtend)) (GRing.zero subfext_zmodType : subFExtend) *) apply/eqP; rewrite !piE /equiv_subfext /iotaFz /subfx_inv_rep !linear0. (* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType L))) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@rVpoly (GRing.Field.ringType F) n (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (subfx_poly_inv (GRing.zero (poly_zmodType (GRing.Field.ringType F)))) p0)))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType L)))) *) by rewrite /subfx_poly_inv rmorph0 eqxx mod0p !linear0. Qed. Definition subfext_unitRingMixin := FieldUnitMixin subfx_fieldAxiom subfx_inv0. Canonical subfext_unitRingType := Eval hnf in UnitRingType subFExtend subfext_unitRingMixin. Canonical subfext_comUnitRing := Eval hnf in [comUnitRingType of subFExtend]. Definition subfext_fieldMixin := @FieldMixin _ _ subfx_fieldAxiom subfx_inv0. Definition subfext_idomainMixin := FieldIdomainMixin subfext_fieldMixin. Canonical subfext_idomainType := Eval hnf in IdomainType subFExtend subfext_idomainMixin. Canonical subfext_fieldType := Eval hnf in FieldType subFExtend subfext_fieldMixin. Fact subfx_inj_is_rmorphism : rmorphism subfx_inj. Proof. (* Goal: @GRing.RMorphism.class_of subfext_Ring (GRing.Field.ringType L) subfx_inj *) do 2?split; last by rewrite piE /iotaFz poly_rV_K ?rmorph1 ?size_poly1. (* Goal: @morphism_2 (GRing.Ring.sort subfext_Ring) (GRing.Ring.sort (GRing.Field.ringType L)) subfx_inj (fun x y : GRing.Ring.sort subfext_Ring => @GRing.mul subfext_Ring x y) (fun x y : GRing.Ring.sort (GRing.Field.ringType L) => @GRing.mul (GRing.Field.ringType L) x y) *) (* Goal: @GRing.Additive.axiom (GRing.Ring.zmodType subfext_Ring) (GRing.Ring.zmodType (GRing.Field.ringType L)) subfx_inj *) by elim/quotW=> x; elim/quotW=> y; rewrite !piE /iotaFz linearB rmorphB. (* Goal: @morphism_2 (GRing.Ring.sort subfext_Ring) (GRing.Ring.sort (GRing.Field.ringType L)) subfx_inj (fun x y : GRing.Ring.sort subfext_Ring => @GRing.mul subfext_Ring x y) (fun x y : GRing.Ring.sort (GRing.Field.ringType L) => @GRing.mul (GRing.Field.ringType L) x y) *) elim/quotW=> x; elim/quotW=> y; rewrite !piE /subfx_mul_rep /iotaFz. (* Goal: @eq (GRing.Ring.sort (GRing.Field.ringType L)) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@rVpoly (GRing.Field.ringType F) n (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.Field.ringType F)) (@rVpoly (GRing.Field.ringType F) n x) (@rVpoly (GRing.Field.ringType F) n y)) p0)))) (@GRing.mul (GRing.Field.ringType L) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@rVpoly (GRing.Field.ringType F) n x)) (@horner_morph (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) z0 z0Ciota (@rVpoly (GRing.Field.ringType F) n y))) *) by rewrite poly_rV_modp_K iotaPz_modp rmorphM. Qed. Canonical subfx_inj_additive := Additive subfx_inj_is_rmorphism. Canonical subfx_inj_rmorphism := RMorphism subfx_inj_is_rmorphism. Definition subfx_eval := lift_embed subFExtend (fun q => poly_rV (q %% p0)). Canonical subfx_eval_morph := PiEmbed subfx_eval. Definition subfx_root := subfx_eval 'X. Lemma subfx_eval_is_rmorphism : rmorphism subfx_eval. Proof. (* Goal: @GRing.RMorphism.class_of (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) subfext_Ring subfx_eval *) do 2?split=> [x y|] /=; apply/eqP; rewrite piE. (* Goal: is_true (equiv_subfext (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) p0)) (@poly_rV (GRing.Field.ringType F) n (GRing.one (poly_ringType (GRing.Field.ringType F))))) *) (* Goal: is_true (equiv_subfext (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) x y) p0)) (subfx_mul_rep (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) x p0)) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) y p0)))) *) (* Goal: is_true (equiv_subfext (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) x (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) y)) p0)) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) (S O) n) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) x p0)) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) (S O) n) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) y p0))))) *) - (* Goal: is_true (equiv_subfext (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) p0)) (@poly_rV (GRing.Field.ringType F) n (GRing.one (poly_ringType (GRing.Field.ringType F))))) *) (* Goal: is_true (equiv_subfext (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) x y) p0)) (subfx_mul_rep (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) x p0)) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) y p0)))) *) (* Goal: is_true (equiv_subfext (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) x (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) y)) p0)) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) (S O) n) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) x p0)) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) (S O) n) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) y p0))))) *) by rewrite -linearB modp_add modNp. (* Goal: is_true (equiv_subfext (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) p0)) (@poly_rV (GRing.Field.ringType F) n (GRing.one (poly_ringType (GRing.Field.ringType F))))) *) (* Goal: is_true (equiv_subfext (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) x y) p0)) (subfx_mul_rep (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) x p0)) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) y p0)))) *) - (* Goal: is_true (equiv_subfext (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) p0)) (@poly_rV (GRing.Field.ringType F) n (GRing.one (poly_ringType (GRing.Field.ringType F))))) *) (* Goal: is_true (equiv_subfext (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) x y) p0)) (subfx_mul_rep (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) x p0)) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) y p0)))) *) by rewrite /subfx_mul_rep !poly_rV_modp_K !(modp_mul, mulrC _ y). (* Goal: is_true (equiv_subfext (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) p0)) (@poly_rV (GRing.Field.ringType F) n (GRing.one (poly_ringType (GRing.Field.ringType F))))) *) by rewrite modp_small // size_poly1 -subn_gt0 subn1. Qed. Canonical subfx_eval_additive := Additive subfx_eval_is_rmorphism. Canonical subfx_eval_rmorphism := AddRMorphism subfx_eval_is_rmorphism. Definition inj_subfx := (subfx_eval \o polyC). Canonical inj_subfx_addidive := [additive of inj_subfx]. Canonical inj_subfx_rmorphism := [rmorphism of inj_subfx]. Lemma subfxE x: exists p, x = subfx_eval p. Proof. (* Goal: @ex (@poly_of (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) (Phant (GRing.IntegralDomain.sort (GRing.Field.idomainType F)))) (fun p : @poly_of (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) (Phant (GRing.IntegralDomain.sort (GRing.Field.idomainType F))) => @eq subFExtend x (subfx_eval p)) *) elim/quotW: x => x; exists (rVpoly x); apply/eqP; rewrite piE /equiv_subfext. (* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType L))) (iotaFz x) (iotaFz (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) n (Pdiv.Field.modp (GRing.Field.idomainType F) (@rVpoly (GRing.Field.ringType F) n x) p0)))) *) by rewrite /iotaFz poly_rV_modp_K iotaPz_modp. Qed. Definition subfx_scale a x := inj_subfx a * x. Fact subfx_scalerA a b x : subfx_scale a (subfx_scale b x) = subfx_scale (a * b) x. Proof. (* Goal: @eq (GRing.Ring.sort subfext_Ring) (subfx_scale a (subfx_scale b x)) (subfx_scale (@GRing.mul (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) a b) x) *) by rewrite /subfx_scale rmorphM mulrA. Qed. Fact subfx_scaler1r : left_id 1 subfx_scale. Proof. (* Goal: @left_id (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) (GRing.Ring.sort subfext_Ring) (GRing.one (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) subfx_scale *) by move=> x; rewrite /subfx_scale rmorph1 mul1r. Qed. Fact subfx_scalerDr : right_distributive subfx_scale +%R. Proof. (* Goal: @right_distributive (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) (GRing.Ring.sort subfext_Ring) subfx_scale (@GRing.add (GRing.Ring.zmodType subfext_Ring)) *) by move=> a; apply: mulrDr. Qed. Fact subfx_scalerDl x : {morph subfx_scale^~ x : a b / a + b}. Proof. (* Goal: @morphism_2 (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) (GRing.Ring.sort subfext_Ring) (fun x0 : GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) => subfx_scale x0 x) (fun a b : GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) => @GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) a b) (fun a b : GRing.Ring.sort subfext_Ring => @GRing.add (GRing.Ring.zmodType subfext_Ring) a b) *) by move=> a b; rewrite /subfx_scale rmorphD mulrDl. Qed. Definition subfx_lmodMixin := LmodMixin subfx_scalerA subfx_scaler1r subfx_scalerDr subfx_scalerDl. Canonical subfx_lmodType := LmodType F subFExtend subfx_lmodMixin. Fact subfx_scaleAl : GRing.Lalgebra.axiom ( *%R : subFExtend -> _). Proof. (* Goal: @GRing.Lalgebra.axiom (GRing.Field.ringType F) subfx_lmodType (@GRing.mul subfext_Ring : forall (_ : subFExtend) (_ : GRing.Ring.sort subfext_Ring), GRing.Ring.sort subfext_Ring) *) by move=> a; apply: mulrA. Qed. Canonical subfx_lalgType := LalgType F subFExtend subfx_scaleAl. Fact subfx_scaleAr : GRing.Algebra.axiom subfx_lalgType. Proof. (* Goal: @GRing.Algebra.axiom (GRing.Field.ringType F) subfx_lalgType *) by move=> a; apply: mulrCA. Qed. Canonical subfx_algType := AlgType F subFExtend subfx_scaleAr. Canonical subfext_unitAlgType := [unitAlgType F of subFExtend]. Fact subfx_evalZ : scalable subfx_eval. Proof. (* Goal: @GRing.Linear.mixin_of (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) (poly_lmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) subfx_lmodType) (@GRing.Lmodule.base (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) subfx_lmodType) (@GRing.Lmodule.class (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))) subfx_lmodType))) (@GRing.scale (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) subfx_lmodType) subfx_eval *) by move=> a q; rewrite -mul_polyC rmorphM. Qed. Canonical subfx_eval_linear := AddLinear subfx_evalZ. Canonical subfx_eval_lrmorphism := [lrmorphism of subfx_eval]. Hypothesis (pz0 : root p^iota z). Section NonZero. Hypothesis nz_p : p != 0. Lemma subfx_inj_eval q : subfx_inj (subfx_eval q) = q^iota.[z]. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType L))) (subfx_inj (subfx_eval q)) (@horner (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q) z) *) by rewrite piE /iotaFz poly_rV_modp_K iotaPz_modp /iotaPz /z0 /wf_p nz_p pz0. Qed. Lemma subfx_inj_root : subfx_inj subfx_root = z. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType L))) (subfx_inj subfx_root) z *) by rewrite subfx_inj_eval // map_polyX hornerX. Qed. Lemma subfx_injZ b x : subfx_inj (b *: x) = iota b * subfx_inj x. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType L))) (subfx_inj (@GRing.scale (GRing.Field.ringType F) subfx_lmodType b x)) (@GRing.mul (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota b) (subfx_inj x)) *) by rewrite rmorphM /= subfx_inj_eval // map_polyC hornerC. Qed. Lemma subfx_inj_base b : subfx_inj b%:A = iota b. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType L))) (subfx_inj (@GRing.scale (GRing.Field.ringType F) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) subfx_lalgType) b (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) subfx_lalgType)))) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota b) *) by rewrite subfx_injZ rmorph1 mulr1. Qed. Lemma subfxEroot x : {q | x = (map_poly (in_alg subFExtend) q).[subfx_root]}. Lemma subfx_irreducibleP : (forall q, root q^iota z -> q != 0 -> size p <= size q) <-> irreducible_poly p. Proof. (* Goal: iff (forall (q : @poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (_ : is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q) z)) (_ : is_true (negb (@eq_op (poly_eqType (GRing.Field.ringType F)) q (GRing.zero (poly_zmodType (GRing.Field.ringType F)))))), is_true (leq (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) q)))) (irreducible_poly (GRing.Field.idomainType F) p) *) split=> [min_p | irr_p q qz0 nz_q]. (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) q))) *) (* Goal: irreducible_poly (GRing.Field.idomainType F) p *) split=> [|q nonC_q q_dv_p]. (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) q))) *) (* Goal: is_true (@eqp (GRing.Field.idomainType F) q p) *) (* Goal: is_true (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) p))) *) by rewrite -(size_map_poly iota) (root_size_gt1 _ pz0) ?map_poly_eq0. (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) q))) *) (* Goal: is_true (@eqp (GRing.Field.idomainType F) q p) *) have /dvdpP[r Dp] := q_dv_p; rewrite -dvdp_size_eqp // eqn_leq dvdp_leq //=. (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) q))) *) (* Goal: is_true (leq (@size (GRing.Field.sort F) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) p)) (@size (GRing.Field.sort F) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) q))) *) have [nz_r nz_q]: r != 0 /\ q != 0 by apply/norP; rewrite -mulf_eq0 -Dp. (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) q))) *) (* Goal: is_true (leq (@size (GRing.Field.sort F) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) p)) (@size (GRing.Field.sort F) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) q))) *) have: root r^iota z || root q^iota z by rewrite -rootM -rmorphM -Dp. (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) q))) *) (* Goal: forall _ : is_true (orb (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) r) z) (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q) z)), is_true (leq (@size (GRing.Field.sort F) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) p)) (@size (GRing.Field.sort F) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) q))) *) case/orP=> /min_p; [case/(_ _)/idPn=> // | exact]. (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) q))) *) (* Goal: is_true (negb (leq (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) r)))) *) rewrite polySpred // -leqNgt Dp size_mul //= polySpred // -subn2 ltn_subRL. (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) q))) *) (* Goal: is_true (leq (S (addn (S (S O)) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) r))))) (addn (S (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) r)))) (@size (GRing.Field.sort F) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) q)))) *) by rewrite addSnnS addnC ltn_add2l ltn_neqAle eq_sym nonC_q size_poly_gt0. (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) q))) *) pose r := gcdp p q; have nz_r: r != 0 by rewrite gcdp_eq0 (negPf nz_p). (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) q))) *) suffices /eqp_size <-: r %= p by rewrite dvdp_leq ?dvdp_gcdr. (* Goal: is_true (Pdiv.Field.eqp (GRing.Field.idomainType F) r p) *) rewrite (irr_p _) ?dvdp_gcdl // -(size_map_poly iota) gtn_eqF //. (* Goal: is_true (leq (S (S O)) (@size (GRing.Ring.sort (GRing.Field.ringType L)) (@polyseq (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort (GRing.Field.ringType L))) iota) r)))) *) by rewrite (@root_size_gt1 _ z) ?map_poly_eq0 // gcdp_map root_gcd pz0. Qed. Lemma min_subfx_vectAxiom : Vector.axiom (size p).-1 subfx_lmodType. Proof. (* Goal: @Vector.axiom_def (GRing.Field.ringType F) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p))) subfx_lmodType (Phant (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) subfx_lmodType)) *) move/subfx_irreducibleP: irr_p => /=/(_ nz_p) min_p; set d := (size p).-1. (* Goal: @Vector.axiom_def (GRing.Field.ringType F) d subfx_lmodType (Phant subFExtend) *) have Dd: d.+1 = size p by rewrite polySpred. (* Goal: @Vector.axiom_def (GRing.Field.ringType F) d subfx_lmodType (Phant subFExtend) *) pose Fz2v x : 'rV_d := poly_rV (sval (sig_eqW (subfxE x)) %% p). (* Goal: @Vector.axiom_def (GRing.Field.ringType F) d subfx_lmodType (Phant subFExtend) *) pose vFz : 'rV_d -> subFExtend := subfx_eval \o rVpoly. (* Goal: @Vector.axiom_def (GRing.Field.ringType F) d subfx_lmodType (Phant subFExtend) *) have FLinj: injective subfx_inj by apply: fmorph_inj. (* Goal: @Vector.axiom_def (GRing.Field.ringType F) d subfx_lmodType (Phant subFExtend) *) have Fz2vK: cancel Fz2v vFz. (* Goal: @Vector.axiom_def (GRing.Field.ringType F) d subfx_lmodType (Phant subFExtend) *) (* Goal: @cancel (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))))) (S O) d) subFExtend Fz2v vFz *) move=> x; rewrite /vFz /Fz2v; case: (sig_eqW _) => /= q ->. (* Goal: @Vector.axiom_def (GRing.Field.ringType F) d subfx_lmodType (Phant subFExtend) *) (* Goal: @eq subFExtend (subfx_eval (@rVpoly (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) d (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) d (Pdiv.Field.modp (GRing.Field.idomainType F) q p)))) (subfx_eval q) *) apply: FLinj; rewrite !subfx_inj_eval // {2}(divp_eq q p) rmorphD rmorphM /=. (* Goal: @Vector.axiom_def (GRing.Field.ringType F) d subfx_lmodType (Phant subFExtend) *) (* Goal: @eq (GRing.Field.sort L) (@horner (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) (@rVpoly (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) d (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) d (Pdiv.Field.modp (GRing.Field.idomainType F) q p)))) z) (@horner (GRing.Field.ringType L) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType L))) (@GRing.mul (poly_ringType (GRing.Field.ringType L)) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) (Pdiv.Field.divp (GRing.Field.idomainType F) q p)) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) p)) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) (Pdiv.Field.modp (GRing.Field.idomainType F) q p))) z) *) by rewrite !hornerE (eqP pz0) mulr0 add0r poly_rV_K // -ltnS Dd ltn_modpN0. (* Goal: @Vector.axiom_def (GRing.Field.ringType F) d subfx_lmodType (Phant subFExtend) *) suffices vFzK: cancel vFz Fz2v. (* Goal: @cancel subFExtend (matrix (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) (S O) d) vFz Fz2v *) (* Goal: @Vector.axiom_def (GRing.Field.ringType F) d subfx_lmodType (Phant subFExtend) *) by exists Fz2v; [apply: can2_linear Fz2vK | exists vFz]. (* Goal: @cancel subFExtend (matrix (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) (S O) d) vFz Fz2v *) apply: inj_can_sym Fz2vK _ => v1 v2 /(congr1 subfx_inj)/eqP. (* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType L))) (subfx_inj (vFz v1)) (subfx_inj (vFz v2))), @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))))) (S O) d) v1 v2 *) rewrite -subr_eq0 -!raddfB /= subfx_inj_eval // => /min_p/implyP. (* Goal: forall _ : is_true (implb (negb (@eq_op (poly_eqType (GRing.Field.ringType F)) (@rVpoly (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) d (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) (S O) d) v1 (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) (S O) d) v2))) (GRing.zero (poly_zmodType (GRing.Field.ringType F))))) (leq (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) (@rVpoly (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) d (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) (S O) d) v1 (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType F))) (S O) d) v2))))))), @eq (matrix (GRing.Field.sort F) (S O) d) v1 v2 *) rewrite leqNgt implybNN -Dd ltnS size_poly linearB subr_eq0 /=. (* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (poly_zmodType (GRing.Field.ringType F))) (@rVpoly (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) d v1) (@rVpoly (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) d v2)), @eq (matrix (GRing.Field.sort F) (S O) d) v1 v2 *) by move/eqP/(can_inj rVpolyK). Qed. Definition SubfxVectMixin := VectMixin min_subfx_vectAxiom. Definition SubfxVectType := VectType F subFExtend SubfxVectMixin. Definition SubfxFalgType := Eval simpl in [FalgType F of SubfxVectType]. Definition SubFieldExtType := Eval simpl in [fieldExtType F of SubfxFalgType]. End Irreducible. End SubFieldExtension. Prenex Implicits subfx_inj. Lemma irredp_FAdjoin (F : fieldType) (p : {poly F}) : irreducible_poly p -> {L : fieldExtType F & \dim {:L} = (size p).-1 &
Require Import General. Require Export Relations. Unset Standard Proposition Elimination Names. Section SortsOfV6. Inductive calc : Set := | Pos : calc | Neg : calc. Inductive srt_v6 : Set := | Sprop : calc -> srt_v6 | Stype : nat -> srt_v6. Inductive axiom_v6 : srt_v6 -> srt_v6 -> Prop := | ax_prop : forall (c : calc) (n : nat), axiom_v6 (Sprop c) (Stype n) | ax_type : forall n m : nat, n < m -> axiom_v6 (Stype n) (Stype m). Inductive rules_v6 : srt_v6 -> srt_v6 -> srt_v6 -> Prop := | rule_prop_l : forall (c : calc) (s : srt_v6), rules_v6 (Sprop c) s s | rule_prop_r : forall (c : calc) (s : srt_v6), rules_v6 s (Sprop c) (Sprop c) | rule_type : forall n m p : nat, n <= p -> m <= p -> rules_v6 (Stype n) (Stype m) (Stype p). Inductive univ_v6 : srt_v6 -> srt_v6 -> Prop := | univ_prop : forall (c : calc) (n : nat), univ_v6 (Sprop c) (Stype n) | univ_type : forall n m : nat, n <= m -> univ_v6 (Stype n) (Stype m). Definition univ : srt_v6 -> srt_v6 -> Prop := clos_refl_trans _ univ_v6. Hint Resolve ax_prop ax_type rule_prop_l rule_prop_r rule_type univ_prop univ_type: pts. Hint Unfold univ: pts. Let univ_trans : forall x y z : srt_v6, univ x y -> univ y z -> univ x z. Proof rt_trans srt_v6 univ_v6. Inductive inv_univ : srt_v6 -> srt_v6 -> Prop := | iu_prop : forall c : calc, inv_univ (Sprop c) (Sprop c) | iu_pr_ty : forall (c : calc) (n : nat), inv_univ (Sprop c) (Stype n) | iu_type : forall n m : nat, n <= m -> inv_univ (Stype n) (Stype m). Hint Resolve iu_prop iu_pr_ty iu_type: pts. Lemma inv_univ_trans : forall x y z : srt_v6, inv_univ x y -> inv_univ y z -> inv_univ x z. Proof. (* Goal: forall (x y z : srt_v6) (_ : inv_univ x y) (_ : inv_univ y z), inv_univ x z *) simple induction 1; intros; auto with arith pts. (* Goal: inv_univ (Stype n) z *) (* Goal: inv_univ (Sprop c) z *) inversion_clear H0; auto with arith pts. (* Goal: inv_univ (Stype n) z *) inversion_clear H1. (* Goal: inv_univ (Stype n) (Stype m0) *) apply iu_type. (* Goal: le n m0 *) apply le_trans with m; auto with arith pts. Qed. Lemma univ_inv : forall s s' : srt_v6, univ s s' -> forall P : Prop, (inv_univ s s' -> P) -> P. Proof. (* Goal: forall (s s' : srt_v6) (_ : univ s s') (P : Prop) (_ : forall _ : inv_univ s s', P), P *) simple induction 1. (* Goal: forall (x y z : srt_v6) (_ : clos_refl_trans srt_v6 univ_v6 x y) (_ : forall (P : Prop) (_ : forall _ : inv_univ x y, P), P) (_ : clos_refl_trans srt_v6 univ_v6 y z) (_ : forall (P : Prop) (_ : forall _ : inv_univ y z, P), P) (P : Prop) (_ : forall _ : inv_univ x z, P), P *) (* Goal: forall (x : srt_v6) (P : Prop) (_ : forall _ : inv_univ x x, P), P *) (* Goal: forall (x y : srt_v6) (_ : univ_v6 x y) (P : Prop) (_ : forall _ : inv_univ x y, P), P *) simple induction 1; auto with arith pts. (* Goal: forall (x y z : srt_v6) (_ : clos_refl_trans srt_v6 univ_v6 x y) (_ : forall (P : Prop) (_ : forall _ : inv_univ x y, P), P) (_ : clos_refl_trans srt_v6 univ_v6 y z) (_ : forall (P : Prop) (_ : forall _ : inv_univ y z, P), P) (P : Prop) (_ : forall _ : inv_univ x z, P), P *) (* Goal: forall (x : srt_v6) (P : Prop) (_ : forall _ : inv_univ x x, P), P *) simple destruct x; auto with arith pts. (* Goal: forall (x y z : srt_v6) (_ : clos_refl_trans srt_v6 univ_v6 x y) (_ : forall (P : Prop) (_ : forall _ : inv_univ x y, P), P) (_ : clos_refl_trans srt_v6 univ_v6 y z) (_ : forall (P : Prop) (_ : forall _ : inv_univ y z, P), P) (P : Prop) (_ : forall _ : inv_univ x z, P), P *) intros. (* Goal: P *) apply H4. (* Goal: inv_univ x z *) apply inv_univ_trans with y. (* Goal: inv_univ y z *) (* Goal: inv_univ x y *) apply H1; auto with arith pts. (* Goal: inv_univ y z *) apply H3; auto with arith pts. Qed. Lemma calc_dec : forall c c' : calc, decide (c = c'). Proof. (* Goal: forall c c' : calc, decide (@eq calc c c') *) simple destruct c; simple destruct c'; (right; discriminate) || auto with arith pts. Qed. Lemma v6_sort_dec : forall s s' : srt_v6, decide (s = s'). Proof. (* Goal: forall s s' : srt_v6, decide (@eq srt_v6 s s') *) simple destruct s; simple destruct s'; intros; try (right; discriminate). (* Goal: decide (@eq srt_v6 (Stype n) (Stype n0)) *) (* Goal: decide (@eq srt_v6 (Sprop c) (Sprop c0)) *) elim calc_dec with c c0; intros. (* Goal: decide (@eq srt_v6 (Stype n) (Stype n0)) *) (* Goal: decide (@eq srt_v6 (Sprop c) (Sprop c0)) *) (* Goal: decide (@eq srt_v6 (Sprop c) (Sprop c0)) *) left; elim a; auto with arith pts. (* Goal: decide (@eq srt_v6 (Stype n) (Stype n0)) *) (* Goal: decide (@eq srt_v6 (Sprop c) (Sprop c0)) *) right; red in |- *; intros H; apply b; injection H; auto with arith pts. (* Goal: decide (@eq srt_v6 (Stype n) (Stype n0)) *) elim eq_nat_dec with n n0; intros. (* Goal: decide (@eq srt_v6 (Stype n) (Stype n0)) *) (* Goal: decide (@eq srt_v6 (Stype n) (Stype n0)) *) left; elim a; auto with arith pts. (* Goal: decide (@eq srt_v6 (Stype n) (Stype n0)) *) right; red in |- *; intros H; apply b; injection H; auto with arith pts. Qed. Lemma univ_v6_dec : forall s s' : srt_v6, decide (univ s s'). Proof. (* Goal: forall s s' : srt_v6, decide (univ s s') *) refine (fun s s' : srt_v6 => match s, s' return (decide (univ s s')) with | Sprop c, Sprop c' => _ | Sprop _, Stype _ => left _ _ | Stype n, Stype n' => _ | Stype n, Sprop c => right _ _ end). (* Goal: decide (univ (Stype n) (Stype n')) *) (* Goal: not (univ (Stype n) (Sprop c)) *) (* Goal: univ (Sprop c) (Stype n) *) (* Goal: decide (univ (Sprop c) (Sprop c')) *) case (calc_dec c c'); [ left | right ]. (* Goal: decide (univ (Stype n) (Stype n')) *) (* Goal: not (univ (Stype n) (Sprop c)) *) (* Goal: univ (Sprop c) (Stype n) *) (* Goal: not (univ (Sprop c) (Sprop c')) *) (* Goal: univ (Sprop c) (Sprop c') *) elim e; auto with arith pts. (* Goal: decide (univ (Stype n) (Stype n')) *) (* Goal: not (univ (Stype n) (Sprop c)) *) (* Goal: univ (Sprop c) (Stype n) *) (* Goal: not (univ (Sprop c) (Sprop c')) *) red in |- *; intro; apply n. (* Goal: decide (univ (Stype n) (Stype n')) *) (* Goal: not (univ (Stype n) (Sprop c)) *) (* Goal: univ (Sprop c) (Stype n) *) (* Goal: @eq calc c c' *) apply univ_inv with (Sprop c) (Sprop c'); intros; auto with arith pts. (* Goal: decide (univ (Stype n) (Stype n')) *) (* Goal: not (univ (Stype n) (Sprop c)) *) (* Goal: univ (Sprop c) (Stype n) *) (* Goal: @eq calc c c' *) inversion_clear H0; auto with arith pts. (* Goal: decide (univ (Stype n) (Stype n')) *) (* Goal: not (univ (Stype n) (Sprop c)) *) (* Goal: univ (Sprop c) (Stype n) *) auto with pts. (* Goal: decide (univ (Stype n) (Stype n')) *) (* Goal: not (univ (Stype n) (Sprop c)) *) red in |- *; intros. (* Goal: decide (univ (Stype n) (Stype n')) *) (* Goal: False *) apply univ_inv with (Stype n) (Sprop c); intros; auto with arith pts. (* Goal: decide (univ (Stype n) (Stype n')) *) (* Goal: False *) inversion_clear H0. (* Goal: decide (univ (Stype n) (Stype n')) *) case (le_gt_dec n n'); [ left | right ]. (* Goal: not (univ (Stype n) (Stype n')) *) (* Goal: univ (Stype n) (Stype n') *) auto with pts. (* Goal: not (univ (Stype n) (Stype n')) *) red in |- *; intros. (* Goal: False *) apply univ_inv with (Stype n) (Stype n'); intros; auto with arith pts. (* Goal: False *) inversion_clear H0. (* Goal: False *) absurd (n <= n'); auto with arith pts. Qed. Lemma v6_inf_axiom : forall s : srt_v6, {sp : srt_v6 | ppal (axiom_v6 s) univ sp}. Proof. (* Goal: forall s : srt_v6, @sig srt_v6 (fun sp : srt_v6 => @ppal srt_v6 (axiom_v6 s) univ sp) *) refine (fun s : srt_v6 => match s return {sp : srt_v6 | ppal (axiom_v6 s) univ sp} with | Sprop c => exist _ (Stype 0) _ | Stype n => exist _ (Stype (S n)) _ end). (* Goal: @ppal srt_v6 (axiom_v6 (Stype n)) univ (Stype (S n)) *) (* Goal: @ppal srt_v6 (axiom_v6 (Sprop c)) univ (Stype O) *) split; intros; auto with arith pts. (* Goal: @ppal srt_v6 (axiom_v6 (Stype n)) univ (Stype (S n)) *) (* Goal: univ (Stype O) y *) inversion_clear H; auto with arith pts. (* Goal: @ppal srt_v6 (axiom_v6 (Stype n)) univ (Stype (S n)) *) split; intros; auto with arith pts. (* Goal: univ (Stype (S n)) y *) inversion_clear H; auto with arith pts. Qed. Lemma v6_inf_rule : forall x1 x2 : srt_v6, {x3 : srt_v6 | rules_v6 x1 x2 x3 & forall s1 s2 s3 : srt_v6, rules_v6 s1 s2 s3 -> univ x1 s1 -> univ x2 s2 -> univ x3 s3}. Proof. (* Goal: forall x1 x2 : srt_v6, @sig2 srt_v6 (fun x3 : srt_v6 => rules_v6 x1 x2 x3) (fun x3 : srt_v6 => forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ x1 s1) (_ : univ x2 s2), univ x3 s3) *) refine (fun x1 x2 : srt_v6 => match x1, x2 return {x3 : srt_v6 | rules_v6 x1 x2 x3 & forall s1 s2 s3 : srt_v6, rules_v6 s1 s2 s3 -> univ x1 s1 -> univ x2 s2 -> univ x3 s3} with | Sprop c, _ => exist2 _ _ x2 _ _ | Stype n, Sprop c' => exist2 _ _ (Sprop c') _ _ | Stype n, Stype n' => exist2 _ _ (Stype (max_nat n n')) _ _ end); auto with pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Sprop c') s2), univ (Sprop c') s3 *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Sprop c) s1) (_ : univ x2 s2), univ x2 s3 *) simple induction 1; intros; auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Sprop c') s2), univ (Sprop c') s3 *) (* Goal: univ x2 (Stype p) *) apply univ_trans with (Stype m); auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Sprop c') s2), univ (Sprop c') s3 *) intros. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: univ (Sprop c') s3 *) apply univ_inv with (Sprop c') s2; intros; auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: univ (Sprop c') s3 *) generalize H. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall _ : rules_v6 s1 s2 s3, univ (Sprop c') s3 *) inversion_clear H2; intros. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: univ (Sprop c') s3 *) (* Goal: univ (Sprop c') s3 *) inversion_clear H2; auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: univ (Sprop c') s3 *) apply univ_inv with (Sprop c') s2; intros; auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: univ (Sprop c') s3 *) generalize H. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall _ : rules_v6 s1 s2 s3, univ (Sprop c') s3 *) inversion_clear H3; intros; auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: univ (Sprop c') s3 *) (* Goal: univ (Sprop c') s3 *) inversion_clear H3; auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: univ (Sprop c') s3 *) inversion_clear H3; auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) unfold max_nat in |- *. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (if le_gt_dec n n' then n' else n)) *) elim (le_gt_dec n n'); auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) intros. (* Goal: univ (Stype (max_nat n n')) s3 *) apply univ_inv with (Stype n) s1; intros; auto with arith pts. (* Goal: univ (Stype (max_nat n n')) s3 *) apply univ_inv with (Stype n') s2; intros; auto with arith pts. (* Goal: univ (Stype (max_nat n n')) s3 *) generalize H. (* Goal: forall _ : rules_v6 s1 s2 s3, univ (Stype (max_nat n n')) s3 *) inversion_clear H2. (* Goal: forall _ : rules_v6 (Stype m) s2 s3, univ (Stype (max_nat n n')) s3 *) inversion_clear H3; intros. (* Goal: univ (Stype (max_nat n n')) s3 *) inversion_clear H3. (* Goal: univ (Stype (max_nat n n')) (Stype p) *) cut (max_nat n n' <= p); auto with arith pts. (* Goal: le (max_nat n n') p *) apply least_upper_bound_max_nat. (* Goal: le n' p *) (* Goal: le n p *) apply le_trans with m; auto with arith pts. (* Goal: le n' p *) apply le_trans with m0; auto with arith pts. Qed. End SortsOfV6. Require Export GenericSort. Definition sort_of_gen (gs : gen_sort) : Exc srt_v6 := match gs with | Gprop => value (Sprop Neg) | Gset => value (Sprop Pos) | Gtype n => value (Stype n) | _ => error end. Definition gen_of_sort (s : srt_v6) : gen_sort := match s with | Sprop Neg => Gprop | Sprop Pos => Gset | Stype n => Gtype n end.
Inductive wsort : Set := | ws : wsort | wt : wsort. Inductive TS : wsort -> Set := | var : nat -> TS wt | app : TS wt -> TS wt -> TS wt | lambda : TS wt -> TS wt | env : TS wt -> TS ws -> TS wt | id : TS ws | shift : TS ws | cons : TS wt -> TS ws -> TS ws | comp : TS ws -> TS ws -> TS ws | lift : TS ws -> TS ws | meta_X : nat -> TS wt | meta_x : nat -> TS ws. Definition terms := TS wt. Definition sub_explicits := TS ws. Goal (terms -> Prop) -> forall b : wsort, TS b -> Prop. intros P b; elim b. exact (fun x : TS ws => True). exact P. Defined Pterms. Lemma terms_ind : forall P : terms -> Prop, (forall n : nat, P (var n)) -> (forall a b : terms, P a -> P b -> P (app a b)) -> (forall a : terms, P a -> P (lambda a)) -> (forall a : terms, P a -> forall s : sub_explicits, P (env a s)) -> (forall n : nat, P (meta_X n)) -> forall a : terms, P a. Proof. (* Goal: forall (P : forall _ : terms, Prop) (_ : forall n : nat, P (var n)) (_ : forall (a b : terms) (_ : P a) (_ : P b), P (app a b)) (_ : forall (a : terms) (_ : P a), P (lambda a)) (_ : forall (a : terms) (_ : P a) (s : sub_explicits), P (env a s)) (_ : forall n : nat, P (meta_X n)) (a : terms), P a *) intros; change (Pterms P wt a) in |- *; elim a; simpl in |- *; auto. Qed. Goal (sub_explicits -> Prop) -> forall b : wsort, TS b -> Prop. intros P b; elim b. exact P. exact (fun x : TS wt => True). Defined Psubst. Lemma sub_explicits_ind : forall P : sub_explicits -> Prop, P id -> P shift -> (forall s : sub_explicits, P s -> forall a : terms, P (cons a s)) -> (forall s t : sub_explicits, P s -> P t -> P (comp s t)) -> (forall s : sub_explicits, P s -> P (lift s)) -> (forall n : nat, P (meta_x n)) -> forall s : sub_explicits, P s. Proof. (* Goal: forall (P : forall _ : sub_explicits, Prop) (_ : P id) (_ : P shift) (_ : forall (s : sub_explicits) (_ : P s) (a : terms), P (cons a s)) (_ : forall (s t : sub_explicits) (_ : P s) (_ : P t), P (comp s t)) (_ : forall (s : sub_explicits) (_ : P s), P (lift s)) (_ : forall n : nat, P (meta_x n)) (s : sub_explicits), P s *) intros; change (Psubst P ws s) in |- *; elim s; simpl in |- *; auto. Qed.
Set Implicit Arguments. Unset Strict Implicit. Require Export Monoid_cat. Section Lemmas. Variable E : MONOID. Lemma MONOID_unit_r : forall x : E, Equal (sgroup_law _ x (monoid_unit E)) x. Proof. (* Goal: forall x : Carrier (sgroup_set (monoid_sgroup E)), @Equal (sgroup_set (monoid_sgroup E)) (sgroup_law (monoid_sgroup E) x (@monoid_unit (monoid_sgroup E) (monoid_on_def E))) x *) intros; apply (monoid_unit_r_prf E x). Qed. Lemma MONOID_unit_l : forall x : E, Equal (sgroup_law _ (monoid_unit E) x) x. Proof. (* Goal: forall x : Carrier (sgroup_set (monoid_sgroup E)), @Equal (sgroup_set (monoid_sgroup E)) (sgroup_law (monoid_sgroup E) (@monoid_unit (monoid_sgroup E) (monoid_on_def E)) x) x *) intros; apply (monoid_unit_l_prf E x). Qed. Lemma MONOID_unit_unique : forall e : E, (forall x : E, Equal (sgroup_law _ x e) x) -> (forall x : E, Equal (sgroup_law _ e x) x) -> Equal e (monoid_unit E). Proof. (* Goal: forall (e : Carrier (sgroup_set (monoid_sgroup E))) (_ : forall x : Carrier (sgroup_set (monoid_sgroup E)), @Equal (sgroup_set (monoid_sgroup E)) (sgroup_law (monoid_sgroup E) x e) x) (_ : forall x : Carrier (sgroup_set (monoid_sgroup E)), @Equal (sgroup_set (monoid_sgroup E)) (sgroup_law (monoid_sgroup E) e x) x), @Equal (sgroup_set (monoid_sgroup E)) e (@monoid_unit (monoid_sgroup E) (monoid_on_def E)) *) intros e H' H'0; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup E)) e (@monoid_unit (monoid_sgroup E) (monoid_on_def E)) *) apply Trans with (sgroup_law _ e (monoid_unit E)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup E)) e (sgroup_law (monoid_sgroup E) e (@monoid_unit (monoid_sgroup E) (monoid_on_def E))) *) apply Sym. (* Goal: @Equal (sgroup_set (monoid_sgroup E)) (sgroup_law (monoid_sgroup E) e (@monoid_unit (monoid_sgroup E) (monoid_on_def E))) e *) apply MONOID_unit_r. Qed. Variable F : MONOID. Variable f : Hom E F. Lemma MONOID_hom_prop : Equal (f (monoid_unit E)) (monoid_unit F). Proof. (* Goal: @Equal (sgroup_set (monoid_sgroup F)) (@Ap (sgroup_set (monoid_sgroup E)) (sgroup_set (monoid_sgroup F)) (@sgroup_map (monoid_sgroup E) (monoid_sgroup F) (@monoid_sgroup_hom E F f)) (@monoid_unit (monoid_sgroup E) (monoid_on_def E))) (@monoid_unit (monoid_sgroup F) (monoid_on_def F)) *) apply (monoid_hom_prf f). Qed. End Lemmas. Hint Resolve MONOID_unit_r MONOID_unit_l MONOID_unit_unique MONOID_hom_prop: algebra.
Require Import Ensf. Require Import Max. Require Import Words. Require Import Dec. Definition automate (q qd qa d : Ensf) : Prop := inclus qa q /\ inclus qd q /\ inclus d (prodcart q (prodcart alph q)). Lemma automate_def1 : forall q qd qa d : Ensf, automate q qd qa d -> inclus d (prodcart q (prodcart alph q)). Proof. (* Goal: forall (q qd qa d : Ensf) (_ : automate q qd qa d), inclus d (prodcart q (prodcart alph q)) *) intros q qd qa d H. (* Goal: inclus d (prodcart q (prodcart alph q)) *) elim H. (* Goal: forall (_ : inclus qa q) (_ : and (inclus qd q) (inclus d (prodcart q (prodcart alph q)))), inclus d (prodcart q (prodcart alph q)) *) intros H1 H0; elim H0; clear H0. (* Goal: forall (_ : inclus qd q) (_ : inclus d (prodcart q (prodcart alph q))), inclus d (prodcart q (prodcart alph q)) *) auto. Qed. Lemma automate_def2 : forall q qd qa d : Ensf, automate q qd qa d -> inclus qd q. Proof. (* Goal: forall (q qd qa d : Ensf) (_ : automate q qd qa d), inclus qd q *) intros q qd qa d H. (* Goal: inclus qd q *) elim H. (* Goal: forall (_ : inclus qa q) (_ : and (inclus qd q) (inclus d (prodcart q (prodcart alph q)))), inclus qd q *) intros H1 H0; elim H0; clear H0. (* Goal: forall (_ : inclus qd q) (_ : inclus d (prodcart q (prodcart alph q))), inclus qd q *) auto. Qed. Lemma automate_def3 : forall q qd qa d : Ensf, automate q qd qa d -> inclus qa q. Proof. (* Goal: forall (q qd qa d : Ensf) (_ : automate q qd qa d), inclus qa q *) intros q qd qa d H. (* Goal: inclus qa q *) elim H. (* Goal: forall (_ : inclus qa q) (_ : and (inclus qd q) (inclus d (prodcart q (prodcart alph q)))), inclus qa q *) intros H1 H0; elim H0; clear H0. (* Goal: forall (_ : inclus qd q) (_ : inclus d (prodcart q (prodcart alph q))), inclus qa q *) auto. Qed. Inductive chemin : Elt -> Elt -> Ensf -> Ensf -> Word -> Prop := | chemin_nil : forall (e1 e2 : Elt) (q d : Ensf), dans e1 q -> e1 = e2 :>Elt -> chemin e1 e2 q d nil | chemin_cons : forall (e1 e2 : Elt) (q d : Ensf) (w : Word) (e a : Elt), chemin e1 e2 q d w -> dans e q -> dans a alph -> dans (couple e (couple a e1)) d -> chemin e e2 q d (cons a w). Hint Resolve chemin_nil. Definition Chemin (e1 e2 : Elt) (q d : Ensf) (w : Word) : Prop := match w return Prop with | nil => dans e1 q /\ e1 = e2 :>Elt | cons a w' => exists e : Elt, chemin e e2 q d w' /\ dans e1 q /\ dans a alph /\ dans (couple e1 (couple a e)) d end. Lemma Chemin_chemin : forall (e1 e2 : Elt) (q d : Ensf) (w : Word), Chemin e1 e2 q d w -> chemin e1 e2 q d w. Proof. (* Goal: forall (e1 e2 : Elt) (q d : Ensf) (w : Word) (_ : Chemin e1 e2 q d w), chemin e1 e2 q d w *) intros e1 e2 q d. (* Goal: forall (w : Word) (_ : Chemin e1 e2 q d w), chemin e1 e2 q d w *) simple induction w. (* Goal: forall (e : Elt) (w : Word) (_ : forall _ : Chemin e1 e2 q d w, chemin e1 e2 q d w) (_ : Chemin e1 e2 q d (cons e w)), chemin e1 e2 q d (cons e w) *) (* Goal: forall _ : Chemin e1 e2 q d nil, chemin e1 e2 q d nil *) intro. (* Goal: forall (e : Elt) (w : Word) (_ : forall _ : Chemin e1 e2 q d w, chemin e1 e2 q d w) (_ : Chemin e1 e2 q d (cons e w)), chemin e1 e2 q d (cons e w) *) (* Goal: chemin e1 e2 q d nil *) cut (dans e1 q /\ e1 = e2 :>Elt); auto. (* Goal: forall (e : Elt) (w : Word) (_ : forall _ : Chemin e1 e2 q d w, chemin e1 e2 q d w) (_ : Chemin e1 e2 q d (cons e w)), chemin e1 e2 q d (cons e w) *) (* Goal: forall _ : and (dans e1 q) (@eq Elt e1 e2), chemin e1 e2 q d nil *) intro H0; elim H0; clear H0. (* Goal: forall (e : Elt) (w : Word) (_ : forall _ : Chemin e1 e2 q d w, chemin e1 e2 q d w) (_ : Chemin e1 e2 q d (cons e w)), chemin e1 e2 q d (cons e w) *) (* Goal: forall (_ : dans e1 q) (_ : @eq Elt e1 e2), chemin e1 e2 q d nil *) intros; apply chemin_nil; auto. (* Goal: forall (e : Elt) (w : Word) (_ : forall _ : Chemin e1 e2 q d w, chemin e1 e2 q d w) (_ : Chemin e1 e2 q d (cons e w)), chemin e1 e2 q d (cons e w) *) intros x w0 H H0. (* Goal: chemin e1 e2 q d (cons x w0) *) cut (exists e : Elt, chemin e e2 q d w0 /\ dans e1 q /\ dans x alph /\ dans (couple e1 (couple x e)) d); auto. (* Goal: forall _ : @ex Elt (fun e : Elt => and (chemin e e2 q d w0) (and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x e)) d)))), chemin e1 e2 q d (cons x w0) *) intro H1; elim H1. (* Goal: forall (x0 : Elt) (_ : and (chemin x0 e2 q d w0) (and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x x0)) d)))), chemin e1 e2 q d (cons x w0) *) intros e H2; elim H2; clear H1 H2. (* Goal: forall (_ : chemin e e2 q d w0) (_ : and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x e)) d))), chemin e1 e2 q d (cons x w0) *) intros H1 H2; elim H2; clear H2. (* Goal: forall (_ : dans e1 q) (_ : and (dans x alph) (dans (couple e1 (couple x e)) d)), chemin e1 e2 q d (cons x w0) *) intros H2 H3; elim H3; clear H3. (* Goal: forall (_ : dans x alph) (_ : dans (couple e1 (couple x e)) d), chemin e1 e2 q d (cons x w0) *) intros. (* Goal: chemin e1 e2 q d (cons x w0) *) apply chemin_cons with e; auto. Qed. Hint Resolve Chemin_chemin. Lemma chemin_Chemin : forall (e1 e2 : Elt) (q d : Ensf) (w : Word), chemin e1 e2 q d w -> Chemin e1 e2 q d w. Proof. (* Goal: forall (e1 e2 : Elt) (q d : Ensf) (w : Word) (_ : chemin e1 e2 q d w), Chemin e1 e2 q d w *) intros e1 e2 q d w H; elim H; clear H. (* Goal: forall (e1 e2 : Elt) (q d : Ensf) (w : Word) (e a : Elt) (_ : chemin e1 e2 q d w) (_ : Chemin e1 e2 q d w) (_ : dans e q) (_ : dans a alph) (_ : dans (couple e (couple a e1)) d), Chemin e e2 q d (cons a w) *) (* Goal: forall (e1 e2 : Elt) (q d : Ensf) (_ : dans e1 q) (_ : @eq Elt e1 e2), Chemin e1 e2 q d nil *) intros. (* Goal: forall (e1 e2 : Elt) (q d : Ensf) (w : Word) (e a : Elt) (_ : chemin e1 e2 q d w) (_ : Chemin e1 e2 q d w) (_ : dans e q) (_ : dans a alph) (_ : dans (couple e (couple a e1)) d), Chemin e e2 q d (cons a w) *) (* Goal: Chemin e0 e3 q0 d0 nil *) red in |- *; simpl in |- *; auto. (* Goal: forall (e1 e2 : Elt) (q d : Ensf) (w : Word) (e a : Elt) (_ : chemin e1 e2 q d w) (_ : Chemin e1 e2 q d w) (_ : dans e q) (_ : dans a alph) (_ : dans (couple e (couple a e1)) d), Chemin e e2 q d (cons a w) *) intros. (* Goal: Chemin e e3 q0 d0 (cons a w0) *) red in |- *; simpl in |- *. (* Goal: @ex Elt (fun e0 : Elt => and (chemin e0 e3 q0 d0 w0) (and (dans e q0) (and (dans a alph) (dans (couple e (couple a e0)) d0)))) *) exists e0. (* Goal: and (chemin e0 e3 q0 d0 w0) (and (dans e q0) (and (dans a alph) (dans (couple e (couple a e0)) d0))) *) auto. Qed. Hint Resolve chemin_Chemin. Definition reconnait (q qd qa d : Ensf) (w : Word) : Prop := inmonoid alph w /\ (exists e1 : Elt, (exists e2 : Elt, dans e1 qd /\ dans e2 qa /\ chemin e1 e2 q d w)). Lemma dans_e1_q : forall (q d : Ensf) (w : Word) (e1 e2 : Elt), chemin e1 e2 q d w -> dans e1 q. Proof. (* Goal: forall (q d : Ensf) (w : Word) (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e1 q *) intros q d. (* Goal: forall (w : Word) (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e1 q *) simple induction w. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e1 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e1 q *) (* Goal: forall (e1 e2 : Elt) (_ : chemin e1 e2 q d nil), dans e1 q *) intros. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e1 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e1 q *) (* Goal: dans e1 q *) cut (Chemin e1 e2 q d nil); auto. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e1 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e1 q *) (* Goal: forall _ : Chemin e1 e2 q d nil, dans e1 q *) intro. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e1 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e1 q *) (* Goal: dans e1 q *) cut (dans e1 q /\ e1 = e2 :>Elt); auto. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e1 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e1 q *) (* Goal: forall _ : and (dans e1 q) (@eq Elt e1 e2), dans e1 q *) intro Ht; elim Ht; auto. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e1 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e1 q *) intros x w0 H e1 e2 H0. (* Goal: dans e1 q *) cut (Chemin e1 e2 q d (cons x w0)); auto. (* Goal: forall _ : Chemin e1 e2 q d (cons x w0), dans e1 q *) intro. (* Goal: dans e1 q *) cut (exists e : Elt, chemin e e2 q d w0 /\ dans e1 q /\ dans x alph /\ dans (couple e1 (couple x e)) d); auto. (* Goal: forall _ : @ex Elt (fun e : Elt => and (chemin e e2 q d w0) (and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x e)) d)))), dans e1 q *) intro Ht; elim Ht; clear Ht. (* Goal: forall (x0 : Elt) (_ : and (chemin x0 e2 q d w0) (and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x x0)) d)))), dans e1 q *) intros e Ht; elim Ht; clear Ht. (* Goal: forall (_ : chemin e e2 q d w0) (_ : and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x e)) d))), dans e1 q *) intros H2 Ht; elim Ht; auto. Qed. Lemma dans_e2_q : forall (q d : Ensf) (w : Word) (e1 e2 : Elt), chemin e1 e2 q d w -> dans e2 q. Proof. (* Goal: forall (q d : Ensf) (w : Word) (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e2 q *) intros q d. (* Goal: forall (w : Word) (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e2 q *) simple induction w. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e2 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e2 q *) (* Goal: forall (e1 e2 : Elt) (_ : chemin e1 e2 q d nil), dans e2 q *) intros. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e2 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e2 q *) (* Goal: dans e2 q *) cut (Chemin e1 e2 q d nil); auto. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e2 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e2 q *) (* Goal: forall _ : Chemin e1 e2 q d nil, dans e2 q *) intro. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e2 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e2 q *) (* Goal: dans e2 q *) cut (dans e1 q /\ e1 = e2 :>Elt); auto. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e2 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e2 q *) (* Goal: forall _ : and (dans e1 q) (@eq Elt e1 e2), dans e2 q *) intro Ht; elim Ht; auto. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e2 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e2 q *) (* Goal: forall (_ : dans e1 q) (_ : @eq Elt e1 e2), dans e2 q *) intros. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e2 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e2 q *) (* Goal: dans e2 q *) rewrite <- H2; auto. (* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 e2 : Elt) (_ : chemin e1 e2 q d w), dans e2 q) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), dans e2 q *) intros x w0 H e1 e2 H0. (* Goal: dans e2 q *) cut (Chemin e1 e2 q d (cons x w0)); auto. (* Goal: forall _ : Chemin e1 e2 q d (cons x w0), dans e2 q *) intro. (* Goal: dans e2 q *) cut (exists e : Elt, chemin e e2 q d w0 /\ dans e1 q /\ dans x alph /\ dans (couple e1 (couple x e)) d); auto. (* Goal: forall _ : @ex Elt (fun e : Elt => and (chemin e e2 q d w0) (and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x e)) d)))), dans e2 q *) intro Ht; elim Ht; clear Ht. (* Goal: forall (x0 : Elt) (_ : and (chemin x0 e2 q d w0) (and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x x0)) d)))), dans e2 q *) intros e Ht; elim Ht; clear Ht. (* Goal: forall (_ : chemin e e2 q d w0) (_ : and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x e)) d))), dans e2 q *) intros H2 Ht. (* Goal: dans e2 q *) apply (H e e2); auto. Qed. Lemma Cheminmonoid : forall (w : Word) (q qd qa d : Ensf), automate q qd qa d -> forall e1 e2 : Elt, chemin e1 e2 q d w -> inmonoid alph w. Proof. (* Goal: forall (w : Word) (q qd qa d : Ensf) (_ : automate q qd qa d) (e1 e2 : Elt) (_ : chemin e1 e2 q d w), inmonoid alph w *) simple induction w. (* Goal: forall (e : Elt) (w : Word) (_ : forall (q qd qa d : Ensf) (_ : automate q qd qa d) (e1 e2 : Elt) (_ : chemin e1 e2 q d w), inmonoid alph w) (q qd qa d : Ensf) (_ : automate q qd qa d) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), inmonoid alph (cons e w) *) (* Goal: forall (q qd qa d : Ensf) (_ : automate q qd qa d) (e1 e2 : Elt) (_ : chemin e1 e2 q d nil), inmonoid alph nil *) auto. (* Goal: forall (e : Elt) (w : Word) (_ : forall (q qd qa d : Ensf) (_ : automate q qd qa d) (e1 e2 : Elt) (_ : chemin e1 e2 q d w), inmonoid alph w) (q qd qa d : Ensf) (_ : automate q qd qa d) (e1 e2 : Elt) (_ : chemin e1 e2 q d (cons e w)), inmonoid alph (cons e w) *) intros x w0 H q qd qa d H0 e1 e2 H1. (* Goal: inmonoid alph (cons x w0) *) cut (Chemin e1 e2 q d (cons x w0)); auto. (* Goal: forall _ : Chemin e1 e2 q d (cons x w0), inmonoid alph (cons x w0) *) intro. (* Goal: inmonoid alph (cons x w0) *) cut (exists e : Elt, chemin e e2 q d w0 /\ dans e1 q /\ dans x alph /\ dans (couple e1 (couple x e)) d); auto. (* Goal: forall _ : @ex Elt (fun e : Elt => and (chemin e e2 q d w0) (and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x e)) d)))), inmonoid alph (cons x w0) *) intro H3; elim H3; clear H3. (* Goal: forall (x0 : Elt) (_ : and (chemin x0 e2 q d w0) (and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x x0)) d)))), inmonoid alph (cons x w0) *) intros e H3; elim H3; clear H3. (* Goal: forall (_ : chemin e e2 q d w0) (_ : and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x e)) d))), inmonoid alph (cons x w0) *) intros H3 H4; elim H4; clear H4. (* Goal: forall (_ : dans e1 q) (_ : and (dans x alph) (dans (couple e1 (couple x e)) d)), inmonoid alph (cons x w0) *) intros H4 H5; elim H5; clear H5; intros. (* Goal: inmonoid alph (cons x w0) *) apply inmonoid_cons; auto. (* Goal: inmonoid alph w0 *) apply (H q qd qa d H0 e e2); auto. Qed. Lemma chemin_lettre : forall (e1 e2 x : Elt) (q d : Ensf), dans x alph -> dans e1 q -> dans e2 q -> dans (couple e1 (couple x e2)) d -> chemin e1 e2 q d (cons x nil). Proof. (* Goal: forall (e1 e2 x : Elt) (q d : Ensf) (_ : dans x alph) (_ : dans e1 q) (_ : dans e2 q) (_ : dans (couple e1 (couple x e2)) d), chemin e1 e2 q d (cons x nil) *) intros. (* Goal: chemin e1 e2 q d (cons x nil) *) apply chemin_cons with e2; auto. Qed. Definition automate_A (q qd qa d : Ensf) : Prop := inclus qa q /\ inclus qd q /\ inclus d (prodcart q (prodcart (add epsilon alph) q)). Lemma automate_A_def2 : forall q qd qa d : Ensf, automate_A q qd qa d -> inclus qd q. Proof. (* Goal: forall (q qd qa d : Ensf) (_ : automate_A q qd qa d), inclus qd q *) intros. (* Goal: inclus qd q *) elim H. (* Goal: forall (_ : inclus qa q) (_ : and (inclus qd q) (inclus d (prodcart q (prodcart (add epsilon alph) q)))), inclus qd q *) intros H0 Ht; elim Ht; auto. Qed. Inductive chemin_A (q d : Ensf) : Elt -> Elt -> Word -> Prop := | chemin_A_nil : forall e1 e2 : Elt, dans e1 q -> e1 = e2 :>Elt -> chemin_A q d e1 e2 nil | chemin_A_cons : forall (e1 e e2 x : Elt) (w : Word), chemin_A q d e e2 w -> dans e1 q -> dans x alph -> dans (couple e1 (couple x e)) d -> chemin_A q d e1 e2 (cons x w) | chemin_A_epsilon : forall (e1 e e2 : Elt) (w : Word), chemin_A q d e e2 w -> dans e1 q -> dans (couple e1 (couple epsilon e)) d -> chemin_A q d e1 e2 w. Hint Resolve chemin_A_nil. Definition Chemin_A (q d : Ensf) (e1 e2 : Elt) (w : Word) : Prop := match w return Prop with | nil => dans e1 q /\ e1 = e2 :>Elt \/ (exists e : Elt, chemin_A q d e e2 nil /\ dans e1 q /\ dans (couple e1 (couple epsilon e)) d) | cons a w => (exists e : Elt, chemin_A q d e e2 w /\ dans e1 q /\ dans a alph /\ dans (couple e1 (couple a e)) d) \/ (exists e : Elt, chemin_A q d e e2 w /\ dans e1 q /\ dans (couple e1 (couple epsilon e)) d) end. Lemma chemin_A_d1_d2 : forall (q d1 d2 : Ensf) (w : Word) (e1 e2 : Elt), chemin_A q d1 e1 e2 w -> inclus d1 d2 -> chemin_A q d2 e1 e2 w. Proof. (* Goal: forall (q d1 d2 : Ensf) (w : Word) (e1 e2 : Elt) (_ : chemin_A q d1 e1 e2 w) (_ : inclus d1 d2), chemin_A q d2 e1 e2 w *) intros q d d2 w e1 e2 H. (* Goal: forall _ : inclus d d2, chemin_A q d2 e1 e2 w *) elim H; clear H. (* Goal: forall (e1 e e2 : Elt) (w : Word) (_ : chemin_A q d e e2 w) (_ : forall _ : inclus d d2, chemin_A q d2 e e2 w) (_ : dans e1 q) (_ : dans (couple e1 (couple epsilon e)) d) (_ : inclus d d2), chemin_A q d2 e1 e2 w *) (* Goal: forall (e1 e e2 x : Elt) (w : Word) (_ : chemin_A q d e e2 w) (_ : forall _ : inclus d d2, chemin_A q d2 e e2 w) (_ : dans e1 q) (_ : dans x alph) (_ : dans (couple e1 (couple x e)) d) (_ : inclus d d2), chemin_A q d2 e1 e2 (cons x w) *) (* Goal: forall (e1 e2 : Elt) (_ : dans e1 q) (_ : @eq Elt e1 e2) (_ : inclus d d2), chemin_A q d2 e1 e2 nil *) auto. (* Goal: forall (e1 e e2 : Elt) (w : Word) (_ : chemin_A q d e e2 w) (_ : forall _ : inclus d d2, chemin_A q d2 e e2 w) (_ : dans e1 q) (_ : dans (couple e1 (couple epsilon e)) d) (_ : inclus d d2), chemin_A q d2 e1 e2 w *) (* Goal: forall (e1 e e2 x : Elt) (w : Word) (_ : chemin_A q d e e2 w) (_ : forall _ : inclus d d2, chemin_A q d2 e e2 w) (_ : dans e1 q) (_ : dans x alph) (_ : dans (couple e1 (couple x e)) d) (_ : inclus d d2), chemin_A q d2 e1 e2 (cons x w) *) intros. (* Goal: forall (e1 e e2 : Elt) (w : Word) (_ : chemin_A q d e e2 w) (_ : forall _ : inclus d d2, chemin_A q d2 e e2 w) (_ : dans e1 q) (_ : dans (couple e1 (couple epsilon e)) d) (_ : inclus d d2), chemin_A q d2 e1 e2 w *) (* Goal: chemin_A q d2 e0 e3 (cons x w0) *) apply chemin_A_cons with e; auto. (* Goal: forall (e1 e e2 : Elt) (w : Word) (_ : chemin_A q d e e2 w) (_ : forall _ : inclus d d2, chemin_A q d2 e e2 w) (_ : dans e1 q) (_ : dans (couple e1 (couple epsilon e)) d) (_ : inclus d d2), chemin_A q d2 e1 e2 w *) intros. (* Goal: chemin_A q d2 e0 e3 w0 *) apply chemin_A_epsilon with e; auto. Qed. Lemma chemin_A_q1_q2 : forall (q1 q2 d : Ensf) (e1 e2 : Elt) (w : Word), chemin_A q1 d e1 e2 w -> inclus q1 q2 -> chemin_A q2 d e1 e2 w. Proof. (* Goal: forall (q1 q2 d : Ensf) (e1 e2 : Elt) (w : Word) (_ : chemin_A q1 d e1 e2 w) (_ : inclus q1 q2), chemin_A q2 d e1 e2 w *) intros q1 q2 d w e1 e2 H. (* Goal: forall _ : inclus q1 q2, chemin_A q2 d w e1 e2 *) elim H; clear H. (* Goal: forall (e1 e e2 : Elt) (w : Word) (_ : chemin_A q1 d e e2 w) (_ : forall _ : inclus q1 q2, chemin_A q2 d e e2 w) (_ : dans e1 q1) (_ : dans (couple e1 (couple epsilon e)) d) (_ : inclus q1 q2), chemin_A q2 d e1 e2 w *) (* Goal: forall (e1 e e2 x : Elt) (w : Word) (_ : chemin_A q1 d e e2 w) (_ : forall _ : inclus q1 q2, chemin_A q2 d e e2 w) (_ : dans e1 q1) (_ : dans x alph) (_ : dans (couple e1 (couple x e)) d) (_ : inclus q1 q2), chemin_A q2 d e1 e2 (cons x w) *) (* Goal: forall (e1 e2 : Elt) (_ : dans e1 q1) (_ : @eq Elt e1 e2) (_ : inclus q1 q2), chemin_A q2 d e1 e2 nil *) auto. (* Goal: forall (e1 e e2 : Elt) (w : Word) (_ : chemin_A q1 d e e2 w) (_ : forall _ : inclus q1 q2, chemin_A q2 d e e2 w) (_ : dans e1 q1) (_ : dans (couple e1 (couple epsilon e)) d) (_ : inclus q1 q2), chemin_A q2 d e1 e2 w *) (* Goal: forall (e1 e e2 x : Elt) (w : Word) (_ : chemin_A q1 d e e2 w) (_ : forall _ : inclus q1 q2, chemin_A q2 d e e2 w) (_ : dans e1 q1) (_ : dans x alph) (_ : dans (couple e1 (couple x e)) d) (_ : inclus q1 q2), chemin_A q2 d e1 e2 (cons x w) *) intros. (* Goal: forall (e1 e e2 : Elt) (w : Word) (_ : chemin_A q1 d e e2 w) (_ : forall _ : inclus q1 q2, chemin_A q2 d e e2 w) (_ : dans e1 q1) (_ : dans (couple e1 (couple epsilon e)) d) (_ : inclus q1 q2), chemin_A q2 d e1 e2 w *) (* Goal: chemin_A q2 d e0 e3 (cons x w0) *) apply chemin_A_cons with e; auto. (* Goal: forall (e1 e e2 : Elt) (w : Word) (_ : chemin_A q1 d e e2 w) (_ : forall _ : inclus q1 q2, chemin_A q2 d e e2 w) (_ : dans e1 q1) (_ : dans (couple e1 (couple epsilon e)) d) (_ : inclus q1 q2), chemin_A q2 d e1 e2 w *) intros. (* Goal: chemin_A q2 d e0 e3 w0 *) apply chemin_A_epsilon with e; auto. Qed. Lemma chemin_chemin_A : forall (q d : Ensf) (w : Word) (e1 e2 : Elt), chemin e1 e2 q d w -> chemin_A q d e1 e2 w. Proof. (* Goal: forall (q d : Ensf) (w : Word) (e1 e2 : Elt) (_ : chemin e1 e2 q d w), chemin_A q d e1 e2 w *) intros q d w e1 e2 H. (* Goal: chemin_A q d e1 e2 w *) elim H; clear H. (* Goal: forall (e1 e2 : Elt) (q d : Ensf) (w : Word) (e a : Elt) (_ : chemin e1 e2 q d w) (_ : chemin_A q d e1 e2 w) (_ : dans e q) (_ : dans a alph) (_ : dans (couple e (couple a e1)) d), chemin_A q d e e2 (cons a w) *) (* Goal: forall (e1 e2 : Elt) (q d : Ensf) (_ : dans e1 q) (_ : @eq Elt e1 e2), chemin_A q d e1 e2 nil *) auto. (* Goal: forall (e1 e2 : Elt) (q d : Ensf) (w : Word) (e a : Elt) (_ : chemin e1 e2 q d w) (_ : chemin_A q d e1 e2 w) (_ : dans e q) (_ : dans a alph) (_ : dans (couple e (couple a e1)) d), chemin_A q d e e2 (cons a w) *) intros. (* Goal: chemin_A q0 d0 e e3 (cons a w0) *) apply chemin_A_cons with e0; auto. Qed. Lemma chemin_Append : forall (e1 e e2 : Elt) (q d : Ensf) (w1 w2 : Word), chemin_A q d e1 e w1 -> chemin_A q d e e2 w2 -> chemin_A q d e1 e2 (Append w1 w2). Proof. (* Goal: forall (e1 e e2 : Elt) (q d : Ensf) (w1 w2 : Word) (_ : chemin_A q d e1 e w1) (_ : chemin_A q d e e2 w2), chemin_A q d e1 e2 (Append w1 w2) *) intros e1 e e2 q d w1 w2 H. (* Goal: forall _ : chemin_A q d e e2 w2, chemin_A q d e1 e2 (Append w1 w2) *) elim H. (* Goal: forall (e1 e e3 : Elt) (w : Word) (_ : chemin_A q d e e3 w) (_ : forall _ : chemin_A q d e3 e2 w2, chemin_A q d e e2 (Append w w2)) (_ : dans e1 q) (_ : dans (couple e1 (couple epsilon e)) d) (_ : chemin_A q d e3 e2 w2), chemin_A q d e1 e2 (Append w w2) *) (* Goal: forall (e1 e e3 x : Elt) (w : Word) (_ : chemin_A q d e e3 w) (_ : forall _ : chemin_A q d e3 e2 w2, chemin_A q d e e2 (Append w w2)) (_ : dans e1 q) (_ : dans x alph) (_ : dans (couple e1 (couple x e)) d) (_ : chemin_A q d e3 e2 w2), chemin_A q d e1 e2 (Append (cons x w) w2) *) (* Goal: forall (e1 e3 : Elt) (_ : dans e1 q) (_ : @eq Elt e1 e3) (_ : chemin_A q d e3 e2 w2), chemin_A q d e1 e2 (Append nil w2) *) intros e0 e3 H0 H1 H2. (* Goal: forall (e1 e e3 : Elt) (w : Word) (_ : chemin_A q d e e3 w) (_ : forall _ : chemin_A q d e3 e2 w2, chemin_A q d e e2 (Append w w2)) (_ : dans e1 q) (_ : dans (couple e1 (couple epsilon e)) d) (_ : chemin_A q d e3 e2 w2), chemin_A q d e1 e2 (Append w w2) *) (* Goal: forall (e1 e e3 x : Elt) (w : Word) (_ : chemin_A q d e e3 w) (_ : forall _ : chemin_A q d e3 e2 w2, chemin_A q d e e2 (Append w w2)) (_ : dans e1 q) (_ : dans x alph) (_ : dans (couple e1 (couple x e)) d) (_ : chemin_A q d e3 e2 w2), chemin_A q d e1 e2 (Append (cons x w) w2) *) (* Goal: chemin_A q d e0 e2 (Append nil w2) *) simpl in |- *; rewrite H1; auto. (* Goal: forall (e1 e e3 : Elt) (w : Word) (_ : chemin_A q d e e3 w) (_ : forall _ : chemin_A q d e3 e2 w2, chemin_A q d e e2 (Append w w2)) (_ : dans e1 q) (_ : dans (couple e1 (couple epsilon e)) d) (_ : chemin_A q d e3 e2 w2), chemin_A q d e1 e2 (Append w w2) *) (* Goal: forall (e1 e e3 x : Elt) (w : Word) (_ : chemin_A q d e e3 w) (_ : forall _ : chemin_A q d e3 e2 w2, chemin_A q d e e2 (Append w w2)) (_ : dans e1 q) (_ : dans x alph) (_ : dans (couple e1 (couple x e)) d) (_ : chemin_A q d e3 e2 w2), chemin_A q d e1 e2 (Append (cons x w) w2) *) intros. (* Goal: forall (e1 e e3 : Elt) (w : Word) (_ : chemin_A q d e e3 w) (_ : forall _ : chemin_A q d e3 e2 w2, chemin_A q d e e2 (Append w w2)) (_ : dans e1 q) (_ : dans (couple e1 (couple epsilon e)) d) (_ : chemin_A q d e3 e2 w2), chemin_A q d e1 e2 (Append w w2) *) (* Goal: chemin_A q d e0 e2 (Append (cons x w) w2) *) simpl in |- *. (* Goal: forall (e1 e e3 : Elt) (w : Word) (_ : chemin_A q d e e3 w) (_ : forall _ : chemin_A q d e3 e2 w2, chemin_A q d e e2 (Append w w2)) (_ : dans e1 q) (_ : dans (couple e1 (couple epsilon e)) d) (_ : chemin_A q d e3 e2 w2), chemin_A q d e1 e2 (Append w w2) *) (* Goal: chemin_A q d e0 e2 (cons x (Append w w2)) *) cut (chemin_A q d e3 e2 (Append w w2)); auto. (* Goal: forall (e1 e e3 : Elt) (w : Word) (_ : chemin_A q d e e3 w) (_ : forall _ : chemin_A q d e3 e2 w2, chemin_A q d e e2 (Append w w2)) (_ : dans e1 q) (_ : dans (couple e1 (couple epsilon e)) d) (_ : chemin_A q d e3 e2 w2), chemin_A q d e1 e2 (Append w w2) *) (* Goal: forall _ : chemin_A q d e3 e2 (Append w w2), chemin_A q d e0 e2 (cons x (Append w w2)) *) intro. (* Goal: forall (e1 e e3 : Elt) (w : Word) (_ : chemin_A q d e e3 w) (_ : forall _ : chemin_A q d e3 e2 w2, chemin_A q d e e2 (Append w w2)) (_ : dans e1 q) (_ : dans (couple e1 (couple epsilon e)) d) (_ : chemin_A q d e3 e2 w2), chemin_A q d e1 e2 (Append w w2) *) (* Goal: chemin_A q d e0 e2 (cons x (Append w w2)) *) apply chemin_A_cons with e3; auto. (* Goal: forall (e1 e e3 : Elt) (w : Word) (_ : chemin_A q d e e3 w) (_ : forall _ : chemin_A q d e3 e2 w2, chemin_A q d e e2 (Append w w2)) (_ : dans e1 q) (_ : dans (couple e1 (couple epsilon e)) d) (_ : chemin_A q d e3 e2 w2), chemin_A q d e1 e2 (Append w w2) *) intros. (* Goal: chemin_A q d e0 e2 (Append w w2) *) cut (chemin_A q d e3 e2 (Append w w2)); auto. (* Goal: forall _ : chemin_A q d e3 e2 (Append w w2), chemin_A q d e0 e2 (Append w w2) *) intro. (* Goal: chemin_A q d e0 e2 (Append w w2) *) apply chemin_A_epsilon with e3; auto. Qed. Lemma dansA_e1_q : forall (q d : Ensf) (w : Word) (e1 e2 : Elt), chemin_A q d e1 e2 w -> dans e1 q. Proof. (* Goal: forall (q d : Ensf) (w : Word) (e1 e2 : Elt) (_ : chemin_A q d e1 e2 w), dans e1 q *) intros. (* Goal: dans e1 q *) elim H; auto. Qed. Lemma dansA_e2_q : forall (q d : Ensf) (w : Word) (e1 e2 : Elt), chemin_A q d e1 e2 w -> dans e2 q. Proof. (* Goal: forall (q d : Ensf) (w : Word) (e1 e2 : Elt) (_ : chemin_A q d e1 e2 w), dans e2 q *) intros. (* Goal: dans e2 q *) elim H; auto. (* Goal: forall (e1 e2 : Elt) (_ : dans e1 q) (_ : @eq Elt e1 e2), dans e2 q *) intros e0 e3 H0 H1. (* Goal: dans e3 q *) rewrite <- H1. (* Goal: dans e0 q *) assumption. Qed. Lemma cheminA_monoid : forall (w : Word) (q qd qaA dA : Ensf), automate_A q qd qaA dA -> forall e1 e2 : Elt, chemin_A q dA e1 e2 w -> inmonoid alph w. Proof. (* Goal: forall (w : Word) (q qd qaA dA : Ensf) (_ : automate_A q qd qaA dA) (e1 e2 : Elt) (_ : chemin_A q dA e1 e2 w), inmonoid alph w *) intros. (* Goal: inmonoid alph w *) elim H0; auto. Qed. Definition reconnait_A (q qd qa d : Ensf) (w : Word) : Prop := inmonoid alph w /\ (exists e1 : Elt, (exists e2 : Elt, dans e1 qd /\ dans e2 qa /\ chemin_A q d e1 e2 w)). Definition est_dans_d2 (q dA : Ensf) (e y : Elt) : Prop := match y return Prop with | natural n => False | couple a e' => chemin_A q dA e e' (cons a nil) | up e => False | word w => False end. Definition est_dans_d (q dA : Ensf) (x : Elt) : Prop := match x return Prop with | natural n => False | couple e y => est_dans_d2 q dA e y | up e => False | word w => False end. Definition sync_d (q dA : Ensf) : Ensf := tq (est_dans_d q dA) (prodcart q (prodcart alph q)). Definition sync_qa (q qaA dA : Ensf) : Ensf := union qaA (tq (fun e : Elt => exists e' : Elt, dans e' qaA /\ chemin_A q dA e e' nil) q). Hint Unfold sync_qa. Lemma inclus_qaA_qa : forall q qaA dA : Ensf, inclus qaA (sync_qa q qaA dA). Proof. (* Goal: forall q qaA dA : Ensf, inclus qaA (sync_qa q qaA dA) *) unfold sync_qa in |- *. (* Goal: forall q qaA dA : Ensf, inclus qaA (union qaA (tq (fun e : Elt => @ex Elt (fun e' : Elt => and (dans e' qaA) (chemin_A q dA e e' nil))) q)) *) auto. Qed. Lemma nouvx_dans_qa : forall (q qaA dA : Ensf) (e : Elt), dans e q -> (exists e' : Elt, dans e' qaA /\ chemin_A q dA e e' nil) -> dans e (sync_qa q qaA dA). Proof. (* Goal: forall (q qaA dA : Ensf) (e : Elt) (_ : dans e q) (_ : @ex Elt (fun e' : Elt => and (dans e' qaA) (chemin_A q dA e e' nil))), dans e (sync_qa q qaA dA) *) intros. (* Goal: dans e (sync_qa q qaA dA) *) elim H0; clear H0. (* Goal: forall (x : Elt) (_ : and (dans x qaA) (chemin_A q dA e x nil)), dans e (sync_qa q qaA dA) *) intros e' Ht; elim Ht; clear Ht. (* Goal: forall (_ : dans e' qaA) (_ : chemin_A q dA e e' nil), dans e (sync_qa q qaA dA) *) intros H0 H1. (* Goal: dans e (sync_qa q qaA dA) *) unfold sync_qa in |- *. (* Goal: dans e (union qaA (tq (fun e : Elt => @ex Elt (fun e' : Elt => and (dans e' qaA) (chemin_A q dA e e' nil))) q)) *) apply union_d. (* Goal: dans e (tq (fun e : Elt => @ex Elt (fun e' : Elt => and (dans e' qaA) (chemin_A q dA e e' nil))) q) *) apply imp_dans_tq; auto. (* Goal: @ex Elt (fun e' : Elt => and (dans e' qaA) (chemin_A q dA e e' nil)) *) exists e'; auto. Qed. Lemma sync_d_def : forall (e1 e2 x : Elt) (q dA : Ensf), dans x alph -> chemin_A q dA e1 e2 (cons x nil) -> dans (couple e1 (couple x e2)) (sync_d q dA). Proof. (* Goal: forall (e1 e2 x : Elt) (q dA : Ensf) (_ : dans x alph) (_ : chemin_A q dA e1 e2 (cons x nil)), dans (couple e1 (couple x e2)) (sync_d q dA) *) intros. (* Goal: dans (couple e1 (couple x e2)) (sync_d q dA) *) unfold sync_d in |- *. (* Goal: dans (couple e1 (couple x e2)) (tq (est_dans_d q dA) (prodcart q (prodcart alph q))) *) apply imp_dans_tq; auto. (* Goal: dans (couple e1 (couple x e2)) (prodcart q (prodcart alph q)) *) apply coupl2_inv. (* Goal: dans (couple x e2) (prodcart alph q) *) (* Goal: dans e1 q *) apply (dansA_e1_q q dA (cons x nil) e1 e2); auto. (* Goal: dans (couple x e2) (prodcart alph q) *) apply coupl2_inv; auto. (* Goal: dans e2 q *) apply (dansA_e2_q q dA (cons x nil) e1 e2); auto. Qed. Lemma sync_d_def2 : forall (e1 e2 x : Elt) (q dA : Ensf), dans x alph -> dans (couple e1 (couple x e2)) (sync_d q dA) -> chemin_A q dA e1 e2 (cons x nil). Lemma trans_dA_d : forall (q dA : Ensf) (e0 e x : Elt), dans e0 q -> dans x alph -> dans e q -> dans (couple e0 (couple x e)) dA -> dans (couple e0 (couple x e)) (sync_d q dA). Proof. (* Goal: forall (q dA : Ensf) (e0 e x : Elt) (_ : dans e0 q) (_ : dans x alph) (_ : dans e q) (_ : dans (couple e0 (couple x e)) dA), dans (couple e0 (couple x e)) (sync_d q dA) *) intros. (* Goal: dans (couple e0 (couple x e)) (sync_d q dA) *) cut (chemin_A q dA e0 e (cons x nil)). (* Goal: chemin_A q dA e0 e (cons x nil) *) (* Goal: forall _ : chemin_A q dA e0 e (cons x nil), dans (couple e0 (couple x e)) (sync_d q dA) *) intro. (* Goal: chemin_A q dA e0 e (cons x nil) *) (* Goal: dans (couple e0 (couple x e)) (sync_d q dA) *) unfold sync_d in |- *. (* Goal: chemin_A q dA e0 e (cons x nil) *) (* Goal: dans (couple e0 (couple x e)) (tq (est_dans_d q dA) (prodcart q (prodcart alph q))) *) apply imp_dans_tq; auto. (* Goal: chemin_A q dA e0 e (cons x nil) *) cut (chemin_A q dA e e nil); auto. (* Goal: forall _ : chemin_A q dA e e nil, chemin_A q dA e0 e (cons x nil) *) intro. (* Goal: chemin_A q dA e0 e (cons x nil) *) apply chemin_A_cons with e; auto. Qed. Lemma automateA_automate : forall q qd qaA dA : Ensf, automate_A q qd qaA dA -> automate q qd (sync_qa q qaA dA) (sync_d q dA). Proof. (* Goal: forall (q qd qaA dA : Ensf) (_ : automate_A q qd qaA dA), automate q qd (sync_qa q qaA dA) (sync_d q dA) *) intros. (* Goal: automate q qd (sync_qa q qaA dA) (sync_d q dA) *) elim H. (* Goal: forall (_ : inclus qaA q) (_ : and (inclus qd q) (inclus dA (prodcart q (prodcart (add epsilon alph) q)))), automate q qd (sync_qa q qaA dA) (sync_d q dA) *) intros H1 H2; elim H2; clear H2; intros H2 H3. (* Goal: automate q qd (sync_qa q qaA dA) (sync_d q dA) *) red in |- *. (* Goal: and (inclus (sync_qa q qaA dA) q) (and (inclus qd q) (inclus (sync_d q dA) (prodcart q (prodcart alph q)))) *) split. (* Goal: and (inclus qd q) (inclus (sync_d q dA) (prodcart q (prodcart alph q))) *) (* Goal: inclus (sync_qa q qaA dA) q *) unfold sync_qa in |- *. (* Goal: and (inclus qd q) (inclus (sync_d q dA) (prodcart q (prodcart alph q))) *) (* Goal: inclus (union qaA (tq (fun e : Elt => @ex Elt (fun e' : Elt => and (dans e' qaA) (chemin_A q dA e e' nil))) q)) q *) apply union_inclus; auto. (* Goal: and (inclus qd q) (inclus (sync_d q dA) (prodcart q (prodcart alph q))) *) (* Goal: inclus (tq (fun e : Elt => @ex Elt (fun e' : Elt => and (dans e' qaA) (chemin_A q dA e e' nil))) q) q *) apply inclus_tq. (* Goal: and (inclus qd q) (inclus (sync_d q dA) (prodcart q (prodcart alph q))) *) split; auto. (* Goal: inclus (sync_d q dA) (prodcart q (prodcart alph q)) *) unfold sync_d in |- *. (* Goal: inclus (tq (est_dans_d q dA) (prodcart q (prodcart alph q))) (prodcart q (prodcart alph q)) *) apply inclus_tq. Qed. Lemma epsilon_chemin : forall (q qaA dA : Ensf) (w : Word) (e1 e e2 : Elt), chemin e e2 q (sync_d q dA) w -> dans (couple e1 (couple epsilon e)) dA -> dans e2 (sync_qa q qaA dA) -> dans e1 q -> exists e2' : Elt, chemin e1 e2' q (sync_d q dA) w /\ dans e2' (sync_qa q qaA dA). Lemma cheminA_chemin : forall q qd qaA dA : Ensf, automate_A q qd qaA dA -> forall (w : Word) (e1 e2 : Elt), chemin_A q dA e1 e2 w -> dans e2 qaA -> exists e2' : Elt, chemin e1 e2' q (sync_d q dA) w /\ dans e2' (sync_qa q qaA dA). Lemma reconnaitA_reconnait : forall (q qd qaA dA : Ensf) (w : Word), automate_A q qd qaA dA -> reconnait_A q qd qaA dA w -> reconnait q qd (sync_qa q qaA dA) (sync_d q dA) w. Lemma chemin_cheminA : forall q qd qaA dA : Ensf, automate_A q qd qaA dA -> forall (w : Word) (e1 e2 : Elt), chemin e1 e2 q (sync_d q dA) w -> chemin_A q dA e1 e2 w. Lemma reconnait_reconnaitA : forall (q qd qaA dA : Ensf) (w : Word), automate_A q qd qaA dA -> reconnait q qd (sync_qa q qaA dA) (sync_d q dA) w -> reconnait_A q qd qaA dA w. Lemma async_is_sync : forall q qd qaA dA : Ensf, automate_A q qd qaA dA -> exists d : Ensf, (exists qa : Ensf, automate q qd qa d /\ eqwordset (reconnait_A q qd qaA dA) (reconnait q qd qa d)). Proof. (* Goal: forall (q qd qaA dA : Ensf) (_ : automate_A q qd qaA dA), @ex Ensf (fun d : Ensf => @ex Ensf (fun qa : Ensf => and (automate q qd qa d) (eqwordset (reconnait_A q qd qaA dA) (reconnait q qd qa d)))) *) intros q qd qaA dA H. (* Goal: @ex Ensf (fun d : Ensf => @ex Ensf (fun qa : Ensf => and (automate q qd qa d) (eqwordset (reconnait_A q qd qaA dA) (reconnait q qd qa d)))) *) exists (sync_d q dA). (* Goal: @ex Ensf (fun qa : Ensf => and (automate q qd qa (sync_d q dA)) (eqwordset (reconnait_A q qd qaA dA) (reconnait q qd qa (sync_d q dA)))) *) exists (sync_qa q qaA dA). (* Goal: and (automate q qd (sync_qa q qaA dA) (sync_d q dA)) (eqwordset (reconnait_A q qd qaA dA) (reconnait q qd (sync_qa q qaA dA) (sync_d q dA))) *) split. (* Goal: eqwordset (reconnait_A q qd qaA dA) (reconnait q qd (sync_qa q qaA dA) (sync_d q dA)) *) (* Goal: automate q qd (sync_qa q qaA dA) (sync_d q dA) *) apply automateA_automate; auto. (* Goal: eqwordset (reconnait_A q qd qaA dA) (reconnait q qd (sync_qa q qaA dA) (sync_d q dA)) *) unfold eqwordset in |- *. (* Goal: forall w : Word, and (forall _ : reconnait_A q qd qaA dA w, reconnait q qd (sync_qa q qaA dA) (sync_d q dA) w) (forall _ : reconnait q qd (sync_qa q qaA dA) (sync_d q dA) w, reconnait_A q qd qaA dA w) *) split. (* Goal: forall _ : reconnait q qd (sync_qa q qaA dA) (sync_d q dA) w, reconnait_A q qd qaA dA w *) (* Goal: forall _ : reconnait_A q qd qaA dA w, reconnait q qd (sync_qa q qaA dA) (sync_d q dA) w *) intro. (* Goal: forall _ : reconnait q qd (sync_qa q qaA dA) (sync_d q dA) w, reconnait_A q qd qaA dA w *) (* Goal: reconnait q qd (sync_qa q qaA dA) (sync_d q dA) w *) apply reconnaitA_reconnait; auto. (* Goal: forall _ : reconnait q qd (sync_qa q qaA dA) (sync_d q dA) w, reconnait_A q qd qaA dA w *) intro. (* Goal: reconnait_A q qd qaA dA w *) apply reconnait_reconnaitA; auto. Qed. Lemma Recislang : forall q qd qa d : Ensf, automate q qd qa d -> islanguage alph (reconnait q qd qa d). Proof. (* Goal: forall (q qd qa d : Ensf) (_ : automate q qd qa d), islanguage alph (reconnait q qd qa d) *) intros. (* Goal: islanguage alph (reconnait q qd qa d) *) unfold islanguage at 1 in |- *. (* Goal: forall (w : Word) (_ : reconnait q qd qa d w), inmonoid alph w *) intro. (* Goal: forall _ : reconnait q qd qa d w, inmonoid alph w *) unfold reconnait at 1 in |- *. (* Goal: forall _ : and (inmonoid alph w) (@ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 qd) (and (dans e2 qa) (chemin e1 e2 q d w))))), inmonoid alph w *) intro. (* Goal: inmonoid alph w *) elim H0. (* Goal: forall (_ : inmonoid alph w) (_ : @ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 qd) (and (dans e2 qa) (chemin e1 e2 q d w))))), inmonoid alph w *) intros. (* Goal: inmonoid alph w *) assumption. Qed. Definition isregular (l : wordset) : Prop := exists q : Ensf, (exists qd : Ensf, (exists qa : Ensf, (exists d : Ensf, automate q qd qa d /\ eqwordset (reconnait q qd qa d) l))). Definition isregular_A (l : wordset) : Prop := exists q : Ensf, (exists qd : Ensf, (exists qa : Ensf, (exists d : Ensf, automate_A q qd qa d /\ eqwordset (reconnait_A q qd qa d) l))). Lemma isregular_A_isregular : forall l : wordset, isregular_A l -> isregular l. Definition isregular_D (l : wordset) : Prop := exists q : Ensf, (exists g0 : Elt, (exists qa : Ensf, (exists d : Ensf, automate q (singleton g0) qa d /\ (forall w : Word, chemin g0 g0 q d w -> w = nil :>Word) /\ eqwordset (reconnait q (singleton g0) qa d) l))). Definition transition_D (g0 x : Elt) : Elt := couple g0 (couple epsilon x). Definition delta_D (g0 : Elt) (qd : Ensf) : Ensf := map (transition_D g0) qd. Lemma automate_A_D : forall (q qd qa d : Ensf) (g0 : Elt), automate q qd qa d -> automate_A (add g0 q) (singleton g0) qa (union d (delta_D g0 qd)). Lemma chemin_D_chemin : forall (q qd qa d : Ensf) (g0 e e2 : Elt) (w : Word), automate q qd qa d -> ~ dans g0 q -> chemin_A (add g0 q) (union d (delta_D g0 qd)) e e2 w -> dans e q -> chemin e e2 q d w. Lemma chemin_A_g0_e2 : forall (q qd qa d : Ensf) (g0 e1 e2 : Elt) (w : Word), automate q qd qa d -> ~ dans g0 q -> chemin_A (add g0 q) (union d (delta_D g0 qd)) e1 e2 w -> e1 = g0 :>Elt -> dans e2 qa -> exists e : Elt, dans e qd /\ chemin_A (add g0 q) (union d (delta_D g0 qd)) e e2 w. Lemma chemin_A_e1_g0_abs : forall (q qd qa d : Ensf) (g0 e e2 : Elt) (w : Word), automate q qd qa d -> dans e q -> ~ dans g0 q -> e2 = g0 :>Elt -> ~ chemin_A (add g0 q) (union d (delta_D g0 qd)) e e2 w. Lemma chemin_A_e1_g0 : forall (q qd qa d : Ensf) (g0 e1 e2 : Elt) (w : Word), automate q qd qa d -> ~ dans g0 q -> chemin_A (add g0 q) (union d (delta_D g0 qd)) e1 e2 w -> e2 = g0 :>Elt -> w = nil :>Word. Lemma isregular_isregular_D_1 : forall (q qd qa d : Ensf) (g0 : Elt), automate q qd qa d -> ~ dans g0 q -> eqwordset (reconnait q qd qa d) (reconnait_A (add g0 q) (singleton g0) qa (union d (delta_D g0 qd))) /\ (forall w : Word, chemin_A (add g0 q) (union d (delta_D g0 qd)) g0 g0 w -> w = nil :>Word). Lemma isregular_isregular_D : forall l : wordset, isregular l -> isregular_D l.
Require Export GeoCoq.Elements.OriginalProofs.lemma_ray5. Section Euclid. Context `{Ax1:euclidean_neutral_ruler_compass}. Lemma lemma_supplementsymmetric : forall A B C D E, Supp A B C E D -> Supp D B E C A. Proof. (* Goal: forall (A B C D E : @Point Ax) (_ : @Supp Ax A B C E D), @Supp Ax D B E C A *) intros. (* Goal: @Supp Ax D B E C A *) assert ((Out B C E /\ BetS A B D)) by (conclude_def Supp ). (* Goal: @Supp Ax D B E C A *) assert (BetS D B A) by (conclude axiom_betweennesssymmetry). (* Goal: @Supp Ax D B E C A *) assert (Out B E C) by (conclude lemma_ray5). (* Goal: @Supp Ax D B E C A *) assert (Supp D B E C A) by (conclude_def Supp ). (* Goal: @Supp Ax D B E C A *) close. Qed. End Euclid.
Inductive Ensf : Set := | empty : Ensf | add : Elt -> Ensf -> Ensf with Elt : Set := | natural : nat -> Elt | couple : Elt -> Elt -> Elt | up : Ensf -> Elt | word : Word -> Elt with Word : Set := | nil : Word | cons : Elt -> Word -> Word. Definition natural_inv (e : Elt) : nat := match e with | natural n => n | _ => 0 end. Lemma nat_invol : forall n : nat, natural_inv (natural n) = n. Proof. (* Goal: forall n : nat, @eq nat (natural_inv (natural n)) n *) auto. Qed. Definition word_inv (e : Elt) : Word := match e with | word w => w | _ => nil end. Lemma add_add : forall (a b : Elt) (c d : Ensf), a = b -> c = d -> add a c = add b d. Proof. (* Goal: forall (a b : Elt) (c d : Ensf) (_ : @eq Elt a b) (_ : @eq Ensf c d), @eq Ensf (add a c) (add b d) *) intros. (* Goal: @eq Ensf (add a c) (add b d) *) rewrite H. (* Goal: @eq Ensf (add b c) (add b d) *) rewrite H0. (* Goal: @eq Ensf (add b d) (add b d) *) trivial. Qed. Hint Resolve add_add. Lemma couple_couple : forall a b c d : Elt, a = b -> c = d -> couple a c = couple b d. Proof. (* Goal: forall (a b c d : Elt) (_ : @eq Elt a b) (_ : @eq Elt c d), @eq Elt (couple a c) (couple b d) *) intros. (* Goal: @eq Elt (couple a c) (couple b d) *) rewrite H. (* Goal: @eq Elt (couple b c) (couple b d) *) rewrite H0. (* Goal: @eq Elt (couple b d) (couple b d) *) trivial. Qed. Lemma word_word : forall a b : Word, a = b -> word a = word b. Proof. (* Goal: forall (a b : Word) (_ : @eq Word a b), @eq Elt (word a) (word b) *) intros. (* Goal: @eq Elt (word a) (word b) *) apply (f_equal (A:=Word) (B:=Elt)); auto. Qed. Hint Resolve word_word. Lemma word_word_inv : forall a b : Word, word a = word b -> a = b. Proof. (* Goal: forall (a b : Word) (_ : @eq Elt (word a) (word b)), @eq Word a b *) intros a b H. (* Goal: @eq Word a b *) injection H. (* Goal: forall _ : @eq Word a b, @eq Word a b *) trivial. Qed. Definition zero : Elt := natural 0. Definition un : Elt := natural 1. Definition singleton (e : Elt) : Ensf := add e empty. Lemma False_imp_P : forall P : Prop, False -> P. Proof. (* Goal: forall (P : Prop) (_ : False), P *) intros. (* Goal: P *) elimtype False. (* Goal: False *) assumption. Qed. Lemma equal_add : forall (a b : Ensf) (e : Elt), a = b -> add e a = add e b. Proof. (* Goal: forall (a b : Ensf) (e : Elt) (_ : @eq Ensf a b), @eq Ensf (add e a) (add e b) *) intros. (* Goal: @eq Ensf (add e a) (add e b) *) apply (f_equal (A:=Ensf) (B:=Ensf)); auto. Qed.
Require Import syntax. Definition valu (v : vari) := match v return nat with | x n => n end. Goal forall m n : nat, x m = x n :>vari -> m = n :>nat. intros m n Q. replace m with (valu (x m)). rewrite Q. simpl in |- *; reflexivity. simpl in |- *; reflexivity. Save vari_nat. Definition Rator_ty (t : ty) := match t with | nat_ty => t | bool_ty => t | arr t0 _ => t0 end. Definition Rand_ty (t : ty) := match t with | nat_ty => t | bool_ty => t | arr _ t0 => t0 end. Goal forall s1 t1 s2 t2 : ty, arr s1 t1 = arr s2 t2 :>ty -> s1 = s2 :>ty /\ t1 = t2 :>ty. intros s1 t1 s2 t2 Q. split. change (Rator_ty (arr s1 t1) = Rator_ty (arr s2 t2) :>ty) in |- *. apply (f_equal Rator_ty). assumption. change (Rand_ty (arr s1 t1) = Rand_ty (arr s2 t2) :>ty) in |- *. apply (f_equal Rand_ty); assumption. Save subty_eq. Definition is_nat (t : ty) := match t with | nat_ty => True | bool_ty => False | arr _ _ => False end. Definition is_bool (t : ty) := match t with | nat_ty => False | bool_ty => True | arr _ _ => False end. Definition is_arr (t : ty) := match t with | nat_ty => False | bool_ty => False | arr _ _ => True end. Goal nat_ty <> bool_ty :>ty. red in |- *; intro H; change (is_nat bool_ty) in |- *; elim H; exact I. Save nat_not_bool. Goal forall t s : ty, nat_ty <> arr t s :>ty. red in |- *; intros t s H; change (is_nat (arr t s)) in |- *; elim H; exact I. Save nat_not_arr. Goal forall t s : ty, bool_ty <> arr t s :>ty. red in |- *; intros t s H; change (is_bool (arr t s)) in |- *; elim H; exact I. Save bool_not_arr. Goal forall m n : nat, m = n \/ m <> n. simple induction m. simple induction n. left; reflexivity. intros; right; apply O_S. intros y H n; elim n. right; red in |- *; intro; apply (O_S y); symmetry in |- *; assumption. intros y0 I. elim (H y0); intro E. left; elim E; reflexivity. right; red in |- *; intro. apply E; apply eq_add_S; assumption. Save Xmidnat. Goal forall v w : vari, v = w \/ v <> w. simple induction v. simple induction w. intro. specialize (Xmidnat n n0). simple induction 1. intro eq; left; elim eq; reflexivity. intro neq; right; red in |- *; intro; apply neq. apply vari_nat; assumption. Save Xmidvar. Goal forall A B C : Prop, (IF A then B else C) -> A -> B. unfold IF_then_else in |- *; simple induction 1. simple induction 1; intros; assumption. simple induction 1; intros; absurd A; assumption. Save If_T. Goal forall A B C : Prop, (IF A then B else C) -> ~ A -> C. unfold IF_then_else in |- *; simple induction 1. simple induction 1; intros; absurd A; assumption. simple induction 1; intros; assumption. Save If_F. Goal forall A B C : Prop, A -> B -> IF A then B else C. unfold IF_then_else in |- *; intros. left; split; assumption. Save T_If. Goal forall A B C : Prop, ~ A -> C -> IF A then B else C. unfold IF_then_else in |- *; intros. right; split; assumption. Save F_If. Goal forall A B C D : Prop, (IF A then B else C) -> IF A then B else (IF A then D else C). unfold IF_then_else in |- *; simple induction 1. intro T; left; assumption. intro F; right; elim F; intros; split. assumption. right; split; assumption. Save IfA_IfAIfA. Goal forall A B C D : Prop, A \/ D /\ C -> (D -> A \/ B) -> A \/ B /\ C. intros A B C D A1 A2. elim A1. intro; left; assumption. simple induction 1; intros DH CH. specialize A2 with (1 := DH); induction A2. left; assumption. right; split; assumption. Save AABC_ABC.
Require Import List. Import ListNotations. Require Import StructTact.StructTactics. Set Implicit Arguments. Section assoc. Variable K V : Type. Variable K_eq_dec : forall k k' : K, {k = k'} + {k <> k'}. Fixpoint assoc (l : list (K * V)) (k : K) : option V := match l with | [] => None | (k', v) :: l' => if K_eq_dec k k' then Some v else assoc l' k end. Definition assoc_default (l : list (K * V)) (k : K) (default : V) : V := match (assoc l k) with | Some x => x | None => default end. Fixpoint assoc_set (l : list (K * V)) (k : K) (v : V) : list (K * V) := match l with | [] => [(k, v)] | (k', v') :: l' => if K_eq_dec k k' then (k, v) :: l' else (k', v') :: (assoc_set l' k v) end. Fixpoint assoc_del (l : list (K * V)) (k : K) : list (K * V) := match l with | [] => [] | (k', v') :: l' => if K_eq_dec k k' then assoc_del l' k else (k', v') :: (assoc_del l' k) end. Lemma get_set_same : forall k v l, assoc (assoc_set l k v) k = Some v. Proof. (* Goal: forall (k : K) (v : V) (l : list (prod K V)), @eq (option V) (assoc (assoc_set l k v) k) (@Some V v) *) induction l; intros; simpl; repeat (break_match; simpl); subst; congruence. Qed. Lemma get_set_same' : forall k k' v l, k = k' -> assoc (assoc_set l k v) k' = Some v. Proof. (* Goal: forall (k k' : K) (v : V) (l : list (prod K V)) (_ : @eq K k k'), @eq (option V) (assoc (assoc_set l k v) k') (@Some V v) *) intros. (* Goal: @eq (option V) (assoc (assoc_set l k v) k') (@Some V v) *) subst. (* Goal: @eq (option V) (assoc (assoc_set l k' v) k') (@Some V v) *) auto using get_set_same. Qed. Lemma get_set_diff : forall k k' v l, k <> k' -> assoc (assoc_set l k v) k' = assoc l k'. Proof. (* Goal: forall (k k' : K) (v : V) (l : list (prod K V)) (_ : not (@eq K k k')), @eq (option V) (assoc (assoc_set l k v) k') (assoc l k') *) induction l; intros; simpl; repeat (break_match; simpl); subst; try congruence; auto. Qed. Lemma not_in_assoc : forall k l, ~ In k (map (@fst _ _) l) -> assoc l k = None. Proof. (* Goal: forall (k : K) (l : list (prod K V)) (_ : not (@In K k (@map (prod K V) K (@fst K V) l))), @eq (option V) (assoc l k) (@None V) *) intros. (* Goal: @eq (option V) (assoc l k) (@None V) *) induction l. (* Goal: @eq (option V) (assoc (@cons (prod K V) a l) k) (@None V) *) (* Goal: @eq (option V) (assoc (@nil (prod K V)) k) (@None V) *) - (* Goal: @eq (option V) (assoc (@nil (prod K V)) k) (@None V) *) auto. (* BG Goal: @eq (option V) (assoc (@cons (prod K V) a l) k) (@None V) *) - (* Goal: @eq (option V) (assoc (@cons (prod K V) a l) k) (@None V) *) simpl in *. (* Goal: @eq (option V) (let (k', v) := a in if K_eq_dec k k' then @Some V v else assoc l k) (@None V) *) repeat break_match; intuition. (* Goal: @eq (option V) (@Some V v) (@None V) *) subst. (* Goal: @eq (option V) (@Some V v) (@None V) *) simpl in *. (* Goal: @eq (option V) (@Some V v) (@None V) *) congruence. Qed. Lemma get_del_same : forall k l, assoc (assoc_del l k) k = None. Proof. (* Goal: forall (k : K) (l : list (prod K V)), @eq (option V) (assoc (assoc_del l k) k) (@None V) *) induction l; intros; simpl in *. (* Goal: @eq (option V) (assoc (let (k', v') := a in if K_eq_dec k k' then assoc_del l k else @cons (prod K V) (@pair K V k' v') (assoc_del l k)) k) (@None V) *) (* Goal: @eq (option V) (@None V) (@None V) *) - (* Goal: @eq (option V) (@None V) (@None V) *) auto. (* BG Goal: @eq (option V) (assoc (let (k', v') := a in if K_eq_dec k k' then assoc_del l k else @cons (prod K V) (@pair K V k' v') (assoc_del l k)) k) (@None V) *) - (* Goal: @eq (option V) (assoc (let (k', v') := a in if K_eq_dec k k' then assoc_del l k else @cons (prod K V) (@pair K V k' v') (assoc_del l k)) k) (@None V) *) repeat break_match; subst; simpl in *; auto. (* Goal: @eq (option V) (if K_eq_dec k k0 then @Some V v else assoc (assoc_del l k) k) (@None V) *) break_if; try congruence. Qed. Lemma get_del_diff : forall k k' l, k <> k' -> assoc (assoc_del l k') k = assoc l k. Proof. (* Goal: forall (k k' : K) (l : list (prod K V)) (_ : not (@eq K k k')), @eq (option V) (assoc (assoc_del l k') k) (assoc l k) *) induction l; intros; simpl in *. (* Goal: @eq (option V) (assoc (let (k'0, v') := a in if K_eq_dec k' k'0 then assoc_del l k' else @cons (prod K V) (@pair K V k'0 v') (assoc_del l k')) k) (let (k', v) := a in if K_eq_dec k k' then @Some V v else assoc l k) *) (* Goal: @eq (option V) (@None V) (@None V) *) - (* Goal: @eq (option V) (@None V) (@None V) *) auto. (* BG Goal: @eq (option V) (assoc (let (k'0, v') := a in if K_eq_dec k' k'0 then assoc_del l k' else @cons (prod K V) (@pair K V k'0 v') (assoc_del l k')) k) (let (k', v) := a in if K_eq_dec k k' then @Some V v else assoc l k) *) - (* Goal: @eq (option V) (assoc (let (k'0, v') := a in if K_eq_dec k' k'0 then assoc_del l k' else @cons (prod K V) (@pair K V k'0 v') (assoc_del l k')) k) (let (k', v) := a in if K_eq_dec k k' then @Some V v else assoc l k) *) repeat (break_match; simpl); subst; try congruence; auto. Qed. Lemma get_set_diff_default : forall (k k' : K) (v : V) l d, k <> k' -> assoc_default (assoc_set l k v) k' d = assoc_default l k' d. Proof. (* Goal: forall (k k' : K) (v : V) (l : list (prod K V)) (d : V) (_ : not (@eq K k k')), @eq V (assoc_default (assoc_set l k v) k' d) (assoc_default l k' d) *) unfold assoc_default. (* Goal: forall (k k' : K) (v : V) (l : list (prod K V)) (d : V) (_ : not (@eq K k k')), @eq V match assoc (assoc_set l k v) k' with | Some x => x | None => d end match assoc l k' with | Some x => x | None => d end *) intros. (* Goal: @eq V match assoc (assoc_set l k v) k' with | Some x => x | None => d end match assoc l k' with | Some x => x | None => d end *) repeat break_match; auto; rewrite get_set_diff in * by auto; congruence. Qed. Lemma get_set_same_default : forall (k : K) (v : V) l d, assoc_default (assoc_set l k v) k d = v. Proof. (* Goal: forall (k : K) (v : V) (l : list (prod K V)) (d : V), @eq V (assoc_default (assoc_set l k v) k d) v *) unfold assoc_default. (* Goal: forall (k : K) (v : V) (l : list (prod K V)) (d : V), @eq V match assoc (assoc_set l k v) k with | Some x => x | None => d end v *) intros. (* Goal: @eq V match assoc (assoc_set l k v) k with | Some x => x | None => d end v *) repeat break_match; auto; rewrite get_set_same in *; congruence. Qed. Lemma assoc_assoc_default: forall l k (v : V) d, assoc l k = Some v -> assoc_default l k d = v. Proof. (* Goal: forall (l : list (prod K V)) (k : K) (v d : V) (_ : @eq (option V) (assoc l k) (@Some V v)), @eq V (assoc_default l k d) v *) intros. (* Goal: @eq V (assoc_default l k d) v *) unfold assoc_default. (* Goal: @eq V match assoc l k with | Some x => x | None => d end v *) break_match; congruence. Qed. Lemma assoc_assoc_default_missing: forall (l : list (K * V)) k d, assoc l k = None -> assoc_default l k d = d. Proof. (* Goal: forall (l : list (prod K V)) (k : K) (d : V) (_ : @eq (option V) (assoc l k) (@None V)), @eq V (assoc_default l k d) d *) intros. (* Goal: @eq V (assoc_default l k d) d *) unfold assoc_default. (* Goal: @eq V match assoc l k with | Some x => x | None => d end d *) break_match; congruence. Qed. Lemma assoc_set_same : forall (l : list (K * V)) k v, assoc l k = Some v -> assoc_set l k v = l. Proof. (* Goal: forall (l : list (prod K V)) (k : K) (v : V) (_ : @eq (option V) (assoc l k) (@Some V v)), @eq (list (prod K V)) (assoc_set l k v) l *) intros. (* Goal: @eq (list (prod K V)) (assoc_set l k v) l *) induction l; simpl in *; auto; try congruence. (* Goal: @eq (list (prod K V)) (let (k', v') := a in if K_eq_dec k k' then @cons (prod K V) (@pair K V k v) l else @cons (prod K V) (@pair K V k' v') (assoc_set l k v)) (@cons (prod K V) a l) *) repeat break_match; simpl in *; intuition. (* Goal: @eq (list (prod K V)) (@cons (prod K V) (@pair K V k0 v0) (assoc_set l k v)) (@cons (prod K V) (@pair K V k0 v0) l) *) (* Goal: @eq (list (prod K V)) (@cons (prod K V) (@pair K V k v) l) (@cons (prod K V) (@pair K V k0 v0) l) *) - (* Goal: @eq (list (prod K V)) (@cons (prod K V) (@pair K V k v) l) (@cons (prod K V) (@pair K V k0 v0) l) *) subst. (* Goal: @eq (list (prod K V)) (@cons (prod K V) (@pair K V k0 v) l) (@cons (prod K V) (@pair K V k0 v0) l) *) find_inversion. (* Goal: @eq (list (prod K V)) (@cons (prod K V) (@pair K V k0 v) l) (@cons (prod K V) (@pair K V k0 v) l) *) auto. (* BG Goal: @eq (list (prod K V)) (@cons (prod K V) (@pair K V k0 v0) (assoc_set l k v)) (@cons (prod K V) (@pair K V k0 v0) l) *) - (* Goal: @eq (list (prod K V)) (@cons (prod K V) (@pair K V k0 v0) (assoc_set l k v)) (@cons (prod K V) (@pair K V k0 v0) l) *) repeat find_rewrite. (* Goal: @eq (list (prod K V)) (@cons (prod K V) (@pair K V k0 v0) l) (@cons (prod K V) (@pair K V k0 v0) l) *) auto. Qed. Lemma assoc_default_assoc_set : forall l (k : K) (v : V) d, assoc_default (assoc_set l k v) k d = v. Proof. (* Goal: forall (l : list (prod K V)) (k : K) (v d : V), @eq V (assoc_default (assoc_set l k v) k d) v *) intros. (* Goal: @eq V (assoc_default (assoc_set l k v) k d) v *) unfold assoc_default. (* Goal: @eq V match assoc (assoc_set l k v) k with | Some x => x | None => d end v *) rewrite get_set_same. (* Goal: @eq V v v *) auto. Qed. Lemma assoc_set_assoc_set_same : forall l (k : K) (v : V) v', assoc_set (assoc_set l k v) k v' = assoc_set l k v'. Proof. (* Goal: forall (l : list (prod K V)) (k : K) (v v' : V), @eq (list (prod K V)) (assoc_set (assoc_set l k v) k v') (assoc_set l k v') *) induction l; intros; simpl in *; repeat break_match; simpl in *; subst; try congruence; eauto; break_if; congruence. Qed. Definition a_equiv (l1 : list (K * V)) l2 := forall k, assoc l1 k = assoc l2 k. Lemma a_equiv_refl : forall l, a_equiv l l. Proof. (* Goal: forall l : list (prod K V), a_equiv l l *) intros. (* Goal: a_equiv l l *) unfold a_equiv. (* Goal: forall k : K, @eq (option V) (assoc l k) (assoc l k) *) auto. Qed. Lemma a_equiv_sym : forall l l', a_equiv l l' -> a_equiv l' l. Proof. (* Goal: forall (l l' : list (prod K V)) (_ : a_equiv l l'), a_equiv l' l *) unfold a_equiv. (* Goal: forall (l l' : list (prod K V)) (_ : forall k : K, @eq (option V) (assoc l k) (assoc l' k)) (k : K), @eq (option V) (assoc l' k) (assoc l k) *) intros. (* Goal: @eq (option V) (assoc l' k) (assoc l k) *) auto. Qed. Lemma a_equiv_trans : forall l l' l'', a_equiv l l' -> a_equiv l' l'' -> a_equiv l l''. Proof. (* Goal: forall (l l' l'' : list (prod K V)) (_ : a_equiv l l') (_ : a_equiv l' l''), a_equiv l l'' *) unfold a_equiv in *. (* Goal: forall (l l' l'' : list (prod K V)) (_ : forall k : K, @eq (option V) (assoc l k) (assoc l' k)) (_ : forall k : K, @eq (option V) (assoc l' k) (assoc l'' k)) (k : K), @eq (option V) (assoc l k) (assoc l'' k) *) intros. (* Goal: @eq (option V) (assoc l k) (assoc l'' k) *) repeat find_higher_order_rewrite. (* Goal: @eq (option V) (assoc l'' k) (assoc l'' k) *) auto. Qed. Ltac assoc_destruct := match goal with | [ |- context [assoc (assoc_set _ ?k0' _) ?k0 ] ] => destruct (K_eq_dec k0 k0'); [subst k0'; rewrite get_set_same with (k := k0)| rewrite get_set_diff with (k' := k0) by auto] end. Ltac assoc_rewrite := match goal with | [ |- context [assoc (assoc_set _ ?k0' _) ?k0 ] ] => first [rewrite get_set_same with (k := k0) by auto | rewrite get_set_diff with (k' := k0) by auto ] end. Lemma assoc_set_assoc_set_diff : forall l (k : K) (v : V) k' v', k <> k' -> a_equiv (assoc_set (assoc_set l k v) k' v') (assoc_set (assoc_set l k' v') k v). Proof. (* Goal: forall (l : list (prod K V)) (k : K) (v : V) (k' : K) (v' : V) (_ : not (@eq K k k')), a_equiv (assoc_set (assoc_set l k v) k' v') (assoc_set (assoc_set l k' v') k v) *) unfold a_equiv. (* Goal: forall (l : list (prod K V)) (k : K) (v : V) (k' : K) (v' : V) (_ : not (@eq K k k')) (k0 : K), @eq (option V) (assoc (assoc_set (assoc_set l k v) k' v') k0) (assoc (assoc_set (assoc_set l k' v') k v) k0) *) intros. (* Goal: @eq (option V) (assoc (assoc_set (assoc_set l k v) k' v') k0) (assoc (assoc_set (assoc_set l k' v') k v) k0) *) assoc_destruct. (* Goal: @eq (option V) (assoc (assoc_set l k v) k0) (assoc (assoc_set (assoc_set l k' v') k v) k0) *) (* Goal: @eq (option V) (@Some V v') (assoc (assoc_set (assoc_set l k0 v') k v) k0) *) - (* Goal: @eq (option V) (@Some V v') (assoc (assoc_set (assoc_set l k0 v') k v) k0) *) now repeat assoc_rewrite. (* BG Goal: @eq (option V) (assoc (assoc_set l k v) k0) (assoc (assoc_set (assoc_set l k' v') k v) k0) *) - (* Goal: @eq (option V) (assoc (assoc_set l k v) k0) (assoc (assoc_set (assoc_set l k' v') k v) k0) *) assoc_destruct. (* Goal: @eq (option V) (assoc l k0) (assoc (assoc_set (assoc_set l k' v') k v) k0) *) (* Goal: @eq (option V) (@Some V v) (assoc (assoc_set (assoc_set l k' v') k0 v) k0) *) + (* Goal: @eq (option V) (@Some V v) (assoc (assoc_set (assoc_set l k' v') k0 v) k0) *) now repeat assoc_rewrite. (* BG Goal: @eq (option V) (assoc l k0) (assoc (assoc_set (assoc_set l k' v') k v) k0) *) + (* Goal: @eq (option V) (assoc l k0) (assoc (assoc_set (assoc_set l k' v') k v) k0) *) now repeat assoc_rewrite. Qed. Lemma a_equiv_nil : forall l, a_equiv l [] -> l = []. Proof. (* Goal: forall (l : list (prod K V)) (_ : a_equiv l (@nil (prod K V))), @eq (list (prod K V)) l (@nil (prod K V)) *) intros. (* Goal: @eq (list (prod K V)) l (@nil (prod K V)) *) destruct l; auto. (* Goal: @eq (list (prod K V)) (@cons (prod K V) p l) (@nil (prod K V)) *) unfold a_equiv in *. (* Goal: @eq (list (prod K V)) (@cons (prod K V) p l) (@nil (prod K V)) *) simpl in *. (* Goal: @eq (list (prod K V)) (@cons (prod K V) p l) (@nil (prod K V)) *) destruct p. (* Goal: @eq (list (prod K V)) (@cons (prod K V) (@pair K V k v) l) (@nil (prod K V)) *) specialize (H k). (* Goal: @eq (list (prod K V)) (@cons (prod K V) (@pair K V k v) l) (@nil (prod K V)) *) break_if; try congruence. Qed. Lemma assoc_set_a_equiv : forall l l' (k : K) (v : V), a_equiv l l' -> a_equiv (assoc_set l k v) (assoc_set l' k v). Proof. (* Goal: forall (l l' : list (prod K V)) (k : K) (v : V) (_ : a_equiv l l'), a_equiv (assoc_set l k v) (assoc_set l' k v) *) unfold a_equiv. (* Goal: forall (l l' : list (prod K V)) (k : K) (v : V) (_ : forall k0 : K, @eq (option V) (assoc l k0) (assoc l' k0)) (k0 : K), @eq (option V) (assoc (assoc_set l k v) k0) (assoc (assoc_set l' k v) k0) *) intros. (* Goal: @eq (option V) (assoc (assoc_set l k v) k0) (assoc (assoc_set l' k v) k0) *) assoc_destruct; assoc_rewrite; auto. Qed. Lemma assoc_default_a_equiv : forall l l' (k : K) (v : V), a_equiv l l' -> assoc_default l k v = assoc_default l' k v. Proof. (* Goal: forall (l l' : list (prod K V)) (k : K) (v : V) (_ : a_equiv l l'), @eq V (assoc_default l k v) (assoc_default l' k v) *) intros. (* Goal: @eq V (assoc_default l k v) (assoc_default l' k v) *) unfold a_equiv, assoc_default in *. (* Goal: @eq V match assoc l k with | Some x => x | None => v end match assoc l' k with | Some x => x | None => v end *) find_higher_order_rewrite. (* Goal: @eq V match assoc l' k with | Some x => x | None => v end match assoc l' k with | Some x => x | None => v end *) auto. Qed. Lemma assoc_a_equiv : forall l l' (k : K), a_equiv l l' -> assoc l k = assoc l' k. Proof. (* Goal: forall (l l' : list (prod K V)) (k : K) (_ : a_equiv l l'), @eq (option V) (assoc l k) (assoc l' k) *) unfold a_equiv. (* Goal: forall (l l' : list (prod K V)) (k : K) (_ : forall k0 : K, @eq (option V) (assoc l k0) (assoc l' k0)), @eq (option V) (assoc l k) (assoc l' k) *) auto. Qed. Lemma assoc_default_assoc_set_diff : forall (l : list (K * V)) k v k' d, k <> k' -> assoc_default (assoc_set l k' v) k d = assoc_default l k d. Proof. (* Goal: forall (l : list (prod K V)) (k : K) (v : V) (k' : K) (d : V) (_ : not (@eq K k k')), @eq V (assoc_default (assoc_set l k' v) k d) (assoc_default l k d) *) intros. (* Goal: @eq V (assoc_default (assoc_set l k' v) k d) (assoc_default l k d) *) unfold assoc_default. (* Goal: @eq V match assoc (assoc_set l k' v) k with | Some x => x | None => d end match assoc l k with | Some x => x | None => d end *) rewrite get_set_diff; auto. Qed. End assoc. Arguments a_equiv {_} {_} _ _ _.
Set Automatic Coercions Import. Set Implicit Arguments. Unset Strict Implicit. Require Export Module_cat. Require Export Abelian_group_facts. Section Lemmas. Variable R : RING. Variable Mod : MODULE R. Lemma MODULE_comp : forall (a b : R) (x y : Mod), Equal a b -> Equal x y -> Equal (module_mult a x) (module_mult b y). Proof. (* Goal: forall (a b : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) a b) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod a x) (@module_mult R Mod b y) *) intros a b x y H' H'0; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod a x) (@module_mult R Mod b y) *) apply Trans with (module_mult a y); unfold module_mult in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@Ap (sgroup_set (monoid_sgroup (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R))))) (sgroup_set (monoid_sgroup (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))))) (@sgroup_map (monoid_sgroup (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R)))) (monoid_sgroup (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))))) (@monoid_sgroup_hom (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R))) (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (@module_op R (@module_carrier R Mod) (@module_on_def R Mod)))) a) y) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@Ap (sgroup_set (monoid_sgroup (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R))))) (sgroup_set (monoid_sgroup (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))))) (@sgroup_map (monoid_sgroup (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R)))) (monoid_sgroup (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))))) (@monoid_sgroup_hom (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R))) (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (@module_op R (@module_carrier R Mod) (@module_on_def R Mod)))) b) y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@Ap (sgroup_set (monoid_sgroup (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R))))) (sgroup_set (monoid_sgroup (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))))) (@sgroup_map (monoid_sgroup (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R)))) (monoid_sgroup (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))))) (@monoid_sgroup_hom (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R))) (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (@module_op R (@module_carrier R Mod) (@module_on_def R Mod)))) a) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@Ap (sgroup_set (monoid_sgroup (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R))))) (sgroup_set (monoid_sgroup (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))))) (@sgroup_map (monoid_sgroup (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R)))) (monoid_sgroup (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))))) (@monoid_sgroup_hom (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R))) (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (@module_op R (@module_carrier R Mod) (@module_on_def R Mod)))) a) y) *) apply Ap_comp; auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@Ap (sgroup_set (monoid_sgroup (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R))))) (sgroup_set (monoid_sgroup (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))))) (@sgroup_map (monoid_sgroup (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R)))) (monoid_sgroup (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))))) (@monoid_sgroup_hom (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R))) (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (@module_op R (@module_carrier R Mod) (@module_on_def R Mod)))) a) y) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@Ap (sgroup_set (monoid_sgroup (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R))))) (sgroup_set (monoid_sgroup (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))))) (@sgroup_map (monoid_sgroup (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R)))) (monoid_sgroup (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))))) (@monoid_sgroup_hom (@Build_monoid (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult_sgroup (ring_group R) (ring_on_def R))) (@ring_mult_monoid (ring_group R) (ring_on_def R)))) (@ring_monoid (ring_group R) (ring_on_def R))) (Endo_SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (@module_op R (@module_carrier R Mod) (@module_on_def R Mod)))) b) y) *) apply Ap_comp; auto with algebra. Qed. Lemma MODULE_assoc : forall (a b : R) (x : Mod), Equal (module_mult (ring_mult a b) x) (module_mult a (module_mult b x)). Proof. (* Goal: forall (a b : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod (@ring_mult R a b) x) (@module_mult R Mod a (@module_mult R Mod b x)) *) exact (operation_assoc (module_op Mod)). Qed. Lemma MODULE_dist_r : forall (a b : R) (x : Mod), Equal (module_mult (sgroup_law R a b) x) (sgroup_law Mod (module_mult a x) (module_mult b x)). Proof. (* Goal: forall (a b : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) a b) x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@module_mult R Mod a x) (@module_mult R Mod b x)) *) exact (module_op_lin_left_prf Mod). Qed. Lemma MODULE_dist_l : forall (a : R) (x y : Mod), Equal (module_mult a (sgroup_law Mod x y)) (sgroup_law Mod (module_mult a x) (module_mult a y)). Proof. (* Goal: forall (a : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod a (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) x y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@module_mult R Mod a x) (@module_mult R Mod a y)) *) exact (module_op_lin_right_prf Mod). Qed. Lemma MODULE_unit_l : forall x : Mod, Equal (module_mult (ring_unit R) x) x. Proof. (* Goal: forall x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod (ring_unit R) x) x *) exact (operation_unit (module_op Mod)). Qed. Hint Resolve MODULE_comp MODULE_dist_r MODULE_dist_l MODULE_assoc MODULE_unit_l: algebra. Lemma MODULE_absorbant_l : forall x : Mod, Equal (module_mult (monoid_unit R) x) (monoid_unit Mod). Proof. (* Goal: forall x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))) *) intros x; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))) *) apply GROUP_reg_left with (module_mult (monoid_unit R) x); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@module_mult R Mod (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) x) (@module_mult R Mod (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@module_mult R Mod (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod)))))) *) apply Trans with (module_mult (sgroup_law R (monoid_unit R) (monoid_unit R)) x); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R)))))) x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@module_mult R Mod (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod)))))) *) apply Trans with (module_mult (monoid_unit R) x); auto with algebra. Qed. Lemma MODULE_absorbant_r : forall a : R, Equal (module_mult a (monoid_unit Mod)) (monoid_unit Mod). Proof. (* Goal: forall a : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod a (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))) *) intros a; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod a (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))) *) apply GROUP_reg_left with (module_mult a (monoid_unit (module_carrier Mod))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@module_mult R Mod a (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (@module_mult R Mod a (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@module_mult R Mod a (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod)))))) *) apply Trans with (module_mult a (sgroup_law Mod (monoid_unit Mod) (monoid_unit Mod))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod a (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@module_mult R Mod a (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod)))))) *) apply Trans with (module_mult a (monoid_unit Mod)); auto with algebra. Qed. Lemma MODULE_mult_op_r : forall (a : R) (x : Mod), Equal (module_mult a (group_inverse Mod x)) (group_inverse Mod (module_mult a x)). Proof. (* Goal: forall (a : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod a (group_inverse (abelian_group_group (@module_carrier R Mod)) x)) (group_inverse (abelian_group_group (@module_carrier R Mod)) (@module_mult R Mod a x)) *) intros a x; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod a (group_inverse (abelian_group_group (@module_carrier R Mod)) x)) (group_inverse (abelian_group_group (@module_carrier R Mod)) (@module_mult R Mod a x)) *) apply Sym. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (group_inverse (abelian_group_group (@module_carrier R Mod)) (@module_mult R Mod a x)) (@module_mult R Mod a (group_inverse (abelian_group_group (@module_carrier R Mod)) x)) *) apply GROUP_law_inverse. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@module_mult R Mod a x) (@module_mult R Mod a (group_inverse (abelian_group_group (@module_carrier R Mod)) x))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))) *) apply Trans with (module_mult a (sgroup_law Mod x (group_inverse Mod x))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod a (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) x (group_inverse (abelian_group_group (@module_carrier R Mod)) x))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))) *) apply Trans with (module_mult a (monoid_unit Mod)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod a (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))) *) apply MODULE_absorbant_r. Qed. Lemma MODULE_mult_op_l : forall (a : R) (x : Mod), Equal (module_mult (group_inverse R a) x) (group_inverse Mod (module_mult a x)). Proof. (* Goal: forall (a : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod (group_inverse (abelian_group_group (ring_group R)) a) x) (group_inverse (abelian_group_group (@module_carrier R Mod)) (@module_mult R Mod a x)) *) intros a x; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod (group_inverse (abelian_group_group (ring_group R)) a) x) (group_inverse (abelian_group_group (@module_carrier R Mod)) (@module_mult R Mod a x)) *) apply Sym. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (group_inverse (abelian_group_group (@module_carrier R Mod)) (@module_mult R Mod a x)) (@module_mult R Mod (group_inverse (abelian_group_group (ring_group R)) a) x) *) apply GROUP_law_inverse. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@module_mult R Mod a x) (@module_mult R Mod (group_inverse (abelian_group_group (ring_group R)) a) x)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))) *) apply Trans with (module_mult (sgroup_law R a (group_inverse R a)) x); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) a (group_inverse (abelian_group_group (ring_group R)) a)) x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))) *) apply Trans with (module_mult (monoid_unit R) x); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@module_mult R Mod (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))) *) apply MODULE_absorbant_l. Qed. Variable Mod' : MODULE R. Variable f : Hom Mod Mod'. Lemma MODULE_hom_prop : forall (a : R) (x : Mod), Equal (f (module_mult a x)) (module_mult a (f x)). Proof. (* Goal: forall (a : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod'))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod'))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod')))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (@module_carrier R Mod))) (group_monoid (abelian_group_group (@module_carrier R Mod'))) (@module_monoid_hom R Mod Mod' f))) (@module_mult R Mod a x)) (@module_mult R Mod' a (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod'))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod')))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (@module_carrier R Mod))) (group_monoid (abelian_group_group (@module_carrier R Mod'))) (@module_monoid_hom R Mod Mod' f))) x)) *) case f; auto with algebra. Qed. End Lemmas. Hint Resolve MODULE_comp MODULE_assoc MODULE_dist_r MODULE_dist_l MODULE_unit_l MODULE_absorbant_l MODULE_absorbant_r MODULE_mult_op_l MODULE_mult_op_r MODULE_hom_prop: algebra.
Require Export Eqdep. Require Export Arith. Global Set Asymmetric Patterns. Section Dependent_lists. Variable A : Set. Inductive list : nat -> Set := | nil : list 0 | cons : forall n : nat, A -> list n -> list (S n). Definition eq_list := eq_dep nat list. Definition hd (n : nat) (l : list n) : Exc A := match l in (list m) return (Exc A) with | nil => error | cons p a l' => value a end. Definition head (n : nat) (l : list n) := match l in (list p) return (0 < p -> A) with | nil => fun h : 0 < 0 => False_rec A (lt_irrefl 0 h) | cons p a l' => fun h : 0 < S p => a end. Definition Head (n : nat) (l : list (S n)) := head (S n) l (lt_O_Sn n). Definition tl (n : nat) (l : list n) : list (pred n) := match l in (list m) return (list (pred m)) with | nil => nil | cons p a l' => l' end. Lemma empty_dep : forall (n : nat) (l : list n), n = 0 -> eq_list 0 nil n l. Proof. (* Goal: forall (n : nat) (l : list n) (_ : @eq nat n O), eq_list O nil n l *) unfold eq_list in |- *; intros n l. (* Goal: forall _ : @eq nat n O, eq_dep nat list O nil n l *) dependent inversion_clear l; auto. (* Goal: forall _ : @eq nat (S n0) O, eq_dep nat list O nil (S n0) (cons n0 a l0) *) intros H; absurd (S n0 = 0); auto. Qed. Hint Resolve empty_dep. Lemma empty : forall l : list 0, nil = l. Proof. (* Goal: forall l : list O, @eq (list O) nil l *) intros l. (* Goal: @eq (list O) nil l *) apply (eq_dep_eq nat list 0). (* Goal: eq_dep nat list O nil O l *) apply empty_dep; auto. Qed. Hint Resolve empty. Remark non_empty_dep : forall n m : nat, m = S n -> forall l : list (S n), {h : A & {t : list n | eq_list (S n) l (S n) (cons n h t)}}. Proof. (* Goal: forall (n m : nat) (_ : @eq nat m (S n)) (l : list (S n)), @sigT A (fun h : A => @sig (list n) (fun t : list n => eq_list (S n) l (S n) (cons n h t))) *) intros n m H l. (* Goal: @sigT A (fun h : A => @sig (list n) (fun t : list n => eq_list (S n) l (S n) (cons n h t))) *) generalize H; clear H. (* Goal: forall _ : @eq nat m (S n), @sigT A (fun h : A => @sig (list n) (fun t : list n => eq_list (S n) l (S n) (cons n h t))) *) dependent inversion_clear l with (fun (n' : nat) (l : list n') => m = n' -> {a : A & {l' : list n | eq_list n' l (S n) (cons n a l')}}). (* Goal: forall _ : @eq nat m (S n), @sigT A (fun a0 : A => @sig (list n) (fun l' : list n => eq_list (S n) (cons n a l0) (S n) (cons n a0 l'))) *) unfold eq_list in |- *. (* Goal: forall _ : @eq nat m (S n), @sigT A (fun a0 : A => @sig (list n) (fun l' : list n => eq_dep nat list (S n) (cons n a l0) (S n) (cons n a0 l'))) *) intros H; exists a; exists l0; auto. Qed. Lemma non_empty : forall (n : nat) (l : list (S n)), {a : A & {t : list n | l = cons n a t}}. Proof. (* Goal: forall (n : nat) (l : list (S n)), @sigT A (fun a : A => @sig (list n) (fun t : list n => @eq (list (S n)) l (cons n a t))) *) intros n l. (* Goal: @sigT A (fun a : A => @sig (list n) (fun t : list n => @eq (list (S n)) l (cons n a t))) *) cut (sigS (fun a : A => sig (fun t : list n => eq_list (S n) l (S n) (cons n a t)))). (* Goal: @sigT A (fun a : A => @sig (list n) (fun t : list n => eq_list (S n) l (S n) (cons n a t))) *) (* Goal: forall _ : @sigT A (fun a : A => @sig (list n) (fun t : list n => eq_list (S n) l (S n) (cons n a t))), @sigT A (fun a : A => @sig (list n) (fun t : list n => @eq (list (S n)) l (cons n a t))) *) intros H; elim H; clear H. (* Goal: @sigT A (fun a : A => @sig (list n) (fun t : list n => eq_list (S n) l (S n) (cons n a t))) *) (* Goal: forall (x : A) (_ : @sig (list n) (fun t : list n => eq_list (S n) l (S n) (cons n x t))), @sigT A (fun a : A => @sig (list n) (fun t : list n => @eq (list (S n)) l (cons n a t))) *) intros a H; elim H; clear H. (* Goal: @sigT A (fun a : A => @sig (list n) (fun t : list n => eq_list (S n) l (S n) (cons n a t))) *) (* Goal: forall (x : list n) (_ : eq_list (S n) l (S n) (cons n a x)), @sigT A (fun a : A => @sig (list n) (fun t : list n => @eq (list (S n)) l (cons n a t))) *) intros t H. (* Goal: @sigT A (fun a : A => @sig (list n) (fun t : list n => eq_list (S n) l (S n) (cons n a t))) *) (* Goal: @sigT A (fun a : A => @sig (list n) (fun t : list n => @eq (list (S n)) l (cons n a t))) *) exists a; exists t. (* Goal: @sigT A (fun a : A => @sig (list n) (fun t : list n => eq_list (S n) l (S n) (cons n a t))) *) (* Goal: @eq (list (S n)) l (cons n a t) *) apply eq_dep_eq with (U := nat) (P := list) (p := S n). (* Goal: @sigT A (fun a : A => @sig (list n) (fun t : list n => eq_list (S n) l (S n) (cons n a t))) *) (* Goal: eq_dep nat list (S n) l (S n) (cons n a t) *) unfold eq_list in H; auto. (* Goal: @sigT A (fun a : A => @sig (list n) (fun t : list n => eq_list (S n) l (S n) (cons n a t))) *) apply (non_empty_dep n (S n)); auto. Qed. Lemma split_list : forall (n : nat) (l : list (S n)), l = cons n (head (S n) l (lt_O_Sn n)) (tl (S n) l). Proof. (* Goal: forall (n : nat) (l : list (S n)), @eq (list (S n)) l (cons n (head (S n) l (Nat.lt_0_succ n)) (tl (S n) l)) *) intros n l. (* Goal: @eq (list (S n)) l (cons n (head (S n) l (Nat.lt_0_succ n)) (tl (S n) l)) *) elim (non_empty n l). (* Goal: forall (x : A) (_ : @sig (list n) (fun t : list n => @eq (list (S n)) l (cons n x t))), @eq (list (S n)) l (cons n (head (S n) l (Nat.lt_0_succ n)) (tl (S n) l)) *) intros h H; elim H; clear H. (* Goal: forall (x : list n) (_ : @eq (list (S n)) l (cons n h x)), @eq (list (S n)) l (cons n (head (S n) l (Nat.lt_0_succ n)) (tl (S n) l)) *) intros t e. (* Goal: @eq (list (S n)) l (cons n (head (S n) l (Nat.lt_0_succ n)) (tl (S n) l)) *) rewrite e; simpl in |- *. (* Goal: @eq (list (S n)) (cons n h t) (cons n h t) *) auto. Qed. Definition Hd (n : nat) (l : list (S n)) := let (a, P) return A := non_empty n l in a. Lemma Non_empty_Hd : forall (n : nat) (a : A) (l : list n), Hd n (cons n a l) = a. Proof. (* Goal: forall (n : nat) (a : A) (l : list n), @eq A (Hd n (cons n a l)) a *) intros n a l; unfold Hd in |- *. (* Goal: @eq A (let (a0, _) := non_empty n (cons n a l) in a0) a *) elim (non_empty n (cons n a l)). (* Goal: forall (x : A) (_ : @sig (list n) (fun t : list n => @eq (list (S n)) (cons n a l) (cons n x t))), @eq A x a *) intros x H; elim H. (* Goal: forall (x0 : list n) (_ : @eq (list (S n)) (cons n a l) (cons n x x0)), @eq A x a *) clear H; intros X H. (* Goal: @eq A x a *) injection H; auto. Qed. End Dependent_lists. Hint Resolve empty_dep empty non_empty Non_empty_Hd. Fixpoint map (A B : Set) (f : A -> B) (n : nat) (l : list A n) {struct l} : list B n := match l in (list _ x) return (list B x) with | nil => nil B | cons p a t => cons B p (f a) (map A B f p t) end.
Require Export GeoCoq.Elements.OriginalProofs.lemma_NChelper. Require Export GeoCoq.Elements.OriginalProofs.proposition_20. Require Export GeoCoq.Elements.OriginalProofs.lemma_21helper. Require Export GeoCoq.Elements.OriginalProofs.lemma_TTorder. Require Export GeoCoq.Elements.OriginalProofs.lemma_TTflip. Require Export GeoCoq.Elements.OriginalProofs.lemma_TTtransitive. Require Export GeoCoq.Elements.OriginalProofs.lemma_TTflip2. Require Export GeoCoq.Elements.OriginalProofs.lemma_NCdistinct. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma proposition_21 : forall A B C D E, Triangle A B C -> BetS A E C -> BetS B D E -> TT B A A C B D D C /\ LtA B A C B D C. Proof. (* Goal: forall (A B C D E : @Point Ax0) (_ : @Triangle Ax0 A B C) (_ : @BetS Ax0 A E C) (_ : @BetS Ax0 B D E), and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) intros. (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (BetS E D B) by (conclude axiom_betweennesssymmetry). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol A B C) by (conclude_def Triangle ). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Col A E C) by (conclude_def Col ). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Col A C E) by (forward_using lemma_collinearorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (neq A E) by (forward_using lemma_betweennotequal). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol A C B) by (forward_using lemma_NCorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (eq A A) by (conclude cn_equalityreflexive). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Col A C A) by (conclude_def Col ). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol A E B) by (conclude lemma_NChelper). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol A B E) by (forward_using lemma_NCorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Triangle A B E) by (conclude_def Triangle ). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (TG B A A E B E) by (conclude proposition_20). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (TT B A A C B E E C) by (conclude lemma_21helper). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol A C B) by (forward_using lemma_NCorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Col A E C) by (conclude_def Col ). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Col A C E) by (forward_using lemma_collinearorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (eq C C) by (conclude cn_equalityreflexive). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Col A C C) by (conclude_def Col ). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (neq E C) by (forward_using lemma_betweennotequal). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol E C B) by (conclude lemma_NChelper). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol E B C) by (forward_using lemma_NCorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Col E D B) by (conclude_def Col ). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Col E B D) by (forward_using lemma_collinearorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (eq E E) by (conclude cn_equalityreflexive). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Col E B E) by (conclude_def Col ). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (neq E D) by (forward_using lemma_betweennotequal). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol E D C) by (conclude lemma_NChelper). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol E C D) by (forward_using lemma_NCorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Triangle E C D) by (conclude_def Triangle ). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (TG C E E D C D) by (conclude proposition_20). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (TT C E E B C D D B) by (conclude lemma_21helper). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (TT E B C E C D D B) by (conclude lemma_TTorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (TT B E E C C D D B) by (conclude lemma_TTflip). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (TT B A A C C D D B) by (conclude lemma_TTtransitive). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (TT B A A C B D D C) by (conclude lemma_TTflip2). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol C E D) by (forward_using lemma_NCorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Triangle C E D) by (conclude_def Triangle ). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (LtA D E C C D B) by (conclude proposition_16). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol E B C) by (forward_using lemma_NCorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (eq B B) by (conclude cn_equalityreflexive). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Col E B B) by (conclude_def Col ). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Col E D B) by (conclude_def Col ). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Col E B D) by (forward_using lemma_collinearorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (neq B D) by (forward_using lemma_betweennotequal). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (neq D B) by (conclude lemma_inequalitysymmetric). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol D B C) by (conclude lemma_NChelper). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol B A E) by (forward_using lemma_NCorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Triangle B A E) by (conclude_def Triangle ). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (LtA E A B B E C) by (conclude proposition_16). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (CongA B A E E A B) by (conclude lemma_ABCequalsCBA). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (LtA B A E B E C) by (conclude lemma_angleorderrespectscongruence2). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol C E B) by (forward_using lemma_NCorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (CongA C E B B E C) by (conclude lemma_ABCequalsCBA). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (LtA B A E C E B) by (conclude lemma_angleorderrespectscongruence). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (neq A E) by (forward_using lemma_betweennotequal). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Out A E C) by (conclude lemma_ray4). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Out A C E) by (conclude lemma_ray5). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (neq A B) by (forward_using lemma_NCdistinct). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Out A B B) by (conclude lemma_ray4). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol B A C) by (forward_using lemma_NCorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (CongA B A C B A C) by (conclude lemma_equalanglesreflexive). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (CongA B A C B A E) by (conclude lemma_equalangleshelper). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (BetS E D B) by (conclude axiom_betweennesssymmetry). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Out E D B) by (conclude lemma_ray4). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (eq C C) by (conclude cn_equalityreflexive). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (Out E C C) by (conclude lemma_ray4). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol C E D) by (forward_using lemma_NCorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (CongA C E D C E D) by (conclude lemma_equalanglesreflexive). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (CongA C E D C E B) by (conclude lemma_equalangleshelper). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (LtA B A E C E D) by (conclude lemma_angleorderrespectscongruence). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (LtA B A C C E D) by (conclude lemma_angleorderrespectscongruence2). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol D E C) by (forward_using lemma_NCorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (CongA D E C C E D) by (conclude lemma_ABCequalsCBA). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (LtA B A C D E C) by (conclude lemma_angleorderrespectscongruence). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (LtA B A C C D B) by (conclude lemma_angleordertransitive). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (nCol B D C) by (forward_using lemma_NCorder). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (CongA B D C C D B) by (conclude lemma_ABCequalsCBA). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) assert (LtA B A C B D C) by (conclude lemma_angleorderrespectscongruence). (* Goal: and (@TT Ax0 B A A C B D D C) (@LtA Ax0 B A C B D C) *) close. Qed. End Euclid.