Subject: Ssreflect Users Discussion List
List archive
- From: (Emilio Jesús Gallego Arias)
- To: Florent Hivert <>
- Cc: "ssreflect\@msr-inria.inria.fr" <>
- Subject: Re: [ssreflect] Bigop and functional composition.
- Date: Wed, 11 Nov 2015 01:14:19 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:ltcExRKyGBY9CZ+LydmcpTZWNBhigK39O0sv0rFitYgUI//xwZ3uMQTl6Ol3ixeRBMOAu68C17Sd6fqocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC0oLriavoodX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD89pozcNLUL37cqIkVvQYSW1+ayFmrPHs4DfHShGC4GdUcmQInwBUS1zr6BbgU5Ht9Av7qOdnxAGeJ8ywQ6piChq46KI+RxbsjCoIMBYy6mCRh8pribodrgjp5zF6worVZ8m3OeHsZevydNceSGVGFu9LViVaQ9DvJ7ATBvYMaL4L57L2oEED+F7nXVGh
- Organization: CRI ParisTech
Hi Florent,
Florent Hivert
<>
writes:
> Precisely, here is an example of what I'd like to do:
>
> Variable T : eqType.
> Variables a b : seq (T -> T)
>
> I'd like to be able to state and prove the following goal:
>
> (\bigop[\o, id]_(i <- a) i) \o (\bigop[\o, id]_(i <- b) i) =1
> (\bigop[\o, id]_(i <- a ++ b) i)
>
> This is indeed nearly Lemma big_cat except that I can't provide [\o, id]
> with
> a Monoid.law structure because equality is =1 and not =.
I'm not an expert and I'm likely missing something, but I tried your
example out of curiosity and I had no problems:
Variable T : Type.
Lemma cA : associative (@funcomp T T T tt).
Proof. by []. Qed.
Lemma cfI : right_id id (@funcomp T T T tt).
Proof. by []. Qed.
Lemma cIf : left_id id (@funcomp T T T tt).
Proof. by []. Qed.
Canonical cMonoid := Monoid.Law cA cIf cfI.
Variables a b : seq (T -> T).
Local Notation "\c" := (funcomp tt).
Lemma l1 : \big[\c/id]_(i <- a) i \o \big[\c/id]_(i <- b) i =
\big[\c/id]_(i <- a ++ b) i.
Proof. by rewrite big_cat. Qed.
Lemma l2 : \big[\c/id]_(i <- a) i \o \big[\c/id]_(i <- b) i =1
\big[\c/id]_(i <- a ++ b) i.
Proof. by move=> i; rewrite big_cat. Qed.
Cheers,
Emilio
- [ssreflect] Bigop and functional composition., Florent Hivert, 11/10/2015
- Re: [ssreflect] Bigop and functional composition., Florent Hivert, 11/10/2015
- Re: [ssreflect] Bigop and functional composition., Emilio Jesús Gallego Arias, 11/11/2015
- Re: [ssreflect] Bigop and functional composition., Emilio Jesús Gallego Arias, 11/11/2015
- Re: [ssreflect] Bigop and functional composition., Assia Mahboubi, 11/11/2015
- Re: [ssreflect] Bigop and functional composition., Florent Hivert, 11/11/2015
- Re: [ssreflect] Bigop and functional composition., Assia Mahboubi, 11/11/2015
- Re: [ssreflect] Bigop and functional composition., Florent Hivert, 11/11/2015
- Re: [ssreflect] Bigop and functional composition., Emilio Jesús Gallego Arias, 11/11/2015
- Re: [ssreflect] Bigop and functional composition., Emilio Jesús Gallego Arias, 11/11/2015
- Re: [ssreflect] Bigop and functional composition., Florent Hivert, 11/10/2015
Archive powered by MHonArc 2.6.18.