coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Castéran Pierre <pierre.casteran AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Access return values in theorem
- Date: Tue, 4 Aug 2020 17:24:19 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=pierre.casteran AT gmail.com; spf=Pass smtp.mailfrom=pierre.casteran AT gmail.com; spf=None smtp.helo=postmaster AT mail-wm1-f48.google.com
- Ironport-phdr: 9a23:EBn4wBSOjj8ti3YZ5qK9dcuOMdpsv+yvbD5Q0YIujvd0So/mwa6zZBKN2/xhgRfzUJnB7Loc0qyK6v6mBjJLscnJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MRS7oR/Tu8QXjodvKaQ8wQbVr3VVfOhb2XlmLk+JkRbm4cew8p9j8yBOtP8k6sVNT6b0cbkmQLJBFDgpPHw768PttRnYUAuA/WAcXXkMkhpJGAfK8hf3VYrsvyTgt+p93C6aPdDqTb0xRD+v4btnRAPuhSwaMTMy7WPZhdFqjK9DoByuuxNxzIHJbo+bOvpwYKHSc9AdS2daQsZRTilBDp+8b4cTDecMO/tToYnnp1sJqBuzHRehC/n0yj9UnHj2x7c10+I5Hg/c3QwvAcgOsG7Ko97oM6oSSeG1w7fSzTXZcfxawyvy55LTchA9v/6MR6h/cczKxEkgEgPKlFSQqYj/MzyJ0eQNtnGW4ux9Xu2gl2ApsRt+oiSzxsgykInJgJoYx1TA+Ch73os4O8C1RVJnbNO6H5VdqT2XOot4TM4mQWxmtiI3x78Jt5KlciUG1okryhHRZvGDb4WF/h3tWeeNLDp+mXlre6q/ig6s/US8zuDwTMq53VZQoiZYjNXBtWoB2hPQ58SfVPdy5Fut1SuK2g/P8e5IPEQ5mK/ZJpE6wrM9k5QevlrfEiPqnUj5kLKZeV449uWt9evof7frqYKZOoBulA7xLLghl8mxAeQ2PAgBRW6W8vmm2rL55032WrBKg+U2kqbHtJDaItwWpqujDA9U1oYv8hi+DzK73NgBk3kKI1FIdAiIj4juPFHOL/T4Aumlj1uwlzdrwujKPrznAprTMnjOiKntcap55kJGywc+zcpT649KBrwCOv7+VUz8uMTdDhAjMgy0x+jnCM961oMbQW+PGq6ZP73IsV+S+O0jOfWDa5UOuDbhNfcl/eThjXkilF8SeKmmx5oXaHSiEvt6JEWZZGLggs0dHmcSogo+UOvqhUWeXj5Ufna+Rr4z5jUmCI29ForDXYCsgLmZ3CihBJFWZ2ZGCkqNEXjybYmEVe0MO2quJZpqlSVBXry8Qacg0wuvvUn00elJNO3RrwYRro5iztFz0NXSmAso+HQgF8WQyXuACWp9hX8FXTYw9K96qE15jFyE1P4r0LRjCdVP6qYRAU8BPpnGwrkiUo2gakf6Zt6MDW2ebJCmDDU2FI9jxtYPZwNiHozngEyTmSWtBLARmvqAA5lmqvuAjUi0HN50zjP97Idkl0MvG5IdOmivh6o5/A/WVdaQwhep0p2yfKFZ5xbjsWKKzG6ApkZdCVciXqDMXHRZbUzT/430
Hi,
I’m not sure I understand well what you mean.
First, It, would be better to include in your mail the declarations and
definitions you want to use.
Do you agree with the following ones ?
Variables a b: Type.
Variable green: a.
Inductive state :=
| State : a -> b -> state.
Variable fsm : state -> state.
Now, if s is any state, you can decompose it with a match.
Since fsm is a function, (fsm s) is a single value, the first component of
which is (or not) green.
So I don’t understand the need for an existential quantifier.
What do you think about the following statement ? Is it what you meant ?
Theorem foo:
forall (s : state),
match fsm s with (State a' b') => a' = green end.
Now, if fsm is a binary relation, instead of a function, then my answer would
have been different.
Best regards,
Pierre
> Le 4 août 2020 à 16:51, fritjof AT uni-bremen.de a écrit :
>
> Hi,
>
> I have the following definition fsm : state -> state.
>
> The state is defined as
> Inductive state :=
> | State : a -> b -> state
>
> I want to show something like:
> Theorem foo:
> forall s : state,
> State a' b' = fsm s -> (exists a', a' = green).
>
>
> In a more informal way:
> I want to show that there is a state. returned by *fsm s* where
> a' is green.
>
> The answer from Coq is: The reference a' was not found in the current
> environment.
>
> Does someone has a solution for that?
>
> Regards,
> --f.
- [Coq-Club] Access return values in theorem, fritjof, 08/04/2020
- Re: [Coq-Club] Access return values in theorem, Castéran Pierre, 08/04/2020
- Re: [Coq-Club] Access return values in theorem, fritjof, 08/04/2020
- Re: [Coq-Club] Access return values in theorem, Pierre Courtieu, 08/05/2020
- Re: [Coq-Club] Access return values in theorem, Castéran Pierre, 08/05/2020
- Re: [Coq-Club] Access return values in theorem, fritjof, 08/04/2020
- Re: [Coq-Club] Access return values in theorem, Castéran Pierre, 08/04/2020
Archive powered by MHonArc 2.6.19+.