From 108d1f8d031ed7eddced2b8808fed6b55aad2d7a Mon Sep 17 00:00:00 2001
From: Ralf Jung <jung@mpi-sws.org>
Date: Tue, 3 Jan 2017 17:50:02 +0100
Subject: [PATCH] make "make quick" quick by adding hints about the used
 section variables

This patch was created using

  find -name *.v | xargs -L 1 awk -i inplace '{from = 0} /^From/{ from = 1; ever_from = 1} { if (from == 0 && seen == 0 && ever_from == 1) { print "Set Default Proof Using \"Type*\"."; seen = 1 } }1 '

and some minor manual editing
---
 theories/base.v            | 1 +
 theories/bset.v            | 1 +
 theories/coPset.v          | 1 +
 theories/collections.v     | 1 +
 theories/countable.v       | 1 +
 theories/decidable.v       | 1 +
 theories/fin_collections.v | 1 +
 theories/fin_map_dom.v     | 1 +
 theories/fin_maps.v        | 1 +
 theories/finite.v          | 1 +
 theories/functions.v       | 1 +
 theories/gmap.v            | 1 +
 theories/gmultiset.v       | 1 +
 theories/hashset.v         | 1 +
 theories/hlist.v           | 1 +
 theories/lexico.v          | 1 +
 theories/list.v            | 1 +
 theories/listset.v         | 1 +
 theories/listset_nodup.v   | 1 +
 theories/mapset.v          | 1 +
 theories/natmap.v          | 1 +
 theories/nmap.v            | 1 +
 theories/numbers.v         | 1 +
 theories/option.v          | 1 +
 theories/orders.v          | 1 +
 theories/pmap.v            | 1 +
 theories/pretty.v          | 1 +
 theories/proof_irrel.v     | 1 +
 theories/relations.v       | 1 +
 theories/set.v             | 3 ++-
 theories/sorting.v         | 1 +
 theories/streams.v         | 1 +
 theories/stringmap.v       | 1 +
 theories/strings.v         | 1 +
 theories/tactics.v         | 1 +
 theories/vector.v          | 1 +
 theories/zmap.v            | 1 +
 37 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/theories/base.v b/theories/base.v
index 51dcdad2..859c6f00 100644
--- a/theories/base.v
+++ b/theories/base.v
@@ -9,6 +9,7 @@ Global Set Automatic Coercions Import.
 Global Set Asymmetric Patterns.
 Global Unset Transparent Obligations.
 From Coq Require Export Morphisms RelationClasses List Bool Utf8 Setoid.
+Set Default Proof Using "Type*".
 Export ListNotations.
 From Coq.Program Require Export Basics Syntax.
 Obligation Tactic := idtac.
diff --git a/theories/bset.v b/theories/bset.v
index 9c8fe475..91501e33 100644
--- a/theories/bset.v
+++ b/theories/bset.v
@@ -2,6 +2,7 @@
 (* This file is distributed under the terms of the BSD license. *)
 (** This file implements bsets as functions into Prop. *)
 From stdpp Require Export prelude.
+Set Default Proof Using "Type*".
 
 Record bset (A : Type) : Type := mkBSet { bset_car : A → bool }.
 Arguments mkBSet {_} _.
diff --git a/theories/coPset.v b/theories/coPset.v
index c1212ffd..49e32334 100644
--- a/theories/coPset.v
+++ b/theories/coPset.v
@@ -13,6 +13,7 @@ Since [positive]s are bitstrings, we encode [coPset]s as trees that correspond
 to the decision function that map bitstrings to bools. *)
 From stdpp Require Export collections.
 From stdpp Require Import pmap gmap mapset.
+Set Default Proof Using "Type*".
 Local Open Scope positive_scope.
 
 (** * The tree data structure *)
diff --git a/theories/collections.v b/theories/collections.v
index 126dc59e..672eac8c 100644
--- a/theories/collections.v
+++ b/theories/collections.v
@@ -4,6 +4,7 @@
 importantly, it implements some tactics to automatically solve goals involving
 collections. *)
 From stdpp Require Export orders list.
