aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoqbot-app[bot]2020-12-08 13:01:43 +0000
committerGitHub2020-12-08 13:01:43 +0000
commitc79e503a91be63a7799d6f82690d319ce7a24040 (patch)
treeee212b43d2717312d12dafd719e5f2d731fe6408
parent0369080c826171cf18cfa2c8be5024445cb4a2d9 (diff)
parente5a5fdb9ad8d57b37729a781b217701ac341f522 (diff)
Merge PR #13596: Add a test for cbv over inductive types which feature let-bindings.
Reviewed-by: SkySkimmer
-rw-r--r--test-suite/success/cbv_let.v34
1 files changed, 34 insertions, 0 deletions
diff --git a/test-suite/success/cbv_let.v b/test-suite/success/cbv_let.v
new file mode 100644
index 0000000000..861a73a64e
--- /dev/null
+++ b/test-suite/success/cbv_let.v
@@ -0,0 +1,34 @@
+Record T : Type := Build_T { f : unit; g := pair f f; }.
+
+Definition t : T := {| f := tt; |}.
+
+Goal match t return unit with Build_T f g => f end = tt.
+Proof.
+cbv.
+reflexivity.
+Qed.
+
+Goal match t return prod unit unit with Build_T f g => g end = pair tt tt.
+Proof.
+cbv.
+reflexivity.
+Qed.
+
+Goal forall (x : T),
+ match x return prod unit unit with Build_T f g => g end =
+ pair match x return unit with Build_T f g => fst g end match x return unit with Build_T f g => snd g end.
+Proof.
+cbv.
+destruct x.
+reflexivity.
+Qed.
+
+Record U : Type := Build_U { h := tt }.
+
+Definition u : U := Build_U.
+
+Goal match u with Build_U h => h end = tt.
+Proof.
+cbv.
+reflexivity.
+Qed.