Subject: Ssreflect Users Discussion List
List archive
- From: Cyril Cohen <>
- To: ssreflect <>
- Subject: [ssreflect] big_morph_in
- Date: Fri, 13 Nov 2015 20:25:44 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=Pass
- Ironport-phdr: 9a23:k9P3yBErkNAdi5MBUDbONp1GYnF86YWxBRYc798ds5kLTJ75os+wAkXT6L1XgUPTWs2DsrQf27eQ7vqrADBIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/niqbvodaKP01hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv50IbaKvZL8iQLJcAT86ezQu/9fmux3ORhen42AGF2QQiBtBRQnD9hDzGJnr5HjUrO14jQKLJ8zyBZszWTmkp/NgTx/ljg8MLTc/6yfQkMMm3/ETmw6ouxEqm92cW4qSLvcrJq4=
Good evening,
I while ago, I was looking for big_morph_in, ie a lemma like big_morph but
where f does not need to be morphism everywhere but only on the F i such
that P i and their combinations. I never managed to emulate this lemma
easily from any other lemmas in bigop.
What do you think of the following statement? And if you like it, do you
see minor/major shortcuts in the proof?
Lemma big_morph_in (R1 R2 : Type)
(f : R2 -> R1) (id1 : R1) (op1 : R1 -> R1 -> R1)
(id2 : R2) (op2 : R2 -> R2 -> R2) (D : pred R2) :
(forall x y, x \in D -> y \in D -> op2 x y \in D) ->
id2 \in D ->
{in D &, {morph f : x y / op2 x y >-> op1 x y}} ->
f id2 = id1 ->
forall (I : Type) (r : seq I) (P : pred I) (F : I -> R2),
all D [seq F x | x <- r & P x] ->
f (\big[op2/id2]_(i <- r | P i) F i) =
\big[op1/id1]_(i <- r | P i) f (F i).
Proof.
move=> Dop2 Did2 f_morph f_id I r P F.
elim: r => [|x r ihr /= DrP]; rewrite ?(big_nil, big_cons) //.
set b2 := \big[_/_]_(_ <- _ | _) _; set b1 := \big[_/_]_(_ <- _ | _) _.
have fb2 : f b2 = b1 by rewrite ihr; move: (P x) DrP => [/andP[]|].
case: (boolP (P x)) DrP => //= Px /andP[Dx allD].
rewrite f_morph ?fb2 // /b2 {b2 fb2 ihr b1 x Px Dx f_morph f_id}.
elim: r allD => [|x r ihr /=]; rewrite ?(big_nil, big_cons) //.
by case: (P x) => //= /andP [??]; rewrite Dop2 // ihr.
Qed.
Best,
--
Cyril
- [ssreflect] big_morph_in, Cyril Cohen, 11/13/2015
- Re: [ssreflect] big_morph_in, Emilio Jesús Gallego Arias, 11/23/2015
- Re: [ssreflect] big_morph_in, Cyril, 11/24/2015
- Re: [ssreflect] big_morph_in, Emilio Jesús Gallego Arias, 11/23/2015
Archive powered by MHonArc 2.6.18.