+Set Default Proof Using "Type*".
 
 Instance collection_equiv `{ElemOf A C} : Equiv C := λ X Y,
   ∀ x, x ∈ X ↔ x ∈ Y.
diff --git a/theories/countable.v b/theories/countable.v
index 00e84a9e..aa7dad64 100644
--- a/theories/countable.v
+++ b/theories/countable.v
@@ -1,6 +1,7 @@
 (* Copyright (c) 2012-2015, Robbert Krebbers. *)
 (* This file is distributed under the terms of the BSD license. *)
 From stdpp Require Export list.
+Set Default Proof Using "Type*".
 Local Open Scope positive.
 
 Class Countable A `{EqDecision A} := {
diff --git a/theories/decidable.v b/theories/decidable.v
index 4748a822..57dc031f 100644
--- a/theories/decidable.v
+++ b/theories/decidable.v
@@ -4,6 +4,7 @@
 with a decidable equality. Such propositions are collected by the [Decision]
 type class. *)
 From stdpp Require Export proof_irrel.
+Set Default Proof Using "Type*".
 
 Hint Extern 200 (Decision _) => progress (lazy beta) : typeclass_instances.
 
diff --git a/theories/fin_collections.v b/theories/fin_collections.v
index ed094d36..fd7a4d38 100644
--- a/theories/fin_collections.v
+++ b/theories/fin_collections.v
@@ -6,6 +6,7 @@ principles on finite collections . *)
 From Coq Require Import Permutation.
 From stdpp Require Import relations listset.
 From stdpp Require Export numbers collections.
+Set Default Proof Using "Type*".
 
 Instance collection_size `{Elements A C} : Size C := length ∘ elements.
 Definition collection_fold `{Elements A C} {B}
diff --git a/theories/fin_map_dom.v b/theories/fin_map_dom.v
index 5856b682..cbc6c1a1 100644
--- a/theories/fin_map_dom.v
+++ b/theories/fin_map_dom.v
@@ -4,6 +4,7 @@
 maps. We provide such an axiomatization, instead of implementing the domain
 function in a generic way, to allow more efficient implementations. *)
 From stdpp Require Export collections fin_maps.
+Set Default Proof Using "Type*".
 
 Class FinMapDom K M D `{FMap M,
     ∀ A, Lookup K A (M A), ∀ A, Empty (M A), ∀ A, PartialAlter K A (M A),
diff --git a/theories/fin_maps.v b/theories/fin_maps.v
index 2c8634da..cc85921f 100644
--- a/theories/fin_maps.v
+++ b/theories/fin_maps.v
@@ -6,6 +6,7 @@ induction principles for finite maps and implements the tactic
 [simplify_map_eq] to simplify goals involving finite maps. *)
 From Coq Require Import Permutation.
 From stdpp Require Export relations orders vector.
+Set Default Proof Using "Type*".
 
 (** * Axiomatization of finite maps *)
 (** We require Leibniz equality to be extensional on finite maps. This of
diff --git a/theories/finite.v b/theories/finite.v
index eb8b868e..d15fa39e 100644
--- a/theories/finite.v
+++ b/theories/finite.v
@@ -1,6 +1,7 @@
 (* Copyright (c) 2012-2015, Robbert Krebbers. *)
 (* This file is distributed under the terms of the BSD license. *)
 From stdpp Require Export countable vector.
+Set Default Proof Using "Type*".
 
 Class Finite A `{EqDecision A} := {
   enum : list A;
diff --git a/theories/functions.v b/theories/functions.v
index 44da9837..4c37187d 100644
--- a/theories/functions.v
+++ b/theories/functions.v
@@ -1,4 +1,5 @@
 From stdpp Require Export base tactics.
+Set Default Proof Using "Type*".
 
 Section definitions.
   Context {A T : Type} `{EqDecision A}.
diff --git a/theories/gmap.v b/theories/gmap.v
index 3f4c3958..a1bf157f 100644
--- a/theories/gmap.v
+++ b/theories/gmap.v
@@ -4,6 +4,7 @@
 type. The implementation is based on [Pmap]s, radix-2 search trees. *)
 From stdpp Require Export countable fin_maps fin_map_dom.
 From stdpp Require Import pmap mapset set.
+Set Default Proof Using "Type*".
 
 (** * The data structure *)
 (** We pack a [Pmap] together with a proof that ensures that all keys correspond
diff --git a/theories/gmultiset.v b/theories/gmultiset.v
index 2c9f8535..7f1f83eb 100644
--- a/theories/gmultiset.v
+++ b/theories/gmultiset.v
@@ -1,6 +1,7 @@
 (* Copyright (c) 2012-2016, Robbert Krebbers. *)
 (* This file is distributed under the terms of the BSD license. *)
 From stdpp Require Import gmap.
+Set Default Proof Using "Type*".
 
 Record gmultiset A `{Countable A} := GMultiSet { gmultiset_car : gmap A nat }.
 Arguments GMultiSet {_ _ _} _.
diff --git a/theories/hashset.v b/theories/hashset.v
index e93e5214..ffed2bd1 100644
--- a/theories/hashset.v
+++ b/theories/hashset.v
@@ -5,6 +5,7 @@ using radix-2 search trees. Each hash bucket is thus indexed using an binary
 integer of type [Z], and contains an unordered list without duplicates. *)
 From stdpp Require Export fin_maps listset.
 From stdpp Require Import zmap.
