Coq 快速上下文转发

Coq 快速上下文转发,coq,Coq,我对QuickChick测试框架有问题。 假设我有这样一种类型: Inductive f := f1 (x : Z) (range : x < 20 /\ 0 < x). Definition boundaries' (t : bool) := if t then (1, 10)%Z else (10, 19)%Z . Program Definition binary_gen (t : G bool) : G (f) := bindGen ((fmap bo

我对QuickChick测试框架有问题。 假设我有这样一种类型:

Inductive f := f1 (x : Z) (range : x < 20 /\ 0 < x).
Definition boundaries' (t : bool) :=
  if t 
  then (1, 10)%Z 
  else (10, 19)%Z .

Program Definition binary_gen (t : G bool) : G (f) :=
  bindGen ((fmap boundaries') t) (fun '(m_min, m_max) =>
    bindGen (choose (m_min, m_max)) (fun (x : Z) =>
        returnGen (f1 x _))).
当我想证明缺少证明对象时,我有以下上下文:

t : G bool
z, z0, x : Z
============================
x < 20 /\ 0 < x
t:G bool
z、 z0,x:z
============================
x<20/\0
问题是,当使用
bindGen
时,我失去了以前的上下文,我需要证明当前的目标

所以问题是,如何使用
bindGen
转发上下文,或者是否有解决此问题的方法?


谢谢,这就是我要找的。
Definition bindGen' : forall {A B : Type} (g : G A), 
                       (forall (a : A), (a \in semGen g) -> G B) -> G B.