coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Anders Lundstedt <anders AT anderslundstedt.se>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Recursion on second component of subset type
- Date: Sun, 16 Feb 2014 04:54:27 +0100
>
> Why not just write a helper function with a type like this?
> A -> forall P, is_A_formula P -> Prop
> Then you can pattern-match on the 3rd argument without any fuss.
Thanks! Worked perfectly:
Fixpoint helper a P (pf : is_A_formula P) := match pf with
| atom_formula _ _ => P
| and_formula P Q pf_P pf_Q => helper (p0 a) P pf_P /\ helper (p1 a) Q pf_Q
end.
Definition realizes a (P : A_formulas) := let (P, pf) := P in helper a P pf.
- [Coq-Club] Recursion on second component of subset type, Anders Lundstedt, 02/15/2014
- Re: [Coq-Club] Recursion on second component of subset type, Adam Chlipala, 02/15/2014
- Re: [Coq-Club] Recursion on second component of subset type, Anders Lundstedt, 02/16/2014
- Re: [Coq-Club] Recursion on second component of subset type, Adam Chlipala, 02/15/2014
Archive powered by MHonArc 2.6.18.