Commit 466f1be9 authored by Robbert Krebbers's avatar Robbert Krebbers

Set Obligation Tactic := idtac globally.

parent f30c0242
...@@ -405,7 +405,6 @@ End Tests. ...@@ -405,7 +405,6 @@ End Tests.
(** Instantiate the Iris language interface. This closes reduction under evaluation contexts. (** Instantiate the Iris language interface. This closes reduction under evaluation contexts.
We could potentially make this a generic construction. *) We could potentially make this a generic construction. *)
Section Language. Section Language.
Local Obligation Tactic := idtac.
Definition ectx_step e1 σ1 e2 σ2 (ef: option expr) := Definition ectx_step e1 σ1 e2 σ2 (ef: option expr) :=
exists K e1' e2', e1 = fill K e1' /\ e2 = fill K e2' /\ prim_step e1' σ1 e2' σ2 ef. exists K e1' e2', e1 = fill K e1' /\ e2 = fill K e2' /\ prim_step e1' σ1 e2' σ2 ef.
......
Require Export prelude.prelude. Require Export prelude.prelude.
Obligation Tactic := idtac.
(** Unbundeled version *) (** Unbundeled version *)
Class Dist A := dist : nat relation A. Class Dist A := dist : nat relation A.
......
Require Export modures.cmra prelude.gmap. Require Export modures.cmra prelude.gmap.
Require Import modures.option. Require Import modures.option.
Local Obligation Tactic := idtac.
Section map. Section map.
Context `{Countable K}. Context `{Countable K}.
......
...@@ -8,6 +8,7 @@ Global Generalizable All Variables. ...@@ -8,6 +8,7 @@ Global Generalizable All Variables.
Global Set Automatic Coercions Import. Global Set Automatic Coercions Import.
Global Set Asymmetric Patterns. Global Set Asymmetric Patterns.
Require Export Morphisms RelationClasses List Bool Utf8 Program Setoid. Require Export Morphisms RelationClasses List Bool Utf8 Program Setoid.
Obligation Tactic := idtac.
(** * General *) (** * General *)
(** Zipping lists. *) (** Zipping lists. *)
......
(* Copyright (c) 2012-2015, Robbert Krebbers. *) (* Copyright (c) 2012-2015, Robbert Krebbers. *)
(* This file is distributed under the terms of the BSD license. *) (* This file is distributed under the terms of the BSD license. *)
Require Export prelude.list. Require Export prelude.list.
Local Obligation Tactic := idtac.
Local Open Scope positive. Local Open Scope positive.
Class Countable A `{ x y : A, Decision (x = y)} := { Class Countable A `{ x y : A, Decision (x = y)} := {
......
...@@ -93,15 +93,15 @@ Proof. ...@@ -93,15 +93,15 @@ Proof.
Defined. Defined.
Global Program Instance collection_subseteq_dec_slow (X Y : C) : Global Program Instance collection_subseteq_dec_slow (X Y : C) :
Decision (X Y) | 100 := Decision (X Y) | 100 :=
match decide_rel (=) (size (X Y)) 0 with match decide_rel (=) (size (X Y)) 0 return _ with
| left E1 => left _ | right E1 => right _ | left _ => left _ | right _ => right _
end. end.
Next Obligation. Next Obligation.
intros x Ex; apply dec_stable; intro. destruct (proj1 (elem_of_empty x)). intros X Y E1 x ?; apply dec_stable; intro. destruct (proj1(elem_of_empty x)).
apply (size_empty_inv _ E1). by rewrite elem_of_difference. apply (size_empty_inv _ E1). by rewrite elem_of_difference.
Qed. Qed.
Next Obligation. Next Obligation.
intros E2. destruct E1. apply size_empty_iff, equiv_empty. intros x. intros X Y E1 E2; destruct E1. apply size_empty_iff, equiv_empty. intros x.
rewrite elem_of_difference. intros [E3 ?]. by apply E2 in E3. rewrite elem_of_difference. intros [E3 ?]. by apply E2 in E3.
Qed. Qed.
Lemma size_union_alt X Y : size (X Y) = size X + size (Y X). Lemma size_union_alt X Y : size (X Y) = size X + size (Y X).
......
(* Copyright (c) 2012-2015, Robbert Krebbers. *) (* Copyright (c) 2012-2015, Robbert Krebbers. *)
(* This file is distributed under the terms of the BSD license. *) (* This file is distributed under the terms of the BSD license. *)
Require Export prelude.countable prelude.list. Require Export prelude.countable prelude.list.
Obligation Tactic := idtac.
Class Finite A `{ x y : A, Decision (x = y)} := { Class Finite A `{ x y : A, Decision (x = y)} := {
enum : list A; enum : list A;
......
...@@ -25,14 +25,14 @@ Next Obligation. by intros n X; simpl_map. Qed. ...@@ -25,14 +25,14 @@ Next Obligation. by intros n X; simpl_map. Qed.
Program Instance hashset_singleton: Singleton A (hashset hash) := λ x, Program Instance hashset_singleton: Singleton A (hashset hash) := λ x,
Hashset {[ hash x [x] ]} _. Hashset {[ hash x [x] ]} _.
Next Obligation. Next Obligation.
intros n l. rewrite lookup_singleton_Some. intros [<- <-]. intros x n l [<- <-]%lookup_singleton_Some.
rewrite Forall_singleton; auto using NoDup_singleton. rewrite Forall_singleton; auto using NoDup_singleton.
Qed. Qed.
Program Instance hashset_union: Union (hashset hash) := λ m1 m2, Program Instance hashset_union: Union (hashset hash) := λ m1 m2,
let (m1,Hm1) := m1 in let (m2,Hm2) := m2 in let (m1,Hm1) := m1 in let (m2,Hm2) := m2 in
Hashset (union_with (λ l k, Some (list_union l k)) m1 m2) _. Hashset (union_with (λ l k, Some (list_union l k)) m1 m2) _.
Next Obligation. Next Obligation.
intros n l'. rewrite lookup_union_with_Some. intros _ _ m1 Hm1 m2 Hm2 n l'; rewrite lookup_union_with_Some.
intros [[??]|[[??]|(l&k&?&?&?)]]; simplify_equality'; auto. intros [[??]|[[??]|(l&k&?&?&?)]]; simplify_equality'; auto.
split; [apply Forall_list_union|apply NoDup_list_union]; split; [apply Forall_list_union|apply NoDup_list_union];
first [by eapply Hm1; eauto | by eapply Hm2; eauto]. first [by eapply Hm1; eauto | by eapply Hm2; eauto].
...@@ -42,7 +42,7 @@ Program Instance hashset_intersection: Intersection (hashset hash) := λ m1 m2, ...@@ -42,7 +42,7 @@ Program Instance hashset_intersection: Intersection (hashset hash) := λ m1 m2,
Hashset (intersection_with (λ l k, Hashset (intersection_with (λ l k,
let l' := list_intersection l k in guard (l' []); Some l') m1 m2) _. let l' := list_intersection l k in guard (l' []); Some l') m1 m2) _.
Next Obligation. Next Obligation.
intros n l'. rewrite lookup_intersection_with_Some. intros _ _ m1 Hm1 m2 Hm2 n l'. rewrite lookup_intersection_with_Some.
intros (?&?&?&?&?); simplify_option_equality. intros (?&?&?&?&?); simplify_option_equality.
split; [apply Forall_list_intersection|apply NoDup_list_intersection]; split; [apply Forall_list_intersection|apply NoDup_list_intersection];
first [by eapply Hm1; eauto | by eapply Hm2; eauto]. first [by eapply Hm1; eauto | by eapply Hm2; eauto].
...@@ -52,7 +52,7 @@ Program Instance hashset_difference: Difference (hashset hash) := λ m1 m2, ...@@ -52,7 +52,7 @@ Program Instance hashset_difference: Difference (hashset hash) := λ m1 m2,
Hashset (difference_with (λ l k, Hashset (difference_with (λ l k,
let l' := list_difference l k in guard (l' []); Some l') m1 m2) _. let l' := list_difference l k in guard (l' []); Some l') m1 m2) _.
Next Obligation. Next Obligation.
intros n l'. rewrite lookup_difference_with_Some. intros _ _ m1 Hm1 m2 Hm2 n l'. rewrite lookup_difference_with_Some.
intros [[??]|(?&?&?&?&?)]; simplify_option_equality; auto. intros [[??]|(?&?&?&?&?)]; simplify_option_equality; auto.
split; [apply Forall_list_difference|apply NoDup_list_difference]; split; [apply Forall_list_difference|apply NoDup_list_difference];
first [by eapply Hm1; eauto | by eapply Hm2; eauto]. first [by eapply Hm1; eauto | by eapply Hm2; eauto].
......
...@@ -189,17 +189,11 @@ Proof. by injection 1. Qed. ...@@ -189,17 +189,11 @@ Proof. by injection 1. Qed.
Instance N_eq_dec: x y : N, Decision (x = y) := N.eq_dec. Instance N_eq_dec: x y : N, Decision (x = y) := N.eq_dec.
Program Instance N_le_dec (x y : N) : Decision (x y)%N := Program Instance N_le_dec (x y : N) : Decision (x y)%N :=
match Ncompare x y with match Ncompare x y with Gt => right _ | _ => left _ end.
| Gt => right _ Solve Obligations with naive_solver.
| _ => left _
end.
Next Obligation. congruence. Qed.
Program Instance N_lt_dec (x y : N) : Decision (x < y)%N := Program Instance N_lt_dec (x y : N) : Decision (x < y)%N :=
match Ncompare x y with match Ncompare x y with Lt => left _ | _ => right _ end.
| Lt => left _ Solve Obligations with naive_solver.
| _ => right _
end.
Next Obligation. congruence. Qed.
Instance N_inhabited: Inhabited N := populate 1%N. Instance N_inhabited: Inhabited N := populate 1%N.
Instance: PartialOrder ()%N. Instance: PartialOrder ()%N.
Proof. Proof.
...@@ -340,10 +334,12 @@ Arguments Qred _ : simpl never. ...@@ -340,10 +334,12 @@ Arguments Qred _ : simpl never.
Instance Qc_eq_dec: x y : Qc, Decision (x = y) := Qc_eq_dec. Instance Qc_eq_dec: x y : Qc, Decision (x = y) := Qc_eq_dec.
Program Instance Qc_le_dec (x y : Qc) : Decision (x y) := Program Instance Qc_le_dec (x y : Qc) : Decision (x y) :=
if Qclt_le_dec y x then right _ else left _. if Qclt_le_dec y x then right _ else left _.
Next Obligation. by apply Qclt_not_le. Qed. Next Obligation. intros x y; apply Qclt_not_le. Qed.
Next Obligation. done. Qed.
Program Instance Qc_lt_dec (x y : Qc) : Decision (x < y) := Program Instance Qc_lt_dec (x y : Qc) : Decision (x < y) :=
if Qclt_le_dec x y then left _ else right _. if Qclt_le_dec x y then left _ else right _.
Next Obligation. by apply Qcle_not_lt. Qed. Solve Obligations with done.
Next Obligation. intros x y; apply Qcle_not_lt. Qed.
Instance: PartialOrder (). Instance: PartialOrder ().
Proof. Proof.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment