File: ProofGen.v

package info (click to toggle)
coq-quickchick 2.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,432 kB
  • sloc: ml: 4,367; ansic: 789; makefile: 388; sh: 27; python: 4; lisp: 2; perl: 2
file content (16 lines) | stat: -rw-r--r-- 427 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
From QuickChick Require Import QuickChick Tactics.
From Coq Require Import Arith Lia List String.
Import ListNotations.
Import QcDefaultNotation.
Open Scope string.
Open Scope qc_scope.

Inductive ty : nat -> Type :=
| pi : forall n i , i <= n -> ty n.

Program Definition gen_ty (p : nat) :  G (ty p) :=
  bindPf (choose (0, p)) (fun m H =>
  returnGen (pi p m  _) ).
Next Obligation.
  apply semChooseGen in H; lia.
Defined.