+Set Default Proof Using "Type*".
 
 Record hashset {A} (hash : A → Z) := Hashset {
   hashset_car : Zmap (list A);
diff --git a/theories/hlist.v b/theories/hlist.v
index 6f4c5227..39ad9805 100644
--- a/theories/hlist.v
+++ b/theories/hlist.v
@@ -1,4 +1,5 @@
 From stdpp Require Import tactics.
+Set Default Proof Using "Type*".
 Local Set Universe Polymorphism.
 
 (* Not using [list Type] in order to avoid universe inconsistencies *)
diff --git a/theories/lexico.v b/theories/lexico.v
index 42d6b319..f5402ebd 100644
--- a/theories/lexico.v
+++ b/theories/lexico.v
@@ -3,6 +3,7 @@
 (** This files defines a lexicographic order on various common data structures
 and proves that it is a partial order having a strong variant of trichotomy. *)
 From stdpp Require Import numbers.
+Set Default Proof Using "Type*".
 
 Notation cast_trichotomy T :=
   match T with
diff --git a/theories/list.v b/theories/list.v
index 5847a124..a9f260c4 100644
--- a/theories/list.v
+++ b/theories/list.v
@@ -4,6 +4,7 @@
 are not in the Coq standard library. *)
 From Coq Require Export Permutation.
 From stdpp Require Export numbers base option.
+Set Default Proof Using "Type*".
 
 Arguments length {_} _.
 Arguments cons {_} _ _.
diff --git a/theories/listset.v b/theories/listset.v
index 8ba410ea..8966cc2e 100644
--- a/theories/listset.v
+++ b/theories/listset.v
@@ -3,6 +3,7 @@
 (** This file implements finite set as unordered lists without duplicates
 removed. This implementation forms a monad. *)
 From stdpp Require Export collections list.
+Set Default Proof Using "Type*".
 
 Record listset A := Listset { listset_car: list A }.
 Arguments listset_car {_} _.
diff --git a/theories/listset_nodup.v b/theories/listset_nodup.v
index 73447c35..e3b76d51 100644
--- a/theories/listset_nodup.v
+++ b/theories/listset_nodup.v
@@ -4,6 +4,7 @@
 Although this implementation is slow, it is very useful as decidable equality
 is the only constraint on the carrier set. *)
 From stdpp Require Export collections list.
+Set Default Proof Using "Type*".
 
 Record listset_nodup A := ListsetNoDup {
   listset_nodup_car : list A; listset_nodup_prf : NoDup listset_nodup_car
diff --git a/theories/mapset.v b/theories/mapset.v
index ffaae8b4..1e921468 100644
--- a/theories/mapset.v
+++ b/theories/mapset.v
@@ -4,6 +4,7 @@
 elements of the unit type. Since maps enjoy extensional equality, the
 constructed finite sets do so as well. *)
 From stdpp Require Export fin_map_dom.
+(* FIXME: This file needs a 'Proof Using' hint. *)
 
 Record mapset (M : Type → Type) : Type :=
   Mapset { mapset_car: M (unit : Type) }.
diff --git a/theories/natmap.v b/theories/natmap.v
index 0cd0a4c3..d109590b 100644
--- a/theories/natmap.v
+++ b/theories/natmap.v
@@ -4,6 +4,7 @@
 over Coq's data type of unary natural numbers [nat]. The implementation equips
 a list with a proof of canonicity. *)
 From stdpp Require Import fin_maps mapset.
