From 59f5391576aca91400f506adfc7f1a1965f79069 Mon Sep 17 00:00:00 2001 From: Julien Forest Date: Tue, 21 Mar 2017 22:53:27 +0100 Subject: bug file for 4306 --- test-suite/bugs/opened/4306.v | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 test-suite/bugs/opened/4306.v (limited to 'test-suite') diff --git a/test-suite/bugs/opened/4306.v b/test-suite/bugs/opened/4306.v new file mode 100644 index 000000000..4aef5bb95 --- /dev/null +++ b/test-suite/bugs/opened/4306.v @@ -0,0 +1,32 @@ +Require Import List. +Require Import Arith. +Require Import Recdef. +Require Import Omega. + +Function foo (xys : (list nat * list nat)) {measure (fun xys => length (fst xys) + length (snd xys))} : list nat := + match xys with + | (nil, _) => snd xys + | (_, nil) => fst xys + | (x :: xs', y :: ys') => match Compare_dec.nat_compare x y with + | Lt => x :: foo (xs', y :: ys') + | Eq => x :: foo (xs', ys') + | Gt => y :: foo (x :: xs', ys') + end + end. +Proof. + intros; simpl; omega. + intros; simpl; omega. + intros; simpl; omega. +Qed. + +Function bar (xys : (list nat * list nat)) {measure (fun xys => length (fst xys) + length (snd xys))} : list nat := + let (xs, ys) := xys in + match (xs, ys) with + | (nil, _) => ys + | (_, nil) => xs + | (x :: xs', y :: ys') => match Compare_dec.nat_compare x y with + | Lt => x :: foo (xs', ys) + | Eq => x :: foo (xs', ys') + | Gt => y :: foo (xs, ys') + end + end. \ No newline at end of file -- cgit v1.2.3 From 031d0fbcea7c1390dc7e6cf89cfaee8609ecfed1 Mon Sep 17 00:00:00 2001 From: Julien Forest Date: Tue, 4 Apr 2017 14:30:36 +0200 Subject: closing bug file for #4306 --- test-suite/bugs/closed/4306.v | 32 ++++++++++++++++++++++++++++++++ test-suite/bugs/opened/4306.v | 32 -------------------------------- 2 files changed, 32 insertions(+), 32 deletions(-) create mode 100644 test-suite/bugs/closed/4306.v delete mode 100644 test-suite/bugs/opened/4306.v (limited to 'test-suite') diff --git a/test-suite/bugs/closed/4306.v b/test-suite/bugs/closed/4306.v new file mode 100644 index 000000000..4aef5bb95 --- /dev/null +++ b/test-suite/bugs/closed/4306.v @@ -0,0 +1,32 @@ +Require Import List. +Require Import Arith. +Require Import Recdef. +Require Import Omega. + +Function foo (xys : (list nat * list nat)) {measure (fun xys => length (fst xys) + length (snd xys))} : list nat := + match xys with + | (nil, _) => snd xys + | (_, nil) => fst xys + | (x :: xs', y :: ys') => match Compare_dec.nat_compare x y with + | Lt => x :: foo (xs', y :: ys') + | Eq => x :: foo (xs', ys') + | Gt => y :: foo (x :: xs', ys') + end + end. +Proof. + intros; simpl; omega. + intros; simpl; omega. + intros; simpl; omega. +Qed. + +Function bar (xys : (list nat * list nat)) {measure (fun xys => length (fst xys) + length (snd xys))} : list nat := + let (xs, ys) := xys in + match (xs, ys) with + | (nil, _) => ys + | (_, nil) => xs + | (x :: xs', y :: ys') => match Compare_dec.nat_compare x y with + | Lt => x :: foo (xs', ys) + | Eq => x :: foo (xs', ys') + | Gt => y :: foo (xs, ys') + end + end. \ No newline at end of file diff --git a/test-suite/bugs/opened/4306.v b/test-suite/bugs/opened/4306.v deleted file mode 100644 index 4aef5bb95..000000000 --- a/test-suite/bugs/opened/4306.v +++ /dev/null @@ -1,32 +0,0 @@ -Require Import List. -Require Import Arith. -Require Import Recdef. -Require Import Omega. - -Function foo (xys : (list nat * list nat)) {measure (fun xys => length (fst xys) + length (snd xys))} : list nat := - match xys with - | (nil, _) => snd xys - | (_, nil) => fst xys - | (x :: xs', y :: ys') => match Compare_dec.nat_compare x y with - | Lt => x :: foo (xs', y :: ys') - | Eq => x :: foo (xs', ys') - | Gt => y :: foo (x :: xs', ys') - end - end. -Proof. - intros; simpl; omega. - intros; simpl; omega. - intros; simpl; omega. -Qed. - -Function bar (xys : (list nat * list nat)) {measure (fun xys => length (fst xys) + length (snd xys))} : list nat := - let (xs, ys) := xys in - match (xs, ys) with - | (nil, _) => ys - | (_, nil) => xs - | (x :: xs', y :: ys') => match Compare_dec.nat_compare x y with - | Lt => x :: foo (xs', ys) - | Eq => x :: foo (xs', ys') - | Gt => y :: foo (xs, ys') - end - end. \ No newline at end of file -- cgit v1.2.3