File: in.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 (25 lines) | stat: -rw-r--r-- 720 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From QuickChick Require Import QuickChick.

Inductive merge {X:Type} : list X -> list X -> list X -> Prop :=
  | merge_empty :
      merge nil nil nil
  | merge_left : forall l1 l2 l3 x,

      merge l1 l2 l3 ->
      merge (x::l1) l2 (x::l3)
  | merge_right : forall l1 l2 l3 x,
      merge l1 l2 l3 ->
      merge l1 (x::l2) (x::l3).

Derive DecOpt for (merge l1 l2 l3).
Derive ArbitrarySizedSuchThat for (fun l3 => merge l1 l2 l3).
Derive EnumSizedSuchThat for (fun l3 => merge l1 l2 l3).

Inductive In' {A:Type} : A -> list A -> Prop :=
| In_hd :
    forall x l, In' x (cons x l)
| In_tl :
    forall x y l, In' x l -> In' x (cons y l).

Derive EnumSizedSuchThat for (fun x => In' x l).
Derive DecOpt for (In' x l).