+Set Default Proof Using "Type*".
 
 Notation natmap_raw A := (list (option A)).
 Definition natmap_wf {A} (l : natmap_raw A) :=
diff --git a/theories/nmap.v b/theories/nmap.v
index 00c249b0..12645efb 100644
--- a/theories/nmap.v
+++ b/theories/nmap.v
@@ -4,6 +4,7 @@
 maps whose keys range over Coq's data type of binary naturals [N]. *)
 From stdpp Require Import pmap mapset.
 From stdpp Require Export prelude fin_maps.
+Set Default Proof Using "Type*".
 
 Local Open Scope N_scope.
 
diff --git a/theories/numbers.v b/theories/numbers.v
index 38f5a862..034a4ca1 100644
--- a/theories/numbers.v
+++ b/theories/numbers.v
@@ -6,6 +6,7 @@ notations. *)
 From Coq Require Export EqdepFacts PArith NArith ZArith NPeano.
 From Coq Require Import QArith Qcanon.
 From stdpp Require Export base decidable option.
+Set Default Proof Using "Type*".
 Open Scope nat_scope.
 
 Coercion Z.of_nat : nat >-> Z.
diff --git a/theories/option.v b/theories/option.v
index 73ae6eff..63378a36 100644
--- a/theories/option.v
+++ b/theories/option.v
@@ -3,6 +3,7 @@
 (** This file collects general purpose definitions and theorems on the option
 data type that are not in the Coq standard library. *)
 From stdpp Require Export tactics.
+Set Default Proof Using "Type*".
 
 Inductive option_reflect {A} (P : A → Prop) (Q : Prop) : option A → Type :=
   | ReflectSome x : P x → option_reflect P Q (Some x)
diff --git a/theories/orders.v b/theories/orders.v
index b0d84aeb..bc301900 100644
--- a/theories/orders.v
+++ b/theories/orders.v
@@ -3,6 +3,7 @@
 (** Properties about arbitrary pre-, partial, and total orders. We do not use
 the relation [⊆] because we often have multiple orders on the same structure *)
 From stdpp Require Export tactics.
+Set Default Proof Using "Type*".
 
 Section orders.
   Context {A} {R : relation A}.
diff --git a/theories/pmap.v b/theories/pmap.v
index 8237bdcc..a6966f39 100644
--- a/theories/pmap.v
+++ b/theories/pmap.v
@@ -10,6 +10,7 @@ Leibniz equality to become extensional. *)
 From Coq Require Import PArith.
 From stdpp Require Import mapset countable.
 From stdpp Require Export fin_maps.
+Set Default Proof Using "Type*".
 
 Local Open Scope positive_scope.
 Local Hint Extern 0 (@eq positive _ _) => congruence.
diff --git a/theories/pretty.v b/theories/pretty.v
index 58fd3834..afd2b689 100644
--- a/theories/pretty.v
+++ b/theories/pretty.v
@@ -3,6 +3,7 @@
 From stdpp Require Export strings.
 From stdpp Require Import relations.
 From Coq Require Import Ascii.
+Set Default Proof Using "Type*".
 
 Class Pretty A := pretty : A → string.
 Definition pretty_N_char (x : N) : ascii :=
diff --git a/theories/proof_irrel.v b/theories/proof_irrel.v
index 2af33406..4d9c6d7d 100644
--- a/theories/proof_irrel.v
+++ b/theories/proof_irrel.v
@@ -2,6 +2,7 @@
 (* This file is distributed under the terms of the BSD license. *)
 (** This file collects facts on proof irrelevant types/propositions. *)
 From stdpp Require Export base.
+Set Default Proof Using "Type*".
 
 Hint Extern 200 (ProofIrrel _) => progress (lazy beta) : typeclass_instances.
 
diff --git a/theories/relations.v b/theories/relations.v
index dfedb109..3152cc78 100644
--- a/theories/relations.v
+++ b/theories/relations.v
@@ -6,6 +6,7 @@ small step semantics. This file defines a hint database [ars] containing
 some theorems on abstract rewriting systems. *)
 From Coq Require Import Wf_nat.
 From stdpp Require Export tactics base.
+Set Default Proof Using "Type*".
 
 (** * Definitions *)
 Section definitions.
