coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Arnaud Spiwack <aspiwack AT lix.polytechnique.fr>
- To: Anders Lundstedt <anders AT anderslundstedt.se>
- Cc: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Notation for functional relation
- Date: Mon, 27 Jan 2014 07:00:19 +0100
There is a way in that fun A => A -> Prop is a monad. So, basically, the same trick we discussed last time with the option type [ https://sympa.inria.fr/sympa/arc/coq-club/2014-01/msg00171.html ] may apply.
Here the coercion from A to A->Prop (you would have to write a type synonym for the latter to use the coercion mechanism), the monadic unit, is
Definition singleton x := fun y => y=x.
Definition extension2 f x y := exists a, exists b, x a -> x b -> f a b
If you are interested about this sort of things you should read up about monads (there are plenty of resources for Haskell). Also there is there cousin, applicative functors, which may be relevant to your needs.
On 26 January 2014 17:35, Anders Lundstedt <anders AT anderslundstedt.se> wrote:
Dear all,I have a ternary relation R such that R a b c -> R a b d -> c = d. Is it possible to treat R notationally as a binary function? R is not decidable.
Parameter A : Set.Parameter R : A -> A -> A -> Prop.(* we may assume that R is functional *)Axiom R_functional : forall a b c d, R a b c -> R a b d -> c = d.(*is it possible to create a functional notation a * ... * b = c, i.e. s.t.a * b = c <-> R a b ca * b * c = d <-> exists x, a * b = x /\ x * c = da * b * c * d = e <-> exists x, a * b * c = x /\ x * d = eetc...*)Best regards,Anders Lundstedt
- [Coq-Club] Notation for functional relation, Anders Lundstedt, 01/26/2014
- Re: [Coq-Club] Notation for functional relation, Arnaud Spiwack, 01/27/2014
- Re: [Coq-Club] Notation for functional relation, Guillaume Melquiond, 01/27/2014
- Re: [Coq-Club] Notation for functional relation, Arnaud Spiwack, 01/27/2014
- Re: [Coq-Club] Notation for functional relation, Arnaud Spiwack, 01/27/2014
- Re: [Coq-Club] Notation for functional relation, Guillaume Melquiond, 01/27/2014
- Re: [Coq-Club] Notation for functional relation, Arnaud Spiwack, 01/27/2014
- Re: [Coq-Club] Notation for functional relation, Rui Baptista, 01/27/2014
- Re: [Coq-Club] Notation for functional relation, Arnaud Spiwack, 01/27/2014
- Re: [Coq-Club] Notation for functional relation, Daniel Schepler, 01/28/2014
- Re: [Coq-Club] Notation for functional relation, Arnaud Spiwack, 01/28/2014
- Re: [Coq-Club] Notation for functional relation, Daniel Schepler, 01/28/2014
- Re: [Coq-Club] Notation for functional relation, Arnaud Spiwack, 01/28/2014
- Re: [Coq-Club] Notation for functional relation, Daniel Schepler, 01/28/2014
- Re: [Coq-Club] Notation for functional relation, Arnaud Spiwack, 01/28/2014
- Re: [Coq-Club] Notation for functional relation, Guillaume Melquiond, 01/27/2014
- Re: [Coq-Club] Notation for functional relation, Arnaud Spiwack, 01/27/2014
Archive powered by MHonArc 2.6.18.