diff --git a/theories/set.v b/theories/set.v
index 84ef65ff..27a97975 100644
--- a/theories/set.v
+++ b/theories/set.v
@@ -2,6 +2,7 @@
 (* This file is distributed under the terms of the BSD license. *)
 (** This file implements sets as functions into Prop. *)
 From stdpp Require Export collections.
+Set Default Proof Using "Type*".
 
 Record set (A : Type) : Type := mkSet { set_car : A → Prop }.
 Add Printing Constructor set.
@@ -51,4 +52,4 @@ Proof. intros HPQ. constructor. apply HPQ. Qed.
 
 Global Opaque set_elem_of set_top set_empty set_singleton.
 Global Opaque set_union set_intersection set_difference.
-Global Opaque set_ret set_bind set_fmap set_join.
\ No newline at end of file
+Global Opaque set_ret set_bind set_fmap set_join.
diff --git a/theories/sorting.v b/theories/sorting.v
index 63b36183..36fff7fb 100644
--- a/theories/sorting.v
+++ b/theories/sorting.v
@@ -4,6 +4,7 @@
 standard library, but without using the module system. *)
 From Coq Require Export Sorted.
 From stdpp Require Export orders list.
+Set Default Proof Using "Type*".
 
 Section merge_sort.
   Context {A} (R : relation A) `{∀ x y, Decision (R x y)}.
diff --git a/theories/streams.v b/theories/streams.v
index 216a426b..725a5915 100644
--- a/theories/streams.v
+++ b/theories/streams.v
@@ -1,6 +1,7 @@
 (* Copyright (c) 2012-2015, Robbert Krebbers. *)
 (* This file is distributed under the terms of the BSD license. *)
 From stdpp Require Export tactics.
+Set Default Proof Using "Type*".
 
 CoInductive stream (A : Type) : Type := scons : A → stream A → stream A.
 Arguments scons {_} _ _.
diff --git a/theories/stringmap.v b/theories/stringmap.v
index 426d392b..9de316ca 100644
--- a/theories/stringmap.v
+++ b/theories/stringmap.v
@@ -6,6 +6,7 @@ search trees (uncompressed Patricia trees) as implemented in the file [pmap]
 and guarantees logarithmic-time operations. *)
 From stdpp Require Export fin_maps pretty.
 From stdpp Require Import gmap.
+Set Default Proof Using "Type*".
 
 Notation stringmap := (gmap string).
 Notation stringset := (gset string).
diff --git a/theories/strings.v b/theories/strings.v
index f08e9b0a..93718899 100644
--- a/theories/strings.v
+++ b/theories/strings.v
@@ -4,6 +4,7 @@ From Coq Require Import Ascii.
 From Coq Require Export String.
 From stdpp Require Export list.
 From stdpp Require Import countable.
+Set Default Proof Using "Type*".
 
 (* To avoid randomly ending up with String.length because this module is
 imported hereditarily somewhere. *)
diff --git a/theories/tactics.v b/theories/tactics.v
index f8747a7e..f104f381 100644
--- a/theories/tactics.v
+++ b/theories/tactics.v
@@ -5,6 +5,7 @@ the development. *)
 From Coq Require Import Omega.
 From Coq Require Export Lia.
 From stdpp Require Export decidable.
+Set Default Proof Using "Type*".
 
 Lemma f_equal_dep {A B} (f g : ∀ x : A, B x) x : f = g → f x = g x.
 Proof. intros ->; reflexivity. Qed.
diff --git a/theories/vector.v b/theories/vector.v
index 2d663f43..b0d6d326 100644
--- a/theories/vector.v
+++ b/theories/vector.v
@@ -6,6 +6,7 @@ definitions from the standard library, but renames or changes their notations,
 so that it becomes more consistent with the naming conventions in this
 development. *)
 From stdpp Require Export list.
+Set Default Proof Using "Type*".
 Open Scope vector_scope.
 
 (** * The fin type *)
diff --git a/theories/zmap.v b/theories/zmap.v
index c3f53647..32689e58 100644
--- a/theories/zmap.v
+++ b/theories/zmap.v
@@ -4,6 +4,7 @@
 maps whose keys range over Coq's data type of binary naturals [Z]. *)
 From stdpp Require Import pmap mapset.
 From stdpp Require Export prelude fin_maps.
+Set Default Proof Using "Type*".
 Local Open Scope Z_scope.
 
 Record Zmap (A : Type) : Type :=
-- 
GitLab