diff --git a/.gitignore b/.gitignore index 4e7f023..82949e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ Makefile.coq Makefile.coq.conf +_build +docs *~ *.d *.aux @@ -7,4 +9,3 @@ Makefile.coq.conf *.vo *.vos *.vok -result diff --git a/Makefile.coq.local b/Makefile.coq.local index 7d0487e..a82e4a2 100644 --- a/Makefile.coq.local +++ b/Makefile.coq.local @@ -1,19 +1,20 @@ GLOBFILES = $(VFILES:.v=.glob) CSSFILES = resources/coqdoc.css resources/coqdocjs.css JSFILES = resources/config.js resources/coqdocjs.js -HTMLFILES = resources/header.html resources/footer.html resources/index.html +HTMLFILES = resources/header.html resources/footer.html +COQDOCDIR = docs/coqdoc COQDOCHTMLFLAGS = --toc --toc-depth 2 --index indexpage --html \ --interpolate --no-lib-name --parse-comments \ --with-header resources/header.html --with-footer resources/footer.html +coqdoc: $(GLOBFILES) $(VFILES) $(CSSFILES) $(JSFILES) $(HTMLFILES) + $(SHOW)'COQDOC -d $(COQDOCDIR)' + $(HIDE)mkdir -p $(COQDOCDIR) + $(HIDE)$(COQDOC) $(COQDOCHTMLFLAGS) $(COQDOCLIBS) -d $(COQDOCDIR) $(VFILES) + $(SHOW)'COPY resources' + $(HIDE)cp $(CSSFILES) $(JSFILES) $(COQDOCDIR) +.PHONY: coqdoc + resources/index.html: resources/index.md pandoc -s -o $@ $< - -docs: $(GLOBFILES) $(VFILES) $(CSSFILES) $(JSFILES) $(HTMLFILES) - $(SHOW)'COQDOC -d docs' - $(HIDE)mkdir -p docs - $(HIDE)$(COQDOC) $(COQDOCHTMLFLAGS) $(COQDOCLIBS) -d docs $(VFILES) - $(SHOW)'COPY resources' - $(HIDE)cp $(CSSFILES) $(JSFILES) resources/index.html docs -.PHONY: docs diff --git a/README.md b/README.md index 23e8729..8af155f 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ [gitter-link]: https://gitter.im/coq-community/Lobby [coqdoc-shield]: https://img.shields.io/badge/docs-coqdoc-blue.svg -[coqdoc-link]: https://coq-community.github.io/lemma-overloading/toc.html +[coqdoc-link]: https://coq-community.github.io/lemma-overloading/docs/latest/coqdoc/toc.html [doi-shield]: https://zenodo.org/badge/DOI/10.1017/S0956796813000051.svg [doi-link]: https://doi.org/10.1017/S0956796813000051 @@ -77,7 +77,7 @@ make install The Coq source files mentioned in the paper [How to make ad hoc proof automation less ad hoc][lessadhoc], Journal of Functional Programming 23(4), pp. 357-401, are described below. See also the -[coqdoc presentation][coqdoc] of the files. +[coqdoc presentation][coqdoc] of the files from the latest release. ### `indom.v` @@ -139,4 +139,4 @@ pp. 261-274. [lessadhoc]: https://software.imdea.org/~aleks/papers/lessadhoc/journal.pdf [reflect]: https://software.imdea.org/~aleks/papers/reflect/reflect.pdf -[coqdoc]: https://coq-community.github.io/lemma-overloading/toc.html +[coqdoc]: https://coq-community.github.io/lemma-overloading/docs/latest/coqdoc/toc.html diff --git a/docs/LemmaOverloading.auto.html b/docs/LemmaOverloading.auto.html deleted file mode 100644 index 2390256..0000000 --- a/docs/LemmaOverloading.auto.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.auto

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect seq.
-From LemmaOverloading
-Require Import rels.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(* Automated proving of a proposition in a logic with binders *)
-(* adapted from VeriML paper of Stampoulist and Shao. *)
- -
-(* first another searching structure; can probably be reused from some *)
-(* other file, but I don't bother now *)
-(* simply check if a proposition x is in the context g, represented as a list *)
- -
-Structure tagged_seq := TagS {untags :> seq Prop}.
- -
-Definition recurse := TagS.
-Canonical Structure found (g : seq Prop) := recurse g.
- -
-Structure find (x : Prop) :=
-  Find {seq_of :> tagged_seq;
-        _ : x \In untags seq_of}.
- -
-Program Canonical Structure
-  found_struct x g := @Find x (found (x :: g)) _.
-Next Obligation. by rewrite InE; left. Qed.
- -
-Program Canonical Structure
-  recurse_struct x y (g : find x) := @Find x (recurse (y :: g)) _.
-Next Obligation. by rewrite InE /=; right; case: g. Qed.
- -
-(* then a helper structure for controlling the information flow *)
-(* it is like the hoisting pattern *)
- -
-Structure equate_to (x : Prop) := Equate {assign :> Prop}.
- -
-Canonical Structure singleton x := Equate x x.
- -
-Structure check (x : Prop) (g : seq Prop) :=
-  Check {x_of :> equate_to x;
-         _ : assign x_of \In g}.
- -
-Program Canonical Structure
-  start x (f : find x) := @Check x f (singleton x) _.
-Next Obligation. by case: f=>[[]]. Qed.
- -
-(**************************************************************)
-(* Now the main body -- branches on the structure of the prop *)
-(**************************************************************)
- -
-(* if p is a conjunction, prove both sides *)
-(* if p is a disjunction, try to prove left then right side *)
-(* if p is an implication, put the hypothesis into the context g and recurse *)
-(* if p is a universal, abstract over the bound variable *)
-(* if neither, check if p is in the context g *)
- -
-Structure tagged_prop := Tag {untag :> Prop}.
- -
-Definition var_tag := Tag.
-Definition all_tag := var_tag.
-Definition imp_tag := all_tag.
-Definition orL_tag := imp_tag.
-Definition orR_tag := orL_tag.
-Canonical Structure and_tag p := orR_tag p.
- -
-Structure form (g : seq Prop) :=
-  Form {prop_of :> tagged_prop;
-        _ : foldr and True g -> untag prop_of}.
- -
-Program Canonical Structure
-  and_struct g (p1 p2 : form g) :=
-  @Form g (@and_tag (p1 /\ p2)) _.
-Next Obligation.
-case: p1 p2=>[[p1]] H1 [[p2]] H2.
-by split; [apply: H1 | apply: H2]; apply: H.
-Qed.
- -
-Program Canonical Structure
-  orL_struct g (p1 : form g) (p2 : Prop) :=
-  @Form g (@orL_tag (p1 \/ p2)) _.
-Next Obligation. by case: p1=>[[p1]] H1; left; apply: H1 H. Qed.
- -
-Program Canonical Structure
-  orR_struct g (p1 : Prop) (p2 : form g) :=
-  @Form g (@orR_tag (p1 \/ p2)) _.
-Next Obligation. by case: p2=>[[p2]] H2; right; apply: H2 H. Qed.
- -
-Program Canonical Structure
-  imp_struct g (p : Prop) (q : form (p :: g)) :=
-  @Form g (@imp_tag (p -> q)) _.
-Next Obligation. by case: q=>[[q]] H1; apply: H1. Qed.
- -
-Program Canonical Structure
-  all_struct A g (p : A -> form g) :=
-  @Form g (@all_tag (forall x, p x)) _.
-Next Obligation. by case: (p x)=>[[q]]; apply. Qed.
- -
-Program Canonical Structure
-  var_struct x g (c : check x g) :=
-  @Form g (@var_tag c) _ .
-Next Obligation.
-case: c=>[[p]] /=; elim: g H=>[//|t s IH] /=.
-case=>H1 H2; rewrite InE /=.
-by case; [move=>-> | apply: IH H2].
-Qed.
- -
-(* main lemma *)
- -
-Lemma auto (p : form [::]) : untag p.
-Proof. by case: p=>[[s]] H; apply: H. Qed.
- -
-(* examples *)
- -
-Example ex1 (p : Prop) : p -> p.
-Proof. by apply: auto. Qed.
- -
-Example ex2 (p : nat -> Prop) : (forall x, p x) -> (forall x, p x).
-Proof. by apply: auto. Qed.
- -
-Example ex3 (p : Prop) : p -> p /\ p.
-Proof. by apply: auto. Qed.
- -
-Example ex4 (p q : Prop) : p -> p /\ q.
-Proof. try apply: auto. Abort.
- -
-Example ex5 (p q : Prop) : p -> p \/ q.
-Proof. by apply: auto. Qed.
- -
-Example ex6 (p q : Prop) : p -> q \/ p.
-Proof. by apply: auto. Qed.
- -
-Example ex7 (p q : nat -> Prop) : forall x:nat, p x -> p x \/ q x.
-Proof. by apply: auto. Qed.
- -
-Example ex8 (p q : nat -> Prop) : forall x, p x -> q x -> p x /\ q x.
-Proof. by apply: auto. Qed.
- -
-(* this one doesn't work; need to make things more general for this *)
-Example ex9 (p : nat -> Prop) : (forall x, p x) -> p 3.
-Proof. try apply: auto. Abort.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.cancel.html b/docs/LemmaOverloading.cancel.html deleted file mode 100644 index 47d0b4b..0000000 --- a/docs/LemmaOverloading.cancel.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.cancel

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrfun ssrbool ssrnat seq eqtype.
-From LemmaOverloading
-Require Import prelude prefix xfind heaps terms.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(******************************************************************************)
-(* cancelR :                                                                  *)
-(*   Lemma automated with Canonical Structures to cancel heap expressions.    *)
-(*   Usage:                                                                   *)
-(*     apply (cancelR D) in H                                                 *)
-(*   where D : def h1 and H : h1 = h2                                         *)
-(******************************************************************************)
- -
-(* Syntactification of heaps *)
-Section HeapReflection.
- -
-(* The algorithm works as follow:
-   - if the heap is h1 :+ h2 then recurse over both and concatenate the results
-   - if the heap is the empty heap, return 
-   - if the heap is p :-> v then add p to the context, and return Pts x v,
-     where x is the deBruijn index for p in the context
-   - if the heap is whatever else, add the heap to the context and return
-     Var n, where n is the deBruijn index for the heap in the context
- *)

- -
-(* a tagging structure to control the flow of computation *)
-Structure tagged_heap := Tag {untag :> heap}.
- -
-(* in reversed order; first test for unions, then empty, pts and vars *)
-Definition var_tag := Tag.
-Definition pts_tag := var_tag.
-Definition empty_tag := pts_tag.
-Canonical Structure union_tag hc := empty_tag hc.
- -
-Definition invariant i j t h := [/\ interp j t = h, subctx i j & valid j t].
- -
-(* Main structure
-   i : input context
-   j : output context
-   t : syntactification of heap_of using context j *)

-Structure ast (i j : ctx) (t : synheap) :=
-  Ast {heap_of :> tagged_heap;
-       _ : invariant i j t heap_of}.
- -
-Arguments Ast : clear implicits.
- -
-Lemma union_pf i j k t1 t2 (f1 : ast i j t1) (f2 : ast j k t2) :
-        invariant i k (t1 ++ t2) (union_tag (f1 :+ f2)).
-Proof.
-case: f1 f2=>h1 /= [<- S1 D1] [h2 /= [<- S2 D2]].
-split; first by rewrite interp_cat (interp_subctx D1 S2).
-- by apply: (subctx_trans S1 S2).
-by rewrite valid_cat D2 andbT; apply: (valid_subctx S2).
-Qed.
- -
-(* pass output context of f1 as input of f2 *)
-Canonical Structure
-  union_struct i j k t1 t2 (f1 : ast i j t1) (f2 : ast j k t2) :=
-  Ast i k _ (union_tag (f1 :+ f2)) (union_pf f1 f2).
- -
-Lemma empty_pf i : invariant i i [::] (empty_tag empty).
-Proof. split; by [|apply: subctx_refl|]. Qed.
- -
-Canonical Structure empty_struct i :=
-  Ast i i [::] (empty_tag empty) (empty_pf i).
- -
-Lemma pts_pf A hs xs1 xs2 x (d : A) (xs : xfind xs1 xs2 x):
-        invariant (Context hs xs1) (Context hs xs2)
-                  [:: Pts x (dyn d)] (pts_tag (xuntag xs :-> d)).
-Proof.
-case: xs=>[p /= [H P]]; split; first by rewrite /= H.
-- by split; [apply: prefix_refl|].
-by apply/andP; rewrite /= (onth_size H).
-Qed.
- -
-Canonical Structure
-  pts_struct A hs xs1 xs2 x (d : A)
-           (xs : xfind xs1 xs2 x) :=
-  Ast (Context hs xs1) (Context hs xs2)
-       [:: Pts x (dyn d)]
-       (pts_tag (xuntag xs :-> d))
-       (pts_pf hs _ xs).
- -
-Lemma var_pf hs1 hs2 xs n (f : xfind hs1 hs2 n) :
-        invariant (Context hs1 xs) (Context hs2 xs) [:: Var n] (var_tag (xuntag f)).
-Proof.
-case:f=>p [H1 H2]; split; first by rewrite /= /hlook H1.
-- by split; [|apply: prefix_refl].
-by apply/andP; rewrite /= (onth_size H1).
-Qed.
- -
-Canonical Structure var_struct hs1 hs2 xs n (f : xfind hs1 hs2 n) :=
-  Ast (Context hs1 xs) (Context hs2 xs) _
-      (var_tag (xuntag f))
-      (var_pf xs f).
- -
-End HeapReflection.
- -
-(* The main lemma *)
-Theorem cancelR j k t1 t2 (f1 : ast empc j t1) (f2 : ast j k t2) :
-        def (untag (heap_of f1)) ->
-        untag (heap_of f1) = untag (heap_of f2) ->
-        eval k (cancel k t1 t2).
-Proof.
-case: f1 f2=>hp1 /= [<- _ I] [hp2 /= [<- S _]] D H.
-by apply: cancel_sound; rewrite -(interp_subctx I S).
-Qed.
- -
-(************)
-(* Examples *)
-(************)
-Example ex0 x (v1 v2:nat):
-          def (x :-> v1) -> x :-> v1 = x :-> v2 ->
-          v1 = v2.
-move=>D H.
-Time set H' := (cancelR D H).
-Time by rewrite (dyn_inj H').
-Time Qed.
- -
-Set Printing Implicit.
- -
-Example ex1 x h (v1 v2:nat):
-          def (x :-> v1 :+ h) -> x :-> v1 :+ h = x :-> v2 ->
-          if v1 == v2 then true else false.
-move=>D H.
-by rewrite (dyn_inj (proj2 (cancelR D H))) eq_refl.
-Qed.
- -
-Example ex2 h1 h2 h3 h4 x1 x2 (d1 d2 d3 d4 : nat) :
-     def ((h3 :+ (x1 :-> d1)) :+ (h1 :+ empty) :+ (x2 :-> d2)) ->
-     (h3 :+ (x1 :-> d1)) :+ (h1 :+ empty) :+ (x2 :-> d2) =
-     (x2 :-> d3) :+ (h2 :+ empty :+ h3) :+ h4 :+ (x1 :-> d4) ->
-     d1 = d4 /\ d2 = d3 /\ h1 = h2 :+ h4.
-move=>D.
-move/(cancelR D)=>/= [->][].
-by move/dyn_inj=>->; move/dyn_inj=>->.
-Qed.
- -
-Example ex1' x h (v1 v2:nat):
-          def (x :-> v1 :+ h) -> x :-> v1 :+ h = x :-> v2 ->
-          v1 = v2.
-move=>D H.
-set H' := cancelR D H.
-simpl in H'.
-by apply: (dyn_inj (proj2 (cancelR D H))).
-Qed.
- -
-Example stress
-     (h1 h2 h3 h4 h5 h6 h7 h8 h9 h10 : heap)
-     (x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : ptr) :
-     def (h1 :+ h2 :+ h3 :+ h4 :+ h5 :+ h6 :+ h7 :+ h8 :+ h9 :+ h10 :+
-     x1 :-> 1 :+ x2 :-> 2 :+ x3 :-> 3 :+ x4 :-> 4 :+ x5 :-> 5 :+
-     x6 :-> 6 :+ x7 :-> 7 :+ x8 :-> 8 :+ x9 :-> 9 :+ x10 :-> 10) ->
-     h1 :+ h2 :+ h3 :+ h4 :+ h5 :+ h6 :+ h7 :+ h8 :+ h9 :+ h10 :+
-     x1 :-> 1 :+ x2 :-> 2 :+ x3 :-> 3 :+ x4 :-> 4 :+ x5 :-> 5 :+
-     x6 :-> 6 :+ x7 :-> 7 :+ x8 :-> 8 :+ x9 :-> 9 :+ x10 :-> 10 =
-     x1 :-> 1 :+ x2 :-> 2 :+ x3 :-> 3 :+ x4 :-> 4 :+ x5 :-> 5 :+
-     h1 :+ h2 :+ h3 :+ h4 :+ h5 :+ h6 :+ h7 :+ h8 :+ h9 :+ h10 :+
-     x6 :-> 6 :+ x7 :-> 7 :+ x8 :-> 8 :+ x9 :-> 9 :+ x10 :-> 10 ->
-     True.
-move=>D.
-Time move/(cancelR D)=>/=.
-by [].
-Time Qed.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.cancel2.html b/docs/LemmaOverloading.cancel2.html deleted file mode 100644 index b0e697f..0000000 --- a/docs/LemmaOverloading.cancel2.html +++ /dev/null @@ -1,376 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.cancel2

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrfun ssrbool ssrnat seq eqtype.
-From LemmaOverloading
-Require Import prelude prefix heaps terms.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-Obligation Tactic := idtac.
- -
-Set Printing Existential Instances.
- -
-Structure pack_heap := PackHeap { pack_h :> heap }.
-Definition pack_found := PackHeap.
-Definition pack_right := pack_found.
-Canonical pack_left h := pack_right h.
- -
-Structure abs_pts x pts_A (pts_v : pts_A) pts_r :=
-  AbsPts {
-    pts_h :> pack_heap;
-    _ : pack_h pts_h = x :-> pts_v :+ pts_r }.
-Arguments AbsPts x [pts_A].
- -
-Definition pts_inv x A (v :A) r (f : abs_pts x v r) :=
-  match f return (pack_h f = x:->v:+r) with (AbsPts p i) => i end.
- -
-Program
-Canonical pts_found A x (v : A) :=
-  AbsPts x v empty (pack_found (x :-> v)) _.
-Next Obligation. by move=>A x v; rewrite unh0. Qed.
- -
-Program
-Canonical pts_left x A (v:A) r (a : abs_pts x v r) rh :=
-  AbsPts x v (r :+ rh) (pack_left (a :+ rh)) _.
-Next Obligation.
-move=>x A v r [rl /= ->] rh.
-by rewrite unA.
-Qed.
- -
-Program
-Canonical pts_right x A (v:A) r (a : abs_pts x v r) lh :=
-  AbsPts x v (lh :+ r) (pack_right (lh :+ a)) _.
-Next Obligation.
-move=>x A v r [rl /= ->] rh.
-by rewrite unCA.
-Qed.
- -
-Structure abs_heap h1 r :=
-  AbsHeap {
-    heap_h :> pack_heap;
-    _ : pack_h heap_h = h1 :+ r }.
-Arguments AbsHeap : clear implicits.
- -
-Definition heap_inv h r (f : abs_heap h r) :=
-  match f return pack_h f = h :+ r with
-    AbsHeap h' i => i
-  end.
- -
-Program
-Canonical heap_found h :=
-  AbsHeap h empty (pack_found h) _.
-Next Obligation. by move=>h; rewrite unh0. Qed.
- -
-Program
-Canonical heap_left h r (a : abs_heap h r) rh :=
-  AbsHeap h (r :+ rh) (pack_left (a :+ rh)) _.
-Next Obligation.
-move=>h r [lh /= ->] rh.
-by rewrite unA.
-Qed.
- -
-Program
-Canonical heap_right h r (a : abs_heap h r) lh :=
-  AbsHeap h (lh :+ r) (pack_right (lh :+ a)) _.
-Next Obligation.
-move=>h r [rh /= ->] rl.
-by rewrite unCA.
-Qed.
- -
-Structure trigger := Pack { unpack :> unit }.
-Definition pack10 := Pack.
-Definition pack09 := pack10.
-Definition pack08 := pack09.
-Definition pack07 := pack08.
-Definition pack06 := pack07.
-Definition pack05 := pack06.
-Definition pack04 := pack05.
-Definition pack03 := pack04.
-Definition pack02 := pack03.
-Definition pack01 := pack02.
-Canonical pack00 := pack01 tt.
- -
-Structure heapeq lh rh r (D : def rh) (I : lh :+ r = rh) := HeapEq {
-  dummy : trigger;
-  prop : Prop;
-  proof : prop
-}.
- -
-Program
-Canonical ins1 :=
-  @HeapEq empty empty empty def0 _ pack00 _ I.
-Next Obligation.
-by rewrite unh0.
-Qed.
- -
-Program
-Canonical ins2 h2 (d : def h2) (i : empty :+ empty = h2) :=
-  @HeapEq empty h2 empty d i (pack01 tt) (h2 = empty) _.
-Next Obligation.
-move=>h2; by rewrite unh0.
-Qed.
- -
-Program
-Canonical ins3 h2 r (d : def h2) (i : empty :+ r = h2) :=
-  @HeapEq empty h2 r d i (pack02 tt) (h2 = r) _.
-Next Obligation.
-move=>h2 r; by rewrite un0h.
-Qed.
- -
-Program
-Canonical ins4 x A (v : A) r A' (v':A') r' (pf : abs_pts x v' r') (d : def (pts_h pf))
-               (i : x:->v :+ r = (pts_h pf)) (rec : @heapeq empty r' r _ _) :=
-  @HeapEq (x:->v) (pts_h pf) r d i (pack03 (dummy rec)) (dyn v = dyn v' /\ prop rec) _.
-Next Obligation.
-move=>x A v r A' v' r' [h2 /= ->] D H.
-by apply: (defUnr D).
-Qed.
-Next Obligation.
-move=>x A v r A' v' r' [h2 /= ->] D H.
-symmetry in H.
-move: (cancelT D H)=>T.
-move: v H.
-rewrite -T.
-move=>v.
-move/(heaps.cancel D).
-move=>[_ _ ->].
-by rewrite un0h.
-Qed.
-Next Obligation.
-move=>x A v r A' v' r' [h2 /= I] D H rec.
-split; last by apply: (proof rec).
-move=>{rec}.
-rewrite I in H, D.
-symmetry in H.
-move: (cancelT D H)=>T.
-move: v H.
-rewrite -T.
-move=>v.
-move/(heaps.cancel D).
-by move=>[->].
-Qed.
- -
-Program
-Canonical ins5 x A (v : A) h2 r (d : def h2)
-               (i : x:->v :+ r = h2) (rec : @heapeq empty h2 (x:->v :+ r) d _) :=
-  @HeapEq (x:->v) h2 r d i (pack04 (dummy rec)) _ (proof rec).
-Next Obligation.
-by move=>*;rewrite un0h.
-Qed.
- -
-Program
-Canonical ins6 x A (v : A) h1 r A' (v' : A') r' (pf : abs_pts x v' r') (d : def (pts_h pf))
-               (i : (x:->v :+ h1) :+ r = (pts_h pf)) (rec : @heapeq h1 r' r _ _) :=
-  @HeapEq (x:->v:+h1) (pts_h pf) r d i (pack05 (dummy rec)) (dyn v = dyn v' /\ prop rec) _.
-Next Obligation.
-move=>x A v h1 r A' v' r' [h2 /= ->] D H.
-by apply: (defUnr D).
-Qed.
-Next Obligation.
-move=>x A v h1 r A' v' r' [h2 /= ->] D H.
-symmetry in H.
-rewrite -unA in H.
-move: (cancelT D H)=>T.
-move: v H.
-rewrite -T.
-move=>v.
-move/(heaps.cancel D).
-by move=>[_ _ ->].
-Qed.
-Next Obligation.
-move=>x A v h1 r A' v' r' [h2 /= I] D H rec.
-split; last by apply: (proof rec).
-move=>{rec}.
-rewrite I in H, D.
-symmetry in H.
-rewrite -unA in H.
-move: (cancelT D H)=>T.
-move: v H.
-rewrite -T.
-move=>v.
-move/(heaps.cancel D).
-by move=>[->].
-Qed.
- -
-Program
-Canonical ins7 x A (v : A) h1 h2 r (d : def h2)
-               (i : (x:->v :+ h1) :+ r = h2) (rec : @heapeq h1 h2 (x:->v:+r) d _) :=
-  @HeapEq (x:->v:+h1) h2 r d i (pack06 (dummy rec)) _ (proof rec).
-Next Obligation.
-move=>x A v h1 h2 r D H.
-by rewrite unCA unA.
-Qed.
- -
-Program
-Canonical ins8 h1 h2 r r' (pf : abs_heap h1 r') (d : def (heap_h pf)) (i : (h1 :+ h2) :+ r = heap_h pf)
-               (rec : @heapeq h2 r' r _ _) :=
-  @HeapEq (h1 :+ h2) (heap_h pf) r d i (pack07 (dummy rec)) _ (proof rec).
-Next Obligation.
-move=>h1 h2 r r' [hr /= ->] D H.
-by apply: (defUnr D).
-Qed.
-Next Obligation.
-move=>h1 h2 r r' [hr /= I] D H.
-rewrite -H in D.
-rewrite -unA unC in H, D.
-rewrite I (unC _ r') in H.
-by apply (eqUh D H).
-Qed.
- -
-Program
-Canonical ins9 h1 h2 r hr (d : def hr) (i : (h1 :+ h2) :+ r = hr)
-               (rec : @heapeq h2 hr (h1 :+ r) d _) :=
-  @HeapEq (h1 :+ h2) hr r d i (pack08 (dummy rec)) _ (proof rec).
-Next Obligation.
-move=>h1 h2 r hr D <-.
-by rewrite unCA unA.
-Qed.
- -
-Program
-Canonical ins10 h1 r r' (pf : abs_heap h1 r') (d : def (heap_h pf)) (i : h1 :+ r = heap_h pf)
-               (rec : @heapeq empty r' r _ _) :=
-  @HeapEq h1 (heap_h pf) r d i (pack09 (dummy rec)) _ (proof rec).
-Next Obligation.
-move=>h1 r r' [hr /= ->] D H.
-by apply: (defUnr D).
-Qed.
-Next Obligation.
-move=>h1 r r' [hr /= I] D H.
-rewrite -H in D.
-rewrite unC in H, D.
-rewrite I (unC _ r') in H.
-by rewrite un0h; apply (eqUh D H).
-Qed.
- -
-Canonical insLast h1 h2 r (d : def h2) (i : h1 :+r = h2) :=
-  @HeapEq h1 h2 r d i (pack10 tt) (h1 :+ r = h2) i.
- -
-Lemma cancel1 :
-forall h1 h2 : heap, def h1 -> h1 = h2 -> def h2.
-Proof. by move=>h1 h2 D <-. Qed.
- -
-Lemma cancel2 :
-forall h1 h2 : heap, h1 = h2 -> h1 :+ empty = h2.
-Proof. by move=>h1 h2 ->; apply: unh0. Qed.
- -
-Lemma cancel (h1 h2 : heap) (D : def h1) (H : h1 = h2)
-  (c : @heapeq h1 h2 empty (cancel1 D H) (cancel2 H)) :
-  tt = dummy c -> prop c.
-move=>_.
-apply c.
-Qed.
-Arguments cancel [h1 h2] D H [c].
- -
-Example ex3 h1 h3 x1 x2 (d1 d2 d3 d4 : nat) :
-     def ((h3 :+ (x1 :-> d1)) :+ h1 :+ (x2 :-> d2)) ->
-     (h3 :+ (x1 :-> d1)) :+ h1 :+ (x2 :-> d2) =
-     (x2 :-> d3) :+ h3 :+ (x1 :-> d4) ->
-     d1 = d4 /\ d2 = d3 /\ h1 = empty.
-rewrite -!unA.
-move=>D H.
-Time set H' := cancel D H (erefl _).
-simpl in H'.
-Time case: H'=>/=.
-move/dyn_inj=>->[]; move/dyn_inj=>->.
-by rewrite !un0h unh0=>->.
-Time Qed.
- -
-Example stress
-     (h1 h2 h3 h4 h5 h6 h7 h8 h9 h10 : heap)
-     (x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : ptr) :
-     def (x6 :-> 6 :+ x7 :-> 7 :+ x8 :-> 8 :+ x9 :-> 9 :+ x10 :-> 10) ->
-     x6 :-> 6 :+ x7 :-> 7 :+ x8 :-> 8 :+ x9 :-> 9 :+ x10 :-> 10 =
-     x6 :-> 6 :+ x7 :-> 7 :+ x8 :-> 8 :+ x9 :-> 9 :+ x10 :-> 10 ->
-     True.
-move=>D H.
-rewrite -!unA in D H.
-Time move: (cancel D H (erefl _)).
-Abort.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.cancelCTC.html b/docs/LemmaOverloading.cancelCTC.html deleted file mode 100644 index 22f8cf6..0000000 --- a/docs/LemmaOverloading.cancelCTC.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.cancelCTC

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool ssrnat seq eqtype.
-From LemmaOverloading
-Require Import prelude heaps terms prefix xfindCTC.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-Definition invariant i j t h := [/\ interp j t = h, subctx i j & valid j t].
- -
-(* Main structure
-   i : input context
-   j : output context
-   t : syntactification of heap_of using context j *)

-Class Ast (i j : ctx) (t : synheap) (h : heap) :=
-       { ast : invariant i j t h}.
- -
-Arguments Ast : clear implicits.
- -
-(* pass output context of f1 as input of f2 *)
-Program Instance
-  union_struct i j k t1 t2 h1 h2 (f1 : Ast i j t1 h1) (f2 : Ast j k t2 h2) :
-  Ast i k (t1 ++ t2) (h1 :+ h2) | 3.
-Next Obligation.
-case: f1 f2=>[[<- S1 D1]] [[<- S2 D2]].
-split; first by rewrite interp_cat (interp_subctx D1 S2).
-- by apply: (subctx_trans S1 S2).
-by rewrite valid_cat D2 andbT; apply: (valid_subctx S2).
-Qed.
- -
-Program Instance empty_struct i :
-  Ast i i [::] empty | 1.
-Next Obligation.
-split; by [|apply: subctx_refl|].
-Qed.
- -
-Program Instance
-  pts_struct A hs xs1 x (d : A)
-           (f : XFind xs1 x) :
-  Ast (Context hs xs1) (Context hs seq_of)
-       [:: Pts index_of (dyn d)]
-       (x :-> d) | 2.
-Next Obligation.
-case: f=>[xs2 n /= [H P]]; split; first by rewrite /= H.
-- by split; [apply: prefix_refl|].
-by apply/andP; rewrite /= (onth_size H).
-Qed.
- -
-Program Instance var_struct hs1 xs h (f : XFind hs1 h) :
-  Ast (Context hs1 xs) (Context seq_of xs) [:: Var index_of] h | 1000.
-Next Obligation.
-case:f=>hs2 n [H1 H2]; split; first by rewrite /= /hlook H1.
-- by split; [|apply: prefix_refl].
-by apply/andP; rewrite /= (onth_size H1).
-Qed.
- -
-(* The main lemma *)
-Theorem cancelR j k t1 t2 h1 h2 (f1 : Ast empc j t1 h1) (f2 : Ast j k t2 h2) :
-        def h1 ->
-        h1 = h2 ->
-        eval k (cancel k t1 t2).
-Proof.
-case: f1 f2=>[[<- _ I]] [[<- S _]] D H.
-by apply: cancel_sound; rewrite -(interp_subctx I S).
-Qed.
- -
-Arguments cancelR [j k t1 t2 h1 h2 f1 f2].
- -
-(************)
-(* Examples *)
-(************)
-Example ex1 x (h:heap) (v1 v2:nat):
-          def (x :-> v1) -> x :-> v1 = x :-> v2 ->
-          if v1 == v2 then true else false.
-move=>D H.
-apply (cancelR D) in H. simpl in H.
-by move/dyn_inj: H=>->; rewrite eq_refl.
-Abort.
- -
-Example ex2 h1 h2 h3 h4 x1 x2 (d1 d2 d3 d4 : nat) :
-     def ((h3 :+ (x1 :-> d1)) :+ (h1 :+ empty) :+ (x2 :-> d2)) ->
-     (h3 :+ (x1 :-> d1)) :+ (h1 :+ empty) :+ (x2 :-> d2) =
-     (x2 :-> d3) :+ (h2 :+ empty :+ h3) :+ h4 :+ (x1 :-> d4) ->
-     d1 = d4 /\ d2 = d3 /\ h1 = h2 :+ h4.
-move=>D H.
-generalize (cancelR D H). move=>/= [->][].
-by move/dyn_inj=>->; move/dyn_inj=>->.
-Qed.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.cancelD.html b/docs/LemmaOverloading.cancelD.html deleted file mode 100644 index f6b5d61..0000000 --- a/docs/LemmaOverloading.cancelD.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.cancelD

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool.
-From LemmaOverloading
-Require Import prelude xfind heaps cancel.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(* Wrap over cancelR to simplify equations of the form
-      dyn d1 = dyn d2       (1)
-   into
-          d1 = d2           (2)
-   if d1 and d2 has both the same type A.
-
-   The idea is simple: search in the output of cancelR expressions like (1)
-   and output the equation (2). The rest of the propositions are outputted
-   as they are. The output of cancelR has the shape
-      p1 /\ ... /\ pn
-   so we only care about the /\.
-
-   The final automated lemma, cancelRR, use another nice pattern to trigger
-   the canonical structure inference mechanism. It works by equating a
-   proposition p with itself, so we can have the output of cancelR in one
-   side, the projector of the structure on the other side, and make them
-   match with a singleton object that just match them.
-*)

- -
-Structure tagged_prop := Tag {puntag :> Prop}.
- -
-Definition default_tag := Tag.
-Definition dyneq_tag := default_tag.
-Canonical Structure and_tag p := dyneq_tag p.
- -
-Structure form (p : Prop) :=
-  Form {prop_of :> tagged_prop;
-        _ : p <-> puntag prop_of}.
- -
-Program
-Canonical Structure
-  conj_struct p1 p2 (f1 : form p1) (f2 : form p2) :=
-  @Form (p1 /\ p2) (and_tag (f1 /\ f2)) _.
-Next Obligation.
-by split; case: f1 f2=>[[f1]] H1 [[f2]] H2 /=; rewrite H1 H2.
-Qed.
- -
-Program
-Canonical Structure
-  dyneq_struct A (v1 v2 : A) :=
-  @Form (v1 = v2) (dyneq_tag (dyn v1 = dyn v2)) _.
-Next Obligation.
-by split=>[-> //|]; move/dyn_inj.
-Qed.
- -
-Program
-Canonical Structure
-  default_struct p :=
-   @Form p (default_tag p) _.
-Next Obligation.
-by [].
-Qed.
- -
-Lemma simplify p (g : form p) : puntag (prop_of g) -> p.
-Proof.
by case: g=>/= p' <-.
-Qed.
- -
-Notation cancelD D H := (simplify (cancelR D H)).
- -
-Example ex3 h1 h2 h3 h4 x1 x2 (d1 d2 d3 d4 : nat) :
-     def ((h3 :+ (x1 :-> d1)) :+ (h1 :+ empty) :+ (x2 :-> d2)) ->
-     (h3 :+ (x1 :-> d1)) :+ (h1 :+ empty) :+
-     (x2 :-> d2) = (x2 :-> d3) :+ (h2 :+ empty :+ h3) :+ h4 :+ (x1 :-> d4) ->
-     d1 = d4 /\ d2 = d3 /\ h1 = h2 :+ h4.
-Proof.
-move=>D H.
-move: (cancelD D H)=>/=.
-by move=>[-> [-> ->]].
-Qed.
- -
-
-
- -
- - - diff --git a/docs/LemmaOverloading.domains.html b/docs/LemmaOverloading.domains.html deleted file mode 100644 index 50e2f85..0000000 --- a/docs/LemmaOverloading.domains.html +++ /dev/null @@ -1,1805 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.domains

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool ssrfun ssrnat eqtype.
-From LemmaOverloading
-Require Import rels prelude.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(**********)
-(* Posets *)
-(**********)
- -
-(* We put bottom in posets right away, instead of adding it later both in *)
-(* lattices and in cpos. Since we never consider bottom-less posets, this *)
-(* saves some tedium and name space. *)
- -
-Module Poset.
- -
-Section RawMixin.
- -
-Record mixin_of (T : Type) := Mixin {
-  mx_leq : T -> T -> Prop;
-  mx_bot : T;
-  _ : forall x, mx_leq mx_bot x;
-  _ : forall x, mx_leq x x;
-  _ : forall x y, mx_leq x y -> mx_leq y x -> x = y;
-  _ : forall x y z, mx_leq x y -> mx_leq y z -> mx_leq x z}.
- -
-End RawMixin.
- -
-Section ClassDef.
- -
-Record class_of T := Class {mixin : mixin_of T}.
- -
-Structure type : Type := Pack {sort : Type; _ : class_of sort; _ : Type}.
-Local Coercion sort : type >-> Sortclass.
- -
-Variables (T : Type) (cT : type).
-Definition class := let: Pack _ c _ as cT' := cT return class_of cT' in c.
-Definition clone c of phant_id class c := @Pack T c T.
- -
-(* produce a poset type out of the mixin *)
-(* equalize m0 and m by means of a phantom *)
-Definition pack (m0 : mixin_of T) :=
-  fun m & phant_id m0 m => Pack (@Class T m) T.
- -
-Definition leq := mx_leq (mixin class).
-Definition bot := mx_bot (mixin class).
- -
-End ClassDef.
- -
-Module Exports.
-Coercion sort : type >-> Sortclass.
-Notation poset := Poset.type.
-Notation PosetMixin := Poset.Mixin.
-Notation Poset T m := (@pack T _ m id).
- -
-Notation "[ 'poset' 'of' T 'for' cT ]" := (@clone T cT _ id)
-  (at level 0, format "[ 'poset' 'of' T 'for' cT ]") : form_scope.
-Notation "[ 'poset' 'of' T ]" := (@clone T _ _ id)
-  (at level 0, format "[ 'poset' 'of' T ]") : form_scope.
- -
-Notation "x <== y" := (Poset.leq x y) (at level 70).
-Notation bot := Poset.bot.
- -
-Arguments Poset.bot {cT}.
-Prenex Implicits Poset.bot.
- -
-(* re-state lattice properties using the exported notation *)
-Section Laws.
-Variable T : poset.
- -
-Lemma botP (x : T) : bot <== x.
-Proof. by case: T x=>s [[leq b B]]. Qed.
- -
-Lemma poset_refl (x : T) : x <== x.
-Proof. by case: T x=>S [[leq b B R]]. Qed.
- -
-Lemma poset_asym (x y : T) : x <== y -> y <== x -> x = y.
-Proof. by case: T x y=>S [[l b B R A Tr]] *; apply: (A). Qed.
- -
-Lemma poset_trans (y x z : T) : x <== y -> y <== z -> x <== z.
-Proof. by case: T y x z=>S [[l b B R A Tr]] ? x y z; apply: (Tr). Qed.
- -
-End Laws.
- -
-Hint Resolve botP poset_refl : core.
- -
-Add Parametric Relation (T : poset) : T (@Poset.leq T)
-  reflexivity proved by (@poset_refl _)
-  transitivity proved by (fun x y => @poset_trans _ y x) as poset_rel.
- -
-End Exports.
- -
-End Poset.
- -
-Export Poset.Exports.
- -
-(**************************)
-(* some basic definitions *)
-(**************************)
- -
-Definition monotone (T1 T2 : poset) (f : T1 -> T2) :=
-  forall x y, x <== y -> f x <== f y.
- -
-Section IdealDef.
-Variable T : poset.
- -
-Structure ideal (P : T) := Ideal {id_val : T; id_pf : id_val <== P}.
- -
-(* Changing the type of the ideal *)
- -
-Lemma relaxP (P1 P2 : T) : P1 <== P2 -> forall p, p <== P1 -> p <== P2.
-Proof. by move=>H1 p H2; apply: poset_trans H1. Qed.
- -
-Definition relax (P1 P2 : T) (x : ideal P1) (pf : P1 <== P2) :=
-  Ideal (relaxP pf (id_pf x)).
- -
-End IdealDef.
- -
-(***********************)
-(* poset constructions *)
-(***********************)
- -
-Section SubPoset.
-Variables (T : poset) (s : Pred T) (C : bot \In s).
- -
-Local Notation tp := {x : T | x \In s}.
- -
-Definition sub_bot : tp := exist _ bot C.
-Definition sub_leq (p1 p2 : tp) := sval p1 <== sval p2.
- -
-Lemma sub_botP x : sub_leq sub_bot x.
-Proof. by apply: botP. Qed.
- -
-Lemma sub_refl x : sub_leq x x.
-Proof. by rewrite /sub_leq. Qed.
- -
-Lemma sub_asym x y : sub_leq x y -> sub_leq y x -> x = y.
-Proof.
-move: x y=>[x Hx][y Hy]; rewrite /sub_leq /= => H1 H2.
-move: (poset_asym H1 H2) Hy=> <- Hy; congr exist.
-by apply: proof_irrelevance.
-Qed.
- -
-Lemma sub_trans x y z : sub_leq x y -> sub_leq y z -> sub_leq x z.
-Proof.
-move: x y z=>[x Hx][y Hy][z Hz]; rewrite /sub_leq /=.
-by apply: poset_trans.
-Qed.
- -
-(* no need to put canonical here, because the system won't be *)
-(* able to get the proof C from the {x : T | x \In s} syntax *)
-Definition subPosetMixin := PosetMixin sub_botP sub_refl sub_asym sub_trans.
-Definition subPoset := Eval hnf in Poset tp subPosetMixin.
- -
-End SubPoset.
- -
-(* pairing of posets *)
- -
-Section PairPoset.
-Variable (A B : poset).
-Local Notation tp := (A * B)%type.
- -
-Definition pair_bot : tp := (bot, bot).
-Definition pair_leq (p1 p2 : tp) := p1.1 <== p2.1 /\ p1.2 <== p2.2.
- -
-Lemma pair_botP x : pair_leq pair_bot x.
-Proof. by split; apply: botP. Qed.
- -
-Lemma pair_refl x : pair_leq x x.
-Proof. by []. Qed.
- -
-Lemma pair_asym x y : pair_leq x y -> pair_leq y x -> x = y.
-Proof.
-move: x y=>[x1 x2][y1 y2][/= H1 H2][/= H3 H4].
-by congr (_, _); apply: poset_asym.
-Qed.
- -
-Lemma pair_trans x y z : pair_leq x y -> pair_leq y z -> pair_leq x z.
-Proof.
-move: x y z=>[x1 x2][y1 y2][z1 z2][/= H1 H2][/= H3 H4]; split=>/=.
-- by apply: poset_trans H3.
-by apply: poset_trans H4.
-Qed.
- -
-Definition pairPosetMixin :=
-  PosetMixin pair_botP pair_refl pair_asym pair_trans.
-Canonical pairPoset := Eval hnf in Poset tp pairPosetMixin.
- -
-End PairPoset.
- -
-(* functions into a poset form a poset *)
- -
-Section FunPoset.
-Variable (A : Type) (B : poset).
-Local Notation tp := (A -> B).
- -
-Definition fun_bot : tp := fun x => bot.
-Definition fun_leq (p1 p2 : tp) := forall x, p1 x <== p2 x.
- -
-Lemma fun_botP x : fun_leq fun_bot x.
-Proof. by move=>y; apply: botP. Qed.
- -
-Lemma fun_refl x : fun_leq x x.
-Proof. by []. Qed.
- -
-Lemma fun_asym x y : fun_leq x y -> fun_leq y x -> x = y.
-Proof.
-move=>H1 H2; apply: fext=>z;
-by apply: poset_asym; [apply: H1 | apply: H2].
-Qed.
- -
-Lemma fun_trans x y z : fun_leq x y -> fun_leq y z -> fun_leq x z.
-Proof. by move=>H1 H2 t; apply: poset_trans (H2 t). Qed.
- -
-Definition funPosetMixin := PosetMixin fun_botP fun_refl fun_asym fun_trans.
-Canonical funPoset := Eval hnf in Poset tp funPosetMixin.
- -
-End FunPoset.
- -
-(* dependent functions into a poset form a poset *)
- -
-Section DFunPoset.
-Variables (A : Type) (B : A -> poset).
-Local Notation tp := (forall x, B x).
- -
-Definition dfun_bot : tp := fun x => bot.
-Definition dfun_leq (p1 p2 : tp) := forall x, p1 x <== p2 x.
- -
-Lemma dfun_botP x : dfun_leq dfun_bot x.
-Proof. by move=>y; apply: botP. Qed.
- -
-Lemma dfun_refl x : dfun_leq x x.
-Proof. by []. Qed.
- -
-Lemma dfun_asym x y : dfun_leq x y -> dfun_leq y x -> x = y.
-Proof.
-move=>H1 H2; apply: fext=>z;
-by apply: poset_asym; [apply: H1 | apply: H2].
-Qed.
- -
-Lemma dfun_trans x y z : dfun_leq x y -> dfun_leq y z -> dfun_leq x z.
-Proof. by move=>H1 H2 t; apply: poset_trans (H2 t). Qed.
- -
-(* no point in declaring this canonical, since it's keyed on forall *)
-(* and forall is not a symbol *)
-Definition dfunPosetMixin :=
-  PosetMixin dfun_botP dfun_refl dfun_asym dfun_trans.
-Definition dfunPoset := Eval hnf in Poset tp dfunPosetMixin.
- -
-End DFunPoset.
- -
-(* ideal of a poset is a poset *)
- -
-Section IdealPoset.
-Variable (T : poset) (P : T).
- -
-Definition ideal_bot := Ideal (botP P).
-Definition ideal_leq (p1 p2 : ideal P) := id_val p1 <== id_val p2.
- -
-Lemma ideal_botP x : ideal_leq ideal_bot x.
-Proof. by apply: botP. Qed.
- -
-Lemma ideal_refl x : ideal_leq x x.
-Proof. by case: x=>x H; rewrite /ideal_leq. Qed.
- -
-Lemma ideal_asym x y : ideal_leq x y -> ideal_leq y x -> x = y.
-Proof.
-move: x y=>[x1 H1][x2 H2]; rewrite /ideal_leq /= => H3 H4; move: H1 H2.
-rewrite (poset_asym H3 H4)=>H1 H2.
-congr Ideal; apply: proof_irrelevance.
-Qed.
- -
-Lemma ideal_trans x y z : ideal_leq x y -> ideal_leq y z -> ideal_leq x z.
-Proof. by apply: poset_trans. Qed.
- -
-Definition idealPosetMixin :=
-  PosetMixin ideal_botP ideal_refl ideal_asym ideal_trans.
-Canonical idealPoset := Eval hnf in Poset (ideal P) idealPosetMixin.
- -
-End IdealPoset.
- -
-(* Prop is a poset *)
- -
-Section PropPoset.
- -
-Definition prop_bot := False.
-Definition prop_leq (p1 p2 : Prop) := p1 -> p2.
- -
-Lemma prop_botP x : prop_leq prop_bot x.
-Proof. by []. Qed.
- -
-Lemma prop_refl x : prop_leq x x.
-Proof. by []. Qed.
- -
-Lemma prop_asym x y : prop_leq x y -> prop_leq y x -> x = y.
-Proof. by move=>H1 H2; apply: pext. Qed.
- -
-Lemma prop_trans x y z : prop_leq x y -> prop_leq y z -> prop_leq x z.
-Proof. by move=>H1 H2; move/H1. Qed.
- -
-Definition propPosetMixin :=
-  PosetMixin prop_botP prop_refl prop_asym prop_trans.
-Canonical propPoset := Eval hnf in Poset Prop propPosetMixin.
- -
-End PropPoset.
- -
-(* Pred is a poset *)
- -
-(* Can be inherited from posets of -> and Prop, but we declare a *)
-(* dedicated structure to keep the infix notation of Pred. Otherwise, *)
-(* poset inference turns Pred A into A -> Prop. *)
- -
-Section PredPoset.
-Variable A : Type.
- -
-Definition predPosetMixin : Poset.mixin_of (Pred A) :=
-  funPosetMixin A propPoset.
-Canonical predPoset := Eval hnf in Poset (Pred A) predPosetMixin.
- -
-End PredPoset.
- -
-(* nat is a poset *)
-Section NatPoset.
- -
-Lemma nat_botP x : 0 <= x. Proof. by []. Qed.
-Lemma nat_refl x : x <= x. Proof. by []. Qed.
- -
-Lemma nat_asym x y : x <= y -> y <= x -> x = y.
-Proof. by move=>H1 H2; apply: anti_leq; rewrite H1 H2. Qed.
- -
-Lemma nat_trans x y z : x <= y -> y <= z -> x <= z.
-Proof. by apply: leq_trans. Qed.
- -
-Definition natPosetMixin := PosetMixin nat_botP nat_refl nat_asym nat_trans.
-Canonical natPoset := Eval hnf in Poset nat natPosetMixin.
- -
-End NatPoset.
- -
-(*********************)
-(* Complete lattices *)
-(*********************)
- -
-Module Lattice.
- -
-Section RawMixin.
- -
-Variable T : poset.
- -
-Record mixin_of := Mixin {
-  mx_sup : Pred T -> T;
-  _ : forall (s : Pred T) x, x \In s -> x <== mx_sup s;
-  _ : forall (s : Pred T) x,
-        (forall y, y \In s -> y <== x) -> mx_sup s <== x}.
- -
-End RawMixin.
- -
-Section ClassDef.
- -
-Record class_of (T : Type) := Class {
-  base : Poset.class_of T;
-  mixin : mixin_of (Poset.Pack base T)}.
- -
-Local Coercion base : class_of >-> Poset.class_of.
- -
-Structure type : Type := Pack {sort : Type; _ : class_of sort; _ : Type}.
-Local Coercion sort : type >-> Sortclass.
- -
-Variables (T : Type) (cT : type).
-Definition class := let: Pack _ c _ as cT' := cT return class_of cT' in c.
-Definition clone c of phant_id class c := @Pack T c T.
- -
-(* produce a lattice type out of the mixin *)
-(* equalize m0 and m by means of a phantom *)
-Definition pack b0 (m0 : mixin_of (Poset.Pack b0 T)) :=
-  fun m & phant_id m0 m => Pack (@Class T b0 m) T.
- -
-Definition sup (s : Pred cT) : cT := mx_sup (mixin class) s.
- -
-Definition poset := Poset.Pack class cT.
- -
-End ClassDef.
- -
-Module Exports.
-Coercion base : class_of >-> Poset.class_of.
-Coercion sort : type >-> Sortclass.
-Coercion poset : type >-> Poset.type.
-Canonical Structure poset.
- -
-Notation lattice := Lattice.type.
-Notation LatticeMixin := Lattice.Mixin.
-Notation Lattice T m := (@pack T _ _ m id).
- -
-Notation "[ 'lattice' 'of' T 'for' cT ]" := (@clone T cT _ id)
-  (at level 0, format "[ 'lattice' 'of' T 'for' cT ]") : form_scope.
-Notation "[ 'lattice' 'of' T ]" := (@clone T _ _ id)
-  (at level 0, format "[ 'lattice' 'of' T ]") : form_scope.
- -
-Arguments Lattice.sup [cT].
-Prenex Implicits Lattice.sup.
-Notation sup := Lattice.sup.
- -
-(* re-state lattice properties using the exported notation *)
-Section Laws.
-Variable T : lattice.
- -
-Lemma supP (s : Pred T) x : x \In s -> x <== sup s.
-Proof. by case: T s x=>S [[p]][/= s H1 *]; apply: H1. Qed.
- -
-Lemma supM (s : Pred T) x : (forall y, y \In s -> y <== x) -> sup s <== x.
-Proof. by case: T s x=>S [[p]][/= s H1 H2 *]; apply: (H2). Qed.
- -
-End Laws.
- -
-End Exports.
- -
-End Lattice.
- -
-Export Lattice.Exports.
- -
-(* we have greatest lower bounds too *)
-Section Infimum.
-Variable T : lattice.
- -
-Definition inf (s : Pred T) :=
-  sup [Pred x : T | forall y, y \In s -> x <== y].
- -
-Lemma infP s : forall x, x \In s -> inf s <== x.
-Proof. by move=>x H; apply: supM=>y; apply. Qed.
- -
-Lemma infM s : forall x, (forall y, y \In s -> x <== y) -> x <== inf s.
-Proof. by apply: supP. Qed.
- -
-End Infimum.
- -
-(* we can compute least and greatest fixed points *)
- -
-Section Lat.
-Variable T : lattice.
- -
-Definition tarski_lfp (f : T -> T) := inf [Pred x : T | f x <== x].
-Definition tarski_gfp (f : T -> T) := sup [Pred x : T | x <== f x].
- -
-Definition sup_closed (T : lattice) :=
-  [Pred s : Pred T |
-     bot \In s /\ forall d, d <=p s -> sup d \In s].
- -
-Definition sup_closure (T : lattice) (s : Pred T) :=
-  [Pred p : T | forall t : Pred T, s <=p t -> t \In sup_closed T -> p \In t].
- -
-End Lat.
- -
-Arguments sup_closed {T}.
-Arguments sup_closure [T].
-Prenex Implicits sup_closed sup_closure.
- -
-Section BasicProperties.
-Variable T : lattice.
- -
-Lemma sup_mono (s1 s2 : Pred T) : s1 <=p s2 -> sup s1 <== sup s2.
-Proof. by move=>H; apply: supM=>y; move/H; apply: supP. Qed.
- -
-Lemma supE (s1 s2 : Pred T) : s1 =p s2 -> sup s1 = sup s2.
-Proof. by move=>H; apply: poset_asym; apply: supM=>y; move/H; apply: supP. Qed.
- -
-(* Knaster-Tarski *)
-Lemma tarski_lfp_fixed (f : T -> T) :
-        monotone f -> f (tarski_lfp f) = tarski_lfp f.
-Proof.
-move=>M; suff L: f (tarski_lfp f) <== tarski_lfp f.
-- by apply: poset_asym=>//; apply: infP; apply: M L.
-by apply: infM=>x L; apply: poset_trans (L); apply: M; apply: infP.
-Qed.
- -
-Lemma tarski_lfp_least f : forall x : T, f x = x -> tarski_lfp f <== x.
-Proof. by move=>x H; apply: infP; rewrite InE /= H. Qed.
- -
-Lemma tarski_gfp_fixed (f : T -> T) :
-        monotone f -> f (tarski_gfp f) = tarski_gfp f.
-Proof.
-move=>M; suff L: tarski_gfp f <== f (tarski_gfp f).
-- by apply: poset_asym=>//; apply: supP; apply: M L.
-by apply: supM=>x L; apply: poset_trans (L) _; apply: M; apply: supP.
-Qed.
- -
-Lemma tarski_gfp_greatest f : forall x : T, f x = x -> x <== tarski_gfp f.
-Proof. by move=>x H; apply: supP; rewrite InE /= H. Qed.
- -
-(* closure contains s *)
-Lemma sup_clos_sub (s : Pred T) : s <=p sup_closure s.
-Proof. by move=>p H1 t H2 H3; apply: H2 H1. Qed.
- -
-(* closure is smallest *)
-Lemma sup_clos_min (s : Pred T) :
-        forall t, s <=p t -> sup_closed t -> sup_closure s <=p t.
-Proof. by move=>t H1 H2 p; move/(_ _ H1 H2). Qed.
- -
-(* closure is closed *)
-Lemma sup_closP (s : Pred T) : sup_closed (sup_closure s).
-Proof.
-split; first by move=>t _ [].
-move=>d H1 t /sup_clos_min H3 H4.
-by case: (H4) => _; apply=> x /H1/(H3 H4).
-Qed.
- -
-Lemma sup_clos_idemp (s : Pred T) : sup_closed s -> sup_closure s =p s.
-Proof. by move=>p; split; [apply: sup_clos_min | apply: sup_clos_sub]. Qed.
- -
-Lemma sup_clos_mono (s1 s2 : Pred T) :
-        s1 <=p s2 -> sup_closure s1 <=p sup_closure s2.
-Proof.
-move=>H1; apply: sup_clos_min (sup_closP s2)=>p H2.
-by apply: sup_clos_sub; apply: H1.
-Qed.
- -
-End BasicProperties.
- -
-(* lattice constructions *)
- -
-Section SubLattice.
-Variables (T : lattice) (s : Pred T) (C : sup_closed s).
-Local Notation tp := (subPoset (proj1 C)).
- -
-Definition sub_sup' (u : Pred tp) : T :=
-  sup [Pred x : T | exists y, y \In u /\ x = sval y].
- -
-Lemma sub_supX (u : Pred tp) : sub_sup' u \In s.
-Proof. by case: C u=>P /= H u; apply: H=>t [[y]] H1 [_] ->. Qed.
- -
-Definition sub_sup (u : Pred tp) : tp :=
-  exist _ (sub_sup' u) (sub_supX u).
- -
-Lemma sub_supP (u : Pred tp) (x : tp) : x \In u -> x <== sub_sup u.
-Proof. by move=>H; apply: supP; exists x. Qed.
- -
-Lemma sub_supM (u : Pred tp) (x : tp) :
-        (forall y, y \In u -> y <== x) -> sub_sup u <== x.
-Proof. by move=>H; apply: supM=>y [z][H1] ->; apply: H H1. Qed.
- -
-Definition subLatticeMixin := LatticeMixin sub_supP sub_supM.
-Definition subLattice := Eval hnf in Lattice {x : T | x \In s} subLatticeMixin.
- -
-End SubLattice.
- -
-(* pairing *)
- -
-Section PairLattice.
-Variables (A B : lattice).
-Local Notation tp := (A * B)%type.
- -
-Definition pair_sup (s : Pred tp) : tp :=
-            (sup [Pred p | exists f, p = f.1 /\ f \In s],
-             sup [Pred p | exists f, p = f.2 /\ f \In s]).
- -
-Lemma pair_supP (s : Pred tp) (p : tp) : p \In s -> p <== pair_sup s.
-Proof. by move=>H; split; apply: supP; exists p. Qed.
- -
-Lemma pair_supM (s : Pred tp) (p : tp) :
-        (forall q, q \In s -> q <== p) -> pair_sup s <== p.
-Proof. by move=>H; split; apply: supM=>y [f][->]; case/H. Qed.
- -
-Definition pairLatticeMixin := LatticeMixin pair_supP pair_supM.
-Canonical pairLattice := Eval hnf in Lattice tp pairLatticeMixin.
- -
-End PairLattice.
- -
-(* functions into a latice form a lattice *)
- -
-Section FunLattice.
-Variables (A : Type) (B : lattice).
-Local Notation tp := (A -> B).
- -
-Definition fun_sup (s : Pred tp) : tp :=
-  fun x => sup [Pred p | exists f, f \In s /\ p = f x].
- -
-Lemma fun_supP (s : Pred tp) (p : tp) : p \In s -> p <== fun_sup s.
-Proof. by move=>H x; apply: supP; exists p. Qed.
- -
-Lemma fun_supM (s : Pred tp) (p : tp) :
-        (forall q, q \In s -> q <== p) -> fun_sup s <== p.
-Proof. by move=>H t; apply: supM=>x [f][H1] ->; apply: H. Qed.
- -
-Definition funLatticeMixin := LatticeMixin fun_supP fun_supM.
-Canonical funLattice := Eval hnf in Lattice tp funLatticeMixin.
- -
-End FunLattice.
- -
-(* dependent functions into a lattice form a lattice *)
- -
-Section DFunLattice.
-Variables (A : Type) (B : A -> lattice).
-Local Notation tp := (dfunPoset B).
- -
-Definition dfun_sup (s : Pred tp) : tp :=
-  fun x => sup [Pred p | exists f, f \In s /\ p = f x].
- -
-Lemma dfun_supP (s : Pred tp) (p : tp) :
-        p \In s -> p <== dfun_sup s.
-Proof. by move=>H x; apply: supP; exists p. Qed.
- -
-Lemma dfun_supM (s : Pred tp) (p : tp) :
-       (forall q, q \In s -> q <== p) -> dfun_sup s <== p.
-Proof. by move=>H t; apply: supM=>x [f][H1] ->; apply: H. Qed.
- -
-Definition dfunLatticeMixin := LatticeMixin dfun_supP dfun_supM.
-Definition dfunLattice := Eval hnf in Lattice (forall x, B x) dfunLatticeMixin.
- -
-End DFunLattice.
- -
-(* applied sup equals the sup of applications *)
- -
-Lemma sup_appE A (B : lattice) (s : Pred (A -> B)) (x : A) :
-        sup s x = sup [Pred y : B | exists f, f \In s /\ y = f x].
-Proof. by []. Qed.
- -
-Lemma sup_dappE A (B : A -> lattice) (s : Pred (dfunLattice B)) (x : A) :
-        sup s x = sup [Pred y : B x | exists f, f \In s /\ y = f x].
-Proof. by []. Qed.
- -
-(* ideal of a lattice forms a lattice *)
- -
-Section IdealLattice.
-Variables (T : lattice) (P : T).
- -
-Definition ideal_sup' (s : Pred (ideal P)) :=
-  sup [Pred x | exists p, p \In s /\ id_val p = x].
- -
-Lemma ideal_supP' (s : Pred (ideal P)) : ideal_sup' s <== P.
-Proof. by apply: supM=>y [[x]] H /= [_] <-. Qed.
- -
-Definition ideal_sup (s : Pred (ideal P)) := Ideal (ideal_supP' s).
- -
-Lemma ideal_supP (s : Pred (ideal P)) p :
-        p \In s -> p <== ideal_sup s.
-Proof. by move=>H; apply: supP; exists p. Qed.
- -
-Lemma ideal_supM (s : Pred (ideal P)) p :
-        (forall q, q \In s -> q <== p) -> ideal_sup s <== p.
-Proof. by move=>H; apply: supM=>y [q][H1] <-; apply: H. Qed.
- -
-Definition idealLatticeMixin := LatticeMixin ideal_supP ideal_supM.
-Canonical idealLattice := Eval hnf in Lattice (ideal P) idealLatticeMixin.
- -
-End IdealLattice.
- -
-(* Prop is a lattice *)
- -
-Section PropLattice.
- -
-Definition prop_sup (s : Pred Prop) : Prop := exists p, p \In s /\ p.
- -
-Lemma prop_supP (s : Pred Prop) p : p \In s -> p <== prop_sup s.
-Proof. by exists p. Qed.
- -
-Lemma prop_supM (s : Pred Prop) p :
-        (forall q, q \In s -> q <== p) -> prop_sup s <== p.
-Proof. by move=>H [r][]; move/H. Qed.
- -
-Definition propLatticeMixin := LatticeMixin prop_supP prop_supM.
-Canonical propLattice := Eval hnf in Lattice Prop propLatticeMixin.
- -
-End PropLattice.
- -
-(* Pred is a lattice *)
- -
-Section PredLattice.
-Variable A : Type.
- -
-Definition predLatticeMixin := funLatticeMixin A propLattice.
-Canonical predLattice := Eval hnf in Lattice (Pred A) predLatticeMixin.
- -
-End PredLattice.
- -
-(**********)
-(* Chains *)
-(**********)
- -
-Section Chains.
-Variable T : poset.
- -
-Definition chain_axiom (s : Pred T) :=
-  (exists d, d \In s) /\
-  (forall x y, x \In s -> y \In s -> x <== y \/ y <== x).
- -
-Structure chain := Chain {
-  pred_of :> Pred T;
-  _ : chain_axiom pred_of}.
- -
-Canonical chainPredType := @mkPredType T chain pred_of.
- -
-End Chains.
- -
-Lemma chainE (T : poset) (s1 s2 : chain T) :
-        s1 = s2 <-> pred_of s1 =p pred_of s2.
-Proof.
-split=>[->//|]; move: s1 s2=>[s1 H1][s2 H2] /= E; move: H1 H2.
-suff: s1 = s2 by move=>-> H1 H2; congr Chain; apply: proof_irrelevance.
-by apply: fext=>x; apply: pext; split; move/E.
-Qed.
- -
-(* common chain constructions *)
- -
-(* adding bot to a chain *)
- -
-Section LiftChain.
-Variable (T : poset) (s : chain T).
- -
-Lemma lift_chainP : chain_axiom [Pred x : T | x = bot \/ x \In s].
-Proof.
-case: s=>p [[d H1] H2] /=; split=>[|x y]; first by exists d; right.
-by case=>[->|H3][->|H4]; auto.
-Qed.
- -
-Definition lift_chain := Chain lift_chainP.
- -
-End LiftChain.
- -
-(* mapping monotone function over a chain *)
- -
-Section ImageChain.
-Variables (T1 T2 : poset) (s : chain T1) (f : T1 -> T2) (M : monotone f).
- -
-Lemma image_chainP :
-        chain_axiom [Pred x2 : T2 | exists x1, x2 = f x1 /\ x1 \In s].
-Proof.
-case: s=>p [[d H1] H2]; split=>[|x y]; first by exists (f d); exists d.
-case=>x1 [->] H3 [y1][->] H4; rewrite -!toPredE /= in H3 H4.
-by case: (H2 x1 y1 H3 H4)=>L; [left | right]; apply: M L.
-Qed.
- -
-Definition image_chain := Chain image_chainP.
- -
-End ImageChain.
- -
-Notation "[ f '^^' s 'by' M ]" := (@image_chain _ _ s f M)
-  (at level 0, format "[ f '^^' s 'by' M ]") : form_scope.
- -
-Section ChainId.
-Variables (T : poset) (s : chain T).
- -
-Lemma id_mono : monotone (@id T).
-Proof. by []. Qed.
- -
-Lemma id_chainE (M : monotone id) : [id ^^ s by M] = s.
-Proof. by apply/chainE=>x; split; [case=>y [<-]|exists x]. Qed.
- -
-End ChainId.
- -
-Arguments id_mono [T].
-Prenex Implicits id_mono.
- -
-Section ChainConst.
-Variables (T1 T2 : poset) (y : T2).
- -
-Lemma const_mono : monotone (fun x : T1 => y).
-Proof. by []. Qed.
- -
-Lemma const_chainP : chain_axiom (Pred1 y).
-Proof. by split; [exists y | move=>x1 x2 ->->; left]. Qed.
- -
-Definition const_chain := Chain const_chainP.
- -
-Lemma const_chainE s : [_ ^^ s by const_mono] = const_chain.
-Proof.
-apply/chainE=>z1; split; first by case=>z2 [->].
-by case: s=>s [[d] H1] H2; move=><-; exists d.
-Qed.
- -
-End ChainConst.
- -
-Arguments const_mono [T1 T2 y].
-Prenex Implicits const_mono.
- -
-Section ChainCompose.
-Variables (T1 T2 T3 : poset) (f1 : T2 -> T1) (f2 : T3 -> T2).
-Variables (s : chain T3) (M1 : monotone f1) (M2 : monotone f2).
- -
-Lemma comp_mono : monotone (f1 \o f2).
-Proof. by move=>x y H; apply: M1; apply: M2. Qed.
- -
-Lemma comp_chainE :
-        [f1 ^^ [f2 ^^ s by M2] by M1] = [f1 \o f2 ^^ s by comp_mono].
-Proof.
-apply/chainE=>x1; split; first by case=>x2 [->][x3][->]; exists x3.
-by case=>x3 [->]; exists (f2 x3); split=>//; exists x3.
-Qed.
- -
-End ChainCompose.
- -
-Arguments comp_mono [T1 T2 T3 f1 f2].
-Prenex Implicits comp_mono.
- -
-(* projections out of a chain *)
- -
-Section ProjChain.
-Variables (T1 T2 : poset) (s : chain [poset of T1 * T2]).
- -
-Lemma proj1_mono : monotone (@fst T1 T2).
-Proof. by case=>x1 x2 [y1 y2][]. Qed.
- -
-Lemma proj2_mono : monotone (@snd T1 T2).
-Proof. by case=>x1 x2 [y1 y2][]. Qed.
- -
-Definition proj1_chain := [@fst _ _ ^^ s by proj1_mono].
-Definition proj2_chain := [@snd _ _ ^^ s by proj2_mono].
- -
-End ProjChain.
- -
-Arguments proj1_mono [T1 T2].
-Arguments proj2_mono [T1 T2].
-Prenex Implicits proj1_mono proj2_mono.
- -
-(* diagonal chain *)
- -
-Section DiagChain.
-Variable (T : poset) (s : chain T).
- -
-Lemma diag_mono : monotone (fun x : T => (x, x)).
-Proof. by []. Qed.
- -
-Definition diag_chain := [_ ^^ s by diag_mono].
- -
-Lemma proj1_diagE : proj1_chain diag_chain = s.
-Proof. by rewrite /proj1_chain /diag_chain comp_chainE id_chainE. Qed.
- -
-Lemma proj2_diagE : proj2_chain diag_chain = s.
-Proof. by rewrite /proj2_chain /diag_chain comp_chainE id_chainE. Qed.
- -
-End DiagChain.
- -
-Arguments diag_mono [T].
-Prenex Implicits diag_mono.
- -
-(* applying functions from a chain of functions *)
- -
-Section AppChain.
-Variables (A : Type) (T : poset) (s : chain [poset of A -> T]).
- -
-Lemma app_mono x : monotone (fun f : A -> T => f x).
-Proof. by move=>f1 f2; apply. Qed.
- -
-Definition app_chain x := [_ ^^ s by app_mono x].
- -
-End AppChain.
- -
-Arguments app_mono [A T].
-Prenex Implicits app_mono.
- -
-(* ditto for dependent functions *)
- -
-Section DAppChain.
-Variables (A : Type) (T : A -> poset) (s : chain (dfunPoset T)).
- -
-Lemma dapp_mono x : monotone (fun f : dfunPoset T => f x).
-Proof. by move=>f1 f2; apply. Qed.
- -
-Definition dapp_chain x := [_ ^^ s by dapp_mono x].
- -
-End DAppChain.
- -
-Arguments dapp_mono [A T].
-Prenex Implicits dapp_mono.
- -
-(* pairing chain applications *)
- -
-Section ProdChain.
-Variables (S1 S2 T1 T2 : poset) (f1 : S1 -> T1) (f2 : S2 -> T2).
-Variables (M1 : monotone f1) (M2 : monotone f2).
-Variable (s : chain [poset of S1 * S2]).
- -
-Lemma prod_mono : monotone (f1 \* f2).
-Proof. by case=>x1 x2 [y1 y2][/= H1 H2]; split; [apply: M1 | apply: M2]. Qed.
- -
-Definition prod_chain := [f1 \* f2 ^^ s by prod_mono].
- -
-Lemma proj1_prodE : proj1_chain prod_chain = [f1 ^^ proj1_chain s by M1].
-Proof.
-rewrite /proj1_chain /prod_chain !comp_chainE !/comp /=.
-by apply/chainE.
-Qed.
- -
-Lemma proj2_prodE : proj2_chain prod_chain = [f2 ^^ proj2_chain s by M2].
-Proof.
-rewrite /proj2_chain /prod_chain !comp_chainE !/comp /=.
-by apply/chainE.
-Qed.
- -
-End ProdChain.
- -
-Arguments prod_mono [S1 S2 T1 T2 f1 f2].
-Prenex Implicits prod_mono.
- -
-(* chain of all nats *)
- -
-Section NatChain.
- -
-Lemma nat_chain_axiom : chain_axiom (@PredT nat).
-Proof.
-split=>[|x y _ _]; first by exists 0.
-rewrite /Poset.leq /= [y <= x]leq_eqVlt.
-by case: leqP; [left | rewrite orbT; right].
-Qed.
- -
-Definition nat_chain := Chain nat_chain_axiom.
- -
-End NatChain.
- -
-(*********)
-(* CPO's *)
-(*********)
- -
-Module CPO.
- -
-Section RawMixin.
- -
-Record mixin_of (T : poset) := Mixin {
-  mx_lim : chain T -> T;
-  _ : forall (s : chain T) x, x \In s -> x <== mx_lim s;
-  _ : forall (s : chain T) x,
-        (forall y, y \In s -> y <== x) -> mx_lim s <== x}.
- -
-End RawMixin.
- -
-Section ClassDef.
- -
-Record class_of (T : Type) := Class {
-  base : Poset.class_of T;
-  mixin : mixin_of (Poset.Pack base T)}.
- -
-Local Coercion base : class_of >-> Poset.class_of.
- -
-Structure type : Type := Pack {sort; _ : class_of sort; _ : Type}.
-Local Coercion sort : type >-> Sortclass.
- -
-Variables (T : Type) (cT : type).
-Definition class := let: Pack _ c _ as cT' := cT return class_of cT' in c.
-Definition clone c of phant_id class c := @Pack T c T.
- -
-Definition pack b0 (m0 : mixin_of (Poset.Pack b0 T)) :=
-  fun m & phant_id m0 m => Pack (@Class T b0 m) T.
- -
-Definition poset := Poset.Pack class cT.
-Definition lim (s : chain poset) : cT := mx_lim (mixin class) s.
- -
-End ClassDef.
- -
-Module Import Exports.
-Coercion base : class_of >-> Poset.class_of.
-Coercion sort : type >-> Sortclass.
-Coercion poset : type >-> Poset.type.
-Canonical Structure poset.
- -
-Notation cpo := type.
-Notation CPOMixin := Mixin.
-Notation CPO T m := (@pack T _ _ m id).
- -
-Notation "[ 'cpo' 'of' T 'for' cT ]" := (@clone T cT _ idfun)
-  (at level 0, format "[ 'cpo' 'of' T 'for' cT ]") : form_scope.
-Notation "[ 'cpo' 'of' T ]" := (@clone T _ _ id)
-  (at level 0, format "[ 'cpo' 'of' T ]") : form_scope.
- -
-Arguments CPO.lim {cT}.
-Notation lim := CPO.lim.
- -
-Section Laws.
-Variable D : cpo.
- -
-Lemma limP (s : chain D) x : x \In s -> x <== lim s.
-Proof. by case: D s x=>S [[p]][/= l H1 *]; apply: (H1). Qed.
- -
-Lemma limM (s : chain D) x : (forall y, y \In s -> y <== x) -> lim s <== x.
-Proof. by case: D s x=>S [[p]][/= l H1 H2 *]; apply: (H2). Qed.
- -
-End Laws.
- -
-End Exports.
- -
-End CPO.
- -
-Export CPO.Exports.
- -
-(****************************)
-(* common cpo constructions *)
-(****************************)
- -
-(* pairs *)
- -
-Section PairCPO.
-Variables (A B : cpo).
-Local Notation tp := [poset of A * B].
- -
-Definition pair_lim (s : chain tp) : tp :=
-  (lim (proj1_chain s), lim (proj2_chain s)).
- -
-Lemma pair_limP (s : chain tp) x : x \In s -> x <== pair_lim s.
-Proof. by split; apply: limP; exists x. Qed.
- -
-Lemma pair_limM (s : chain tp) x :
-        (forall y, y \In s -> y <== x) -> pair_lim s <== x.
-Proof. by split; apply: limM=>y [z][->]; case/H. Qed.
- -
-Definition pairCPOMixin := CPOMixin pair_limP pair_limM.
-Canonical pairCPO := Eval hnf in CPO (A * B) pairCPOMixin.
- -
-End PairCPO.
- -
-(* functions *)
- -
-Section FunCPO.
-Variable (A : Type) (B : cpo).
-Local Notation tp := [poset of A -> B].
- -
-Definition fun_lim (s : chain tp) : tp :=
-  fun x => lim (app_chain s x).
- -
-Lemma fun_limP (s : chain tp) x : x \In s -> x <== fun_lim s.
-Proof. by move=>H t; apply: limP; exists x. Qed.
- -
-Lemma fun_limM (s : chain tp) x :
-        (forall y, y \In s -> y <== x) -> fun_lim s <== x.
-Proof. by move=>H1 t; apply: limM=>y [f][->] H2; apply: H1. Qed.
- -
-Definition funCPOMixin := CPOMixin fun_limP fun_limM.
-Canonical funCPO := Eval hnf in CPO (A -> B) funCPOMixin.
- -
-End FunCPO.
- -
-(* dependent functions *)
- -
-Section DFunCPO.
-Variable (A : Type) (B : A -> cpo).
-Local Notation tp := (dfunPoset B).
- -
-Definition dfun_lim (s : chain tp) : tp :=
-  fun x => lim (dapp_chain s x).
- -
-Lemma dfun_limP (s : chain tp) x : x \In s -> x <== dfun_lim s.
-Proof. by move=>H t; apply: limP; exists x. Qed.
- -
-Lemma dfun_limM (s : chain tp) x :
-        (forall y, y \In s -> y <== x) -> dfun_lim s <== x.
-Proof. by move=>H1 t; apply: limM=>y [f][->] H2; apply: H1. Qed.
- -
-Definition dfunCPOMixin := CPOMixin dfun_limP dfun_limM.
-Definition dfunCPO := Eval hnf in CPO (forall x, B x) dfunCPOMixin.
- -
-End DFunCPO.
- -
-(* Prop *)
- -
-Section PropCPO.
-Local Notation tp := [poset of Prop].
- -
-Definition prop_lim (s : chain tp) : tp := exists p, p \In s /\ p.
- -
-Lemma prop_limP (s : chain tp) p : p \In s -> p <== prop_lim s.
-Proof. by exists p. Qed.
- -
-Lemma prop_limM (s : chain tp) p :
-        (forall q, q \In s -> q <== p) -> prop_lim s <== p.
-Proof. by move=>H [r][]; move/H. Qed.
- -
-Definition propCPOMixin := CPOMixin prop_limP prop_limM.
-Canonical propCPO := Eval hnf in CPO Prop propCPOMixin.
- -
-End PropCPO.
- -
-(* Pred *)
- -
-Section PredCPO.
-Variable A : Type.
- -
-Definition predCPOMixin := funCPOMixin A propCPO.
-Canonical predCPO := Eval hnf in CPO (Pred A) predCPOMixin.
- -
-End PredCPO.
- -
-(* every complete lattice is a cpo *)
- -
-Section LatticeCPO.
-Variable A : lattice.
-Local Notation tp := (Lattice.poset A).
- -
-Definition lat_lim (s : chain tp) : tp := sup s.
- -
-Lemma lat_limP (s : chain tp) x : x \In s -> x <== lat_lim s.
-Proof. by apply: supP. Qed.
- -
-Lemma lat_limM (s : chain tp) x :
-        (forall y, y \In s -> y <== x) -> lat_lim s <== x.
-Proof. by apply: supM. Qed.
- -
-Definition latCPOMixin := CPOMixin lat_limP lat_limM.
-Definition latCPO := Eval hnf in CPO tp latCPOMixin.
- -
-End LatticeCPO.
- -
-(* sub-CPO's *)
- -
-(* every chain-closed subset of a cpo is a cpo *)
- -
-Section AdmissibleClosure.
-Variable T : cpo.
- -
-Definition chain_closed :=
-  [Pred s : Pred T |
-     bot \In s /\ forall d : chain T, d <=p s -> lim d \In s].
- -
-(* admissible closure of s is the smallest closed set containing s *)
-(* basically extends s to include the sups of chains *)
-Definition chain_closure (s : Pred T) :=
-  [Pred p : T | forall t : Pred T, s <=p t -> chain_closed t -> p \In t].
- -
-(* admissible closure contains s *)
-Lemma chain_clos_sub (s : Pred T) : s <=p chain_closure s.
-Proof. by move=>p H1 t H2 H3; apply: H2 H1. Qed.
- -
-(* admissible closure is smallest *)
-Lemma chain_clos_min (s : Pred T) t :
-        s <=p t -> chain_closed t -> chain_closure s <=p t.
-Proof. by move=>H1 H2 p; move/(_ _ H1 H2). Qed.
- -
-(* admissible closure is closed *)
-Lemma chain_closP (s : Pred T) : chain_closed (chain_closure s).
-Proof.
-split; first by move=>t _ [].
-move=>d H1 t /chain_clos_min H3 H4.
-by case: (H4) => _; apply=> x /H1/(H3 H4).
-Qed.
- -
-Lemma chain_clos_idemp (s : Pred T) :
-        chain_closed s -> chain_closure s =p s.
-Proof.
-move=>p; split; last by apply: chain_clos_sub.
-by apply: chain_clos_min=>//; apply: chain_closP.
-Qed.
- -
-Lemma chain_clos_mono (s1 s2 : Pred T) :
-        s1 <=p s2 -> chain_closure s1 <=p chain_closure s2.
-Proof.
-move=>H1; apply: chain_clos_min (chain_closP s2)=>p H2.
-by apply: chain_clos_sub; apply: H1.
-Qed.
- -
-(* intersection of admissible sets is admissible *)
-Lemma chain_closI (s1 s2 : Pred T) :
-       chain_closed s1 -> chain_closed s2 -> chain_closed (PredI s1 s2).
-Proof.
-move=>[H1 S1][H2 S2]; split=>// d H.
-by split; [apply: S1 | apply: S2]=>// x; case/H.
-Qed.
- -
-End AdmissibleClosure.
- -
-Arguments chain_closed {T}.
- -
-(* diagonal of an admissible set of pairs is admissible *)
-Lemma chain_clos_diag (T : cpo) (s : Pred (T * T)) :
-        chain_closed s -> chain_closed [Pred t : T | (t, t) \In s].
-Proof.
-move=>[B H1]; split=>// d H2.
-rewrite InE /= -{1}(proj1_diagE d) -{2}(proj2_diagE d).
-by apply: H1; case=>x1 x2 [x][[<- <-]]; apply: H2.
-Qed.
- -
-Section SubCPO.
-Variables (D : cpo) (s : Pred D) (C : chain_closed s).
- -
-Local Notation tp := (subPoset (proj1 C)).
- -
-Lemma sval_mono : monotone (sval : tp -> D).
-Proof. by move=>[x1 H1][x2 H2]; apply. Qed.
- -
-Lemma sub_limX (u : chain tp) : lim [sval ^^ u by sval_mono] \In s.
-Proof. by case: C u=>P H u; apply: (H)=>t [[y]] H1 [->]. Qed.
- -
-Definition sub_lim (u : chain tp) : tp :=
-  exist _ (lim [sval ^^ u by sval_mono]) (sub_limX u).
- -
-Lemma sub_limP (u : chain tp) x : x \In u -> x <== sub_lim u.
-Proof. by move=>H; apply: limP; exists x. Qed.
- -
-Lemma sub_limM (u : chain tp) x :
-        (forall y, y \In u -> y <== x) -> sub_lim u <== x.
-Proof. by move=>H; apply: limM=>y [z][->]; apply: H. Qed.
- -
-Definition subCPOMixin := CPOMixin sub_limP sub_limM.
-Definition subCPO := Eval hnf in CPO {x : D | x \In s} subCPOMixin.
- -
-End SubCPO.
- -
-(***********************************************)
-(* Continuity and Kleene's fixed point theorem *)
-(***********************************************)
- -
-Lemma lim_mono (D : cpo) (s1 s2 : chain D) :
-        s1 <=p s2 -> lim s1 <== lim s2.
-Proof. by move=>H; apply: limM=>y; move/H; apply: limP. Qed.
- -
-Lemma limE (D : cpo) (s1 s2 : chain D) :
-        s1 =p s2 -> lim s1 = lim s2.
-Proof. by move=>H; apply: poset_asym; apply: lim_mono=>x; rewrite H. Qed.
- -
-Lemma lim_liftE (D : cpo) (s : chain D) :
-        lim s = lim (lift_chain s).
-Proof.
-apply: poset_asym; apply: limM=>y H; first by apply: limP; right.
-by case: H; [move=>-> | apply: limP].
-Qed.
- -
-(* applied lim equals the lim of applications *)
-(* ie., part of continuity of application *)
-(* but is so often used, I give it a name *)
- -
-Lemma lim_appE A (D : cpo) (s : chain [cpo of A -> D]) (x : A) :
-        lim s x = lim (app_chain s x).
-Proof. by []. Qed.
- -
-Lemma lim_dappE A (D : A -> cpo) (s : chain (dfunCPO D)) (x : A) :
-        lim s x = lim (dapp_chain s x).
-Proof. by []. Qed.
- -
-Section Continuity.
-Variables (D1 D2 : cpo) (f : D1 -> D2).
- -
-Definition continuous :=
-  exists M : monotone f,
-  forall s : chain D1, f (lim s) = lim [f ^^ s by M].
- -
-Lemma cont_mono : continuous -> monotone f.
-Proof. by case. Qed.
- -
-Lemma contE (s : chain D1) (C : continuous) :
-       f (lim s) = lim [f ^^ s by cont_mono C].
-Proof.
-case: C=>M E; rewrite E; congr (lim (image_chain _ _)).
-apply: proof_irrelevance.
-Qed.
- -
-End Continuity.
- -
-Section Kleene.
-Variables (D : cpo) (f : D -> D) (C : continuous f).
- -
-Fixpoint pow m := if m is n.+1 then f (pow n) else bot.
- -
-Lemma pow_mono : monotone pow.
-Proof.
-move=>m n; elim: n m=>[|n IH] m /=; first by case: m.
-rewrite {1}/Poset.leq /= leq_eqVlt ltnS.
-case/orP; first by move/eqP=>->.
-move/IH=>{IH} H; apply: poset_trans H _.
-by elim: n=>[|n IH] //=; apply: cont_mono IH.
-Qed.
- -
-Definition pow_chain := [pow ^^ nat_chain by pow_mono].
- -
-Lemma reindex : pow_chain =p lift_chain [f ^^ pow_chain by cont_mono C].
-Proof.
-move=>x; split.
-- case; case=>[|n][->] /=; first by left.
-  by right; exists (pow n); split=>//; exists n.
-case=>/=; first by move=>->; exists 0.
-by case=>y [->][n][->]; exists n.+1.
-Qed.
- -
-Definition kleene_lfp := lim pow_chain.
- -
-Lemma kleene_lfp_fixed : f kleene_lfp = kleene_lfp.
-Proof. by rewrite (@contE _ _ f) lim_liftE; apply: limE; rewrite reindex. Qed.
- -
-Lemma kleene_lfp_least : forall x, f x = x -> kleene_lfp <== x.
-Proof.
-move=>x H; apply: limM=>y [n][->] _.
-by elim: n=>[|n IH] //=; rewrite -H; apply: cont_mono IH.
-Qed.
- -
-End Kleene.
- -
-(**********************************)
-(* Continuity of common functions *)
-(**********************************)
- -
-Lemma id_cont (D : cpo) : continuous (@id D).
-Proof. by exists id_mono; move=>d; rewrite id_chainE. Qed.
- -
-Arguments id_cont {D}.
- -
-Lemma const_cont (D1 D2 : cpo) (y : D2) : continuous (fun x : D1 => y).
-Proof.
-exists const_mono; move=>s; apply: poset_asym.
-- by apply: limP; case: s=>[p][[d H1] H2]; exists d.
-by apply: limM=>_ [x][->].
-Qed.
- -
-Arguments const_cont {D1 D2 y}.
- -
-Lemma comp_cont (D1 D2 D3 : cpo) (f1 : D2 -> D1) (f2 : D3 -> D2) :
-        continuous f1 -> continuous f2 -> continuous (f1 \o f2).
-Proof.
-case=>M1 H1 [M2 H2]; exists (comp_mono M1 M2); move=>d.
-by rewrite /= H2 H1 comp_chainE.
-Qed.
- -
-Arguments comp_cont {D1 D2 D3 f1 f2}.
- -
-Lemma proj1_cont (D1 D2 : cpo) : continuous (@fst D1 D2).
-Proof. by exists proj1_mono. Qed.
- -
-Lemma proj2_cont (D1 D2 : cpo) : continuous (@snd D1 D2).
-Proof. by exists proj2_mono. Qed.
- -
-Arguments proj1_cont {D1 D2}.
-Arguments proj2_cont {D1 D2}.
- -
-Lemma diag_cont (D : cpo) : continuous (fun x : D => (x, x)).
-Proof.
-exists diag_mono=>d; apply: poset_asym;
-by split=>/=; [rewrite proj1_diagE | rewrite proj2_diagE].
-Qed.
- -
-Arguments diag_cont {D}.
- -
-Lemma app_cont A (D : cpo) x : continuous (fun f : A -> D => f x).
-Proof. by exists (app_mono x). Qed.
- -
-Lemma dapp_cont A (D : A -> cpo) x : continuous (fun f : dfunCPO D => f x).
-Proof. by exists (dapp_mono x). Qed.
- -
-Arguments app_cont {A D}.
-Arguments dapp_cont {A D}.
- -
-Lemma prod_cont (S1 S2 T1 T2 : cpo) (f1 : S1 -> T1) (f2 : S2 -> T2) :
-        continuous f1 -> continuous f2 -> continuous (f1 \* f2).
-Proof.
-case=>M1 H1 [M2 H2]; exists (prod_mono M1 M2)=>d; apply: poset_asym;
-by (split=>/=; [rewrite proj1_prodE H1 | rewrite proj2_prodE H2]).
-Qed.
- -
-Arguments prod_cont {S1 S2 T1 T2 f1 f2}.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.finmap.html b/docs/LemmaOverloading.finmap.html deleted file mode 100644 index c689b5b..0000000 --- a/docs/LemmaOverloading.finmap.html +++ /dev/null @@ -1,854 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.finmap

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool eqtype ssrfun seq path.
-From LemmaOverloading
-Require Import ordtype prelude.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-Section Def.
-Variables (K : ordType) (V : Type).
- -
-Definition key (x : K * V) := x.1.
-Definition value (x : K * V) := x.2.
-Definition predk k := preim key (pred1 k).
-Definition predCk k := preim key (predC1 k).
- -
-Structure finMap : Type := FinMap {
-  seq_of : seq (K * V);
-  _ : sorted ord (map key seq_of)}.
- -
-Definition finMap_for of phant (K -> V) := finMap.
- -
-Identity Coercion finMap_for_finMap : finMap_for >-> finMap.
-End Def.
- -
-Notation "{ 'finMap' fT }" := (finMap_for (Phant fT))
-  (at level 0, format "{ 'finMap' '[hv' fT ']' }") : type_scope.
- -
-Prenex Implicits key value predk predCk seq_of.
- -
-Section Ops.
-Variables (K : ordType) (V : Type).
-Notation fmap := (finMap K V).
-Notation key := (@key K V).
-Notation predk := (@predk K V).
-Notation predCk := (@predCk K V).
- -
-Lemma fmapE (s1 s2 : fmap) : s1 = s2 <-> seq_of s1 = seq_of s2.
-Proof.
-split=>[->|] //.
-move: s1 s2 => [s1 H1] [s2 H2] /= H.
-by rewrite H in H1 H2 *; rewrite (bool_irrelevance H1 H2).
-Qed.
- -
-Lemma sorted_nil : sorted ord (map key [::]). Proof. by []. Qed.
-Definition nil := FinMap sorted_nil.
- -
-Definition fnd k (s : fmap) :=
-  if (filter (predk k) (seq_of s)) is (_, v):: _
-  then Some v else None.
- -
-Fixpoint ins' (k : K) (v : V) (s : seq (K * V)) {struct s} : seq (K * V) :=
-  if s is (k1, v1)::s1 then
-    if ord k k1 then (k, v)::s else
-      if k == k1 then (k, v)::s1 else (k1, v1)::(ins' k v s1)
-  else [:: (k, v)].
- -
-Lemma path_ins' s k1 k2 v :
-        ord k1 k2 -> path ord k1 (map key s) ->
-          path ord k1 (map key (ins' k2 v s)).
-Proof.
-elim: s k1 k2 v=>[|[k' v'] s IH] k1 k2 v H1 /=; first by rewrite H1.
-case/andP=>H2 H3; case: ifP=>/= H4; first by rewrite H1 H3 H4.
-case: ifP=>H5 /=; first by rewrite H1 (eqP H5) H3.
-by rewrite H2 IH //; move: (total k2 k'); rewrite H4 H5.
-Qed.
- -
-Lemma sorted_ins' s k v :
-        sorted ord (map key s) -> sorted ord (map key (ins' k v s)).
-Proof.
-case: s=>// [[k' v']] s /= H.
-case: ifP=>//= H1; first by rewrite H H1.
-case: ifP=>//= H2; first by rewrite (eqP H2).
-by rewrite path_ins' //; move: (total k k'); rewrite H1 H2.
-Qed.
- -
-Definition ins k v s := let: FinMap s' p' := s in FinMap (sorted_ins' k v p').
- -
-Lemma sorted_filter k s :
-        sorted ord (map key s) -> sorted ord (map key (filter (predCk k) s)).
-Proof. by move=>H; rewrite -filter_map sorted_filter //; apply: trans. Qed.
- -
-Definition rem k s := let: FinMap s' p' := s in FinMap (sorted_filter k p').
- -
-Definition supp s := map key (seq_of s).
- -
-End Ops.
- -
-Prenex Implicits fnd ins rem supp.
- -
-Section Laws.
-Variables (K : ordType) (V : Type).
-Notation fmap := (finMap K V).
-Notation nil := (nil K V).
- -
-Lemma ord_path (x y : K) s : ord x y -> path ord y s -> path ord x s.
-Proof.
-elim: s x y=>[|k s IH] x y //=.
-by move=>H1; case/andP=>H2 ->; rewrite (trans H1 H2).
-Qed.
- -
-Lemma last_ins' (x : K) (v : V) s :
-        path ord x (map key s) -> ins' x v s = (x, v) :: s.
-Proof. by elim: s=>[|[k1 v1] s IH] //=; case: ifP. Qed.
- -
-Lemma notin_path (x : K) s : path ord x s -> x \notin s.
-Proof.
-elim: s=>[|k s IH] //=.
-rewrite inE negb_or; case/andP=>T1 T2; case: eqP=>H /=.
-- by rewrite H irr in T1.
-by apply: IH; apply: ord_path T2.
-Qed.
- -
-Lemma path_supp_ord (s : fmap) k :
-        path ord k (supp s) -> forall m, m \in supp s -> ord k m.
-Proof.
-case: s=>s H; rewrite /supp /= => H1 m H2; case: totalP H1 H2=>//.
-- by move=>H1 H2; move: (notin_path (ord_path H1 H2)); case: (m \in _).
-by move/eqP=>->; move/notin_path; case: (k \in _).
-Qed.
- -
-Lemma notin_filter (x : K) s :
-        x \notin (map key s) -> filter (predk V x) s = [::].
-Proof.
-elim: s=>[|[k v] s IH] //=.
-rewrite inE negb_or; case/andP=>H1 H2.
-by rewrite eq_sym (negbTE H1); apply: IH.
-Qed.
- -
-Lemma fmapP (s1 s2 : fmap) : (forall k, fnd k s1 = fnd k s2) -> s1 = s2.
-Proof.
-rewrite /fnd; move: s1 s2 => [s1 P1][s2 P2] H; rewrite fmapE /=.
-elim: s1 P1 s2 P2 H=>[|[k v] s1 IH] /= P1.
-- by case=>[|[k2 v2] s2 P2] //=; move/(_ k2); rewrite eq_refl.
-have S1: sorted ord (map key s1) by apply: path_sorted P1.
-case=>[|[k2 v2] s2] /= P2; first by move/(_ k); rewrite eq_refl.
-have S2: sorted ord (map key s2) by apply: path_sorted P2.
-move: (IH S1 s2 S2)=>{IH} /= IH H.
-move: (notin_path P1) (notin_path P2)=>N1 N2.
-case E: (k == k2).
-- rewrite -{k2 E}(eqP E) in P2 H N2 *.
-  move: (H k); rewrite eq_refl=>[[E2]]; rewrite -E2 {v2 E2} in H *.
-  rewrite IH // => k'.
-  case E: (k == k'); first by rewrite -(eqP E) !notin_filter.
-  by move: (H k'); rewrite E.
-move: (H k); rewrite eq_refl eq_sym E notin_filter //.
-move: (total k k2); rewrite E /=; case/orP=>L1.
-- by apply: notin_path; apply: ord_path P2.
-move: (H k2); rewrite E eq_refl notin_filter //.
-by apply: notin_path; apply: ord_path P1.
-Qed.
- -
-Lemma predkN (k1 k2 : K) : predI (predk V k1) (predCk V k2) =1
-                           if k1 == k2 then pred0 else predk V k1.
-Proof.
-by move=>x; case: ifP=>H /=; [|case: eqP=>//->]; rewrite ?(eqP H) ?andbN ?H.
-Qed.
- -
-CoInductive supp_spec x (s : fmap) : bool -> Type :=
-| supp_spec_some v of fnd x s = Some v : supp_spec x s true
-| supp_spec_none of fnd x s = None : supp_spec x s false.
- -
-Lemma suppP x (s : fmap) : supp_spec x s (x \in supp s).
-Proof.
-move E: (x \in supp s)=>b; case: b E; move/idP; last first.
-- move=>H; apply: supp_spec_none.
-  case E: (fnd _ _)=>[v|] //; case: H.
-  rewrite /supp /fnd in E *; case: s E=>/=.
-  elim=>[|[y w] s IH] H1 //=.
-  case: ifP=>H; first by rewrite (eqP H) inE eq_refl.
-  rewrite -topredE /= eq_sym H; apply: IH.
-  by apply: path_sorted H1.
-case: s; elim=>[|[y w] s IH] /= H1 //; rewrite /supp /= inE in IH *.
-case: eqP=>[-> _|H] //=.
-- by apply: (@supp_spec_some _ _ w); rewrite /fnd /= eq_refl.
-move: (path_sorted H1)=>H1'; move/(IH H1'); case=>[v H2|H2];
-[apply: (@supp_spec_some _ _ v) | apply: supp_spec_none];
-by rewrite /fnd /=; case: eqP H=>// ->.
-Qed.
- -
-Lemma supp_nil : supp nil = [::]. Proof. by []. Qed.
- -
-Lemma supp_nilE (s : fmap) : (supp s = [::]) <-> (s = nil).
-Proof. by split=>[|-> //]; case: s; case=>// H; rewrite fmapE. Qed.
- -
-Lemma supp_rem k (s : fmap) :
-        supp (rem k s) =i predI (predC1 k) (mem (supp s)).
-Proof.
-case: s => s H1 x; rewrite /supp inE /=.
-by case H2: (x == k)=>/=; rewrite -filter_map mem_filter /= H2.
-Qed.
- -
-Lemma supp_ins k v (s : fmap) :
-        supp (ins k v s) =i predU (pred1 k) (mem (supp s)).
-Proof.
-case: s => s H x; rewrite /supp inE /=.
-elim: s x k v H=>[|[k1 v1] s IH] //= x k v H.
-case: ifP=>H1 /=; first by rewrite inE.
-case: ifP=>H2 /=; first by rewrite !inE (eqP H2) orbA orbb.
-by rewrite !inE (IH _ _ _ (path_sorted H)) orbCA.
-Qed.
- -
-Lemma fnd_empty k : fnd k nil = None. Proof. by []. Qed.
- -
-Lemma fnd_rem k1 k2 (s : fmap) :
-        fnd k1 (rem k2 s) = if k1 == k2 then None else fnd k1 s.
-Proof.
-case: s => s H; rewrite /fnd -filter_predI (eq_filter (predkN k1 k2)).
-by case: eqP=>//; rewrite filter_pred0.
-Qed.
- -
-Lemma fnd_ins k1 k2 v (s : fmap) :
-        fnd k1 (ins k2 v s) = if k1 == k2 then Some v else fnd k1 s.
-Proof.
-case: s => s H; rewrite /fnd /=.
-elim: s k1 k2 v H=>[|[k' v'] s IH] //= k1 k2 v H.
-- by case: ifP=>H1; [rewrite (eqP H1) eq_refl | rewrite eq_sym H1].
-case: ifP=>H1 /=.
-- by case: ifP=>H2; [rewrite (eqP H2) eq_refl | rewrite (eq_sym k1) H2].
-case: ifP=>H2 /=.
-- rewrite (eqP H2).
-  by case: ifP=>H3; [rewrite (eqP H3) eq_refl | rewrite eq_sym H3].
-case: ifP=>H3; first by rewrite -(eqP H3) eq_sym H2.
-by apply: IH; apply: path_sorted H.
-Qed.
- -
-Lemma ins_rem k1 k2 v (s : fmap) :
-        ins k1 v (rem k2 s) =
-        if k1 == k2 then ins k1 v s else rem k2 (ins k1 v s).
-Proof.
-move: k1 k2 v s.
-have L3: forall (x : K) s,
-  path ord x (map key s) -> filter (predCk V x) s = s.
-- move=>x t; move/notin_path; elim: t=>[|[k3 v3] t IH] //=.
-  rewrite inE negb_or; case/andP=>T1 T2.
-  by rewrite eq_sym T1 IH.
-have L5: forall (x : K) (v : V) s,
-  sorted ord (map key s) -> ins' x v (filter (predCk V x) s) = ins' x v s.
-- move=>x v s; elim: s x v=>[|[k' v'] s IH] x v //= H.
-  case H1: (ord x k').
-  - case H2: (k' == x)=>/=; first by rewrite (eqP H2) irr in H1.
-    by rewrite H1 L3 //; apply: ord_path H1 H.
-  case H2: (k' == x)=>/=.
-  - rewrite (eqP H2) eq_refl in H *.
-    by rewrite L3 //; apply: last_ins' H.
-  rewrite eq_sym H2 H1 IH //.
-  by apply: path_sorted H.
-move=>k1 k2 v [s H].
-case: ifP=>H1; rewrite /ins /rem fmapE /=.
-- rewrite {k1 H1}(eqP H1).
-  elim: s k2 v H=>[|[k' v'] s IH] //= k2 v H.
-  case H1: (k' == k2)=>/=.
-  - rewrite eq_sym H1 (eqP H1) irr in H *.
-    by rewrite L3 // last_ins'.
-  rewrite eq_sym H1; case: ifP=>H3.
-  - by rewrite L3 //; apply: ord_path H3 H.
-  by rewrite L5 //; apply: path_sorted H.
-elim: s k1 k2 H1 H=>[|[k' v'] s IH] //= k1 k2 H1 H; first by rewrite H1.
-case H2: (k' == k2)=>/=.
-- rewrite (eqP H2) in H *; rewrite H1.
-  case H3: (ord k1 k2)=>/=.
-  - by rewrite H1 eq_refl /= last_ins' // L3 //; apply: ord_path H.
-  by rewrite eq_refl /= IH //; apply: path_sorted H.
-case H3: (ord k1 k')=>/=; first by rewrite H1 H2.
-case H4: (k1 == k')=>/=; first by rewrite H1.
-by rewrite H2 IH //; apply: path_sorted H.
-Qed.
- -
-Lemma ins_ins k1 k2 v1 v2 (s : fmap) :
-        ins k1 v1 (ins k2 v2 s) = if k1 == k2 then ins k1 v1 s
-                                  else ins k2 v2 (ins k1 v1 s).
-Proof.
-rewrite /ins; case: s => s H; case H1: (k1 == k2); rewrite fmapE /=.
-- rewrite (eqP H1) {H1}.
-  elim: s H k2 v1 v2=>[|[k3 v3] s IH] /= H k2 v1 v2;
-    first by rewrite irr eq_refl.
-  case: (totalP k2 k3)=>H1 /=; rewrite ?irr ?eq_refl //.
-  case: (totalP k2 k3) H1=>H2 _ //.
-  by rewrite IH //; apply: path_sorted H.
-elim: s H k1 k2 H1 v1 v2=>[|[k3 v3] s IH] H k1 k2 H1 v1 v2 /=.
-- rewrite H1 eq_sym H1.
-  by case: (totalP k1 k2) H1=>H2 H1.
-case: (totalP k2 k3)=>H2 /=.
-- case: (totalP k1 k2) (H1)=>H3 _ //=; last first.
-  - by case: (totalP k1 k3)=>//= H4; rewrite ?H2 ?H3.
-  case: (totalP k1 k3)=>H4 /=.
-  - case: (totalP k2 k1) H3=>//= H3.
-    by case: (totalP k2 k3) H2=>//=.
-  - rewrite (eqP H4) in H3.
-    by case: (totalP k2 k3) H2 H3.
-  by case: (totalP k1 k3) (trans H3 H2) H4.
-- rewrite -(eqP H2) {H2} (H1).
-  case: (totalP k1 k2) (H1)=>//= H2 _; rewrite ?irr ?eq_refl //.
-  rewrite eq_sym H1.
-  by case: (totalP k2 k1) H1 H2.
-case: (totalP k1 k3)=>H3 /=.
-- rewrite eq_sym H1.
-  case: (totalP k2 k1) H1 (trans H3 H2)=>//.
-  by case: (totalP k2 k3) H2=>//=.
-- rewrite (eqP H3).
-  by case: (totalP k2 k3) H2.
-case: (totalP k2 k3)=>H4 /=.
-- by move: (trans H4 H2); rewrite irr.
-- by rewrite (eqP H4) irr in H2.
-by rewrite IH //; apply: path_sorted H.
-Qed.
- -
-Lemma rem_empty k : rem k nil = nil.
-Proof. by rewrite fmapE. Qed.
- -
-Lemma rem_rem k1 k2 (s : fmap) :
-        rem k1 (rem k2 s) = if k1 == k2 then rem k1 s else rem k2 (rem k1 s).
-Proof.
-rewrite /rem; case: s => s H /=.
-case H1: (k1 == k2); rewrite fmapE /= -!filter_predI; apply: eq_filter=>x /=.
-- by rewrite (eqP H1) andbb.
-by rewrite andbC.
-Qed.
- -
-Lemma rem_ins k1 k2 v (s : fmap) :
-        rem k1 (ins k2 v s) =
-        if k1 == k2 then rem k1 s else ins k2 v (rem k1 s).
-Proof.
-rewrite /rem; case: s => s H /=; case H1: (k1 == k2); rewrite /= fmapE /=.
-- rewrite (eqP H1) {H1}.
-  elim: s k2 H=>[|[k3 v3] s IH] k2 /= H; rewrite ?eq_refl 1?eq_sym //.
-  case: (totalP k3 k2)=>H1 /=; rewrite ?eq_refl //=;
-  case: (totalP k3 k2) H1=>//= H1 _.
-  by rewrite IH //; apply: path_sorted H.
-elim: s k1 k2 H1 H=>[|[k3 v3] s IH] k1 k2 H1 /= H; first by rewrite eq_sym H1.
-case: (totalP k2 k3)=>H2 /=.
-- rewrite eq_sym H1 /=.
-  case: (totalP k3 k1)=>H3 /=; case: (totalP k2 k3) (H2)=>//=.
-  rewrite -(eqP H3) in H1 *.
-  rewrite -IH //; last by apply: path_sorted H.
-  rewrite last_ins' /= 1?eq_sym ?H1 //.
-  by apply: ord_path H.
-- by move: H1; rewrite (eqP H2) /= eq_sym => -> /=; rewrite irr eq_refl.
-case: (totalP k3 k1)=>H3 /=.
-- case: (totalP k2 k3) H2=>//= H2 _.
-  by rewrite IH //; apply: path_sorted H.
-- rewrite -(eqP H3) in H1 *.
-  by rewrite IH //; apply: path_sorted H.
-case: (totalP k2 k3) H2=>//= H2 _.
-by rewrite IH //; apply: path_sorted H.
-Qed.
- -
-Lemma rem_supp k (s : fmap) :
-        k \notin supp s -> rem k s = s.
-Proof.
-case: s => s H1; rewrite /supp !fmapE /= => H2.
-elim: s H1 H2=>[|[k1 v1] s1 IH] //=; move/path_sorted=>H1.
-rewrite inE negb_or; case/andP=>H2; move/(IH H1)=>H3.
-by rewrite eq_sym H2 H3.
-Qed.
- -
-Lemma fnd_supp k (s : fmap) :
-        k \notin supp s -> fnd k s = None.
-Proof. by case: suppP. Qed.
- -
-Lemma fnd_supp_in k (s : fmap) :
-        k \in supp s -> exists v, fnd k s = Some v.
-Proof. by case: suppP=>[v|]; [exists v|]. Qed.
- -
-Lemma cancel_ins k v (s1 s2 : fmap) :
-       k \notin (supp s1) -> k \notin (supp s2) ->
-         ins k v s1 = ins k v s2 -> s1 = s2.
-Proof.
-move: s1 s2=>[s1 p1][s2 p2]; rewrite !fmapE /supp /= {p1 p2}.
-elim: s1 k v s2=>[k v s2| [k1 v1] s1 IH1 k v s2] /=.
-- case: s2=>[| [k2 v2] s2] //= _.
-  rewrite inE negb_or; case/andP=>H1 _; case: ifP=>// _.
-  by rewrite (negbTE H1); case=>E; rewrite E eq_refl in H1.
-rewrite inE negb_or; case/andP=>H1 H2 H3.
-case: ifP=>H4; case: s2 H3=>[| [k2 v2] s2] //=.
-- rewrite inE negb_or; case/andP=>H5 H6.
-  case: ifP=>H7; first by case=>->->->.
-  by rewrite (negbTE H5); case=>E; rewrite E eq_refl in H5.
-- by rewrite (negbTE H1)=>_; case=>E; rewrite E eq_refl in H1.
-rewrite inE negb_or (negbTE H1); case/andP=>H5 H6.
-rewrite (negbTE H5); case: ifP=>H7 /=.
-- by case=>E; rewrite E eq_refl in H1.
-by case=>->-> H; congr (_ :: _); apply: IH1 H.
-Qed.
- -
-End Laws.
- -
-Section Append.
-Variable (K : ordType) (V : Type).
-Notation fmap := (finMap K V).
-Notation nil := (nil K V).
- -
-Lemma seqof_ins k v (s : fmap) :
-        path ord k (supp s) -> seq_of (ins k v s) = (k, v) :: seq_of s.
-Proof. by case: s; elim=>[|[k1 v1] s IH] //= _; case/andP=>->. Qed.
- -
-Lemma path_supp_ins k1 k v (s : fmap) :
-        ord k1 k -> path ord k1 (supp s) -> path ord k1 (supp (ins k v s)).
-Proof.
-case: s=>s p.
-elim: s p k1 k v=>[| [k2 v2] s IH] //= p k1 k v H2; first by rewrite H2.
-case/andP=>H3 H4.
-have H5: path ord k1 (map key s) by apply: ord_path H4.
-rewrite /supp /=; case: (totalP k k2)=>H /=.
-- by rewrite H2 H H4.
-- by rewrite H2 (eqP H) H4.
-rewrite H3 /=.
-have H6: sorted ord (map key s) by apply: path_sorted H5.
-by move: (IH H6 k2 k v H H4); case: s {IH p H4 H5} H6.
-Qed.
- -
-Lemma path_supp_ins_inv k1 k v (s : fmap) :
-        path ord k (supp s) -> path ord k1 (supp (ins k v s)) ->
-        ord k1 k && path ord k1 (supp s).
-Proof.
-case: s=>s p; rewrite /supp /= => H1; rewrite last_ins' //=.
-by case/andP=>H2 H3; rewrite H2; apply: ord_path H3.
-Qed.
- -
-Lemma fmap_ind' (P : fmap -> Prop) :
-        P nil -> (forall k v s, path ord k (supp s) -> P s -> P (ins k v s)) ->
-        forall s, P s.
-Proof.
-move=>H1 H2; case; elim=>[|[k v] s IH] /= H.
-- by rewrite (_ : FinMap _ = nil); last by rewrite fmapE.
-have S: sorted ord (map key s) by apply: path_sorted H.
-rewrite (_ : FinMap _ = ins k v (FinMap S)); last by rewrite fmapE /= last_ins'.
-by apply: H2.
-Qed.
- -
-Fixpoint fcat' (s1 : fmap) (s2 : seq (K * V)) {struct s2} : fmap :=
-  if s2 is (k, v)::t then fcat' (ins k v s1) t else s1.
- -
-Definition fcat s1 s2 := fcat' s1 (seq_of s2).
- -
-Lemma fcat_ins' k v s1 s2 :
-        k \notin (map key s2) -> fcat' (ins k v s1) s2 = ins k v (fcat' s1 s2).
-Proof.
-move=>H; elim: s2 k v s1 H=>[|[k2 v2] s2 IH] k1 v1 s1 //=.
-rewrite inE negb_or; case/andP=>H1 H2.
-by rewrite -IH // ins_ins eq_sym (negbTE H1).
-Qed.
- -
-Lemma fcat_nil' s : fcat' nil (seq_of s) = s.
-Proof.
-elim/fmap_ind': s=>[|k v s L IH] //=.
-by rewrite seqof_ins //= (_ : FinMap _ = ins k v nil) //
-     fcat_ins' ?notin_path // IH.
-Qed.
- -
-Lemma fcat0s s : fcat nil s = s. Proof. by apply: fcat_nil'. Qed.
-Lemma fcats0 s : fcat s nil = s. Proof. by []. Qed.
- -
-Lemma fcat_inss k v s1 s2 :
-        k \notin supp s2 -> fcat (ins k v s1) s2 = ins k v (fcat s1 s2).
-Proof. by case: s2=>s2 p2 H /=; apply: fcat_ins'. Qed.
- -
-Lemma fcat_sins k v s1 s2 :
-        fcat s1 (ins k v s2) = ins k v (fcat s1 s2).
-Proof.
-elim/fmap_ind': s2 k v s1=>[|k1 v1 s1 H1 IH k2 v2 s2] //.
-case: (totalP k2 k1)=>//= H2.
-- have H: path ord k2 (supp (ins k1 v1 s1)).
-  - by apply: (path_supp_ins _ H2); apply: ord_path H1.
-  by rewrite {1}/fcat seqof_ins //= fcat_ins' ?notin_path.
-- by rewrite IH ins_ins H2 IH ins_ins H2.
-have H: path ord k1 (supp (ins k2 v2 s1)) by apply: (path_supp_ins _ H2).
-rewrite ins_ins.
-case: (totalP k2 k1) H2 => // H2 _.
-rewrite {1}/fcat seqof_ins //= fcat_ins' ?notin_path // IH ?notin_path //.
-rewrite ins_ins; case: (totalP k2 k1) H2 => // H2 _; congr (ins _ _ _).
-by rewrite -/(fcat s2 (ins k2 v2 s1)) IH.
-Qed.
- -
-Lemma fcat_rems k s1 s2 :
-        k \notin supp s2 -> fcat (rem k s1) s2 = rem k (fcat s1 s2).
-Proof.
-elim/fmap_ind': s2 k s1=>[|k2 v2 s2 H IH] k1 v1.
-- by rewrite !fcats0.
-rewrite supp_ins inE /= negb_or; case/andP=>H1 H2.
-by rewrite fcat_sins IH // ins_rem eq_sym (negbTE H1) -fcat_sins.
-Qed.
- -
-Lemma fcat_srem k s1 s2 :
-        k \notin supp s1 -> fcat s1 (rem k s2) = rem k (fcat s1 s2).
-Proof.
-elim/fmap_ind': s2 k s1=>[|k2 v2 s2 H IH] k1 s1.
-- rewrite rem_empty fcats0.
-  elim/fmap_ind': s1=>[|k3 v3 s3 H1 IH]; first by rewrite rem_empty.
-  rewrite supp_ins inE /= negb_or.
-  case/andP=>H2; move/IH=>E; rewrite {1}E .
-  by rewrite ins_rem eq_sym (negbTE H2).
-move=>H1; rewrite fcat_sins rem_ins; case: ifP=>E.
-- by rewrite rem_ins E IH.
-by rewrite rem_ins E -IH // -fcat_sins.
-Qed.
- -
-Lemma fnd_fcat k s1 s2 :
-        fnd k (fcat s1 s2) =
-        if k \in supp s2 then fnd k s2 else fnd k s1.
-Proof.
-elim/fmap_ind': s2 k s1=>[|k2 v2 s2 H IH] k1 s1.
-- by rewrite fcats0.
-rewrite supp_ins inE /=; case: ifP; last first.
-- move/negbT; rewrite negb_or; case/andP=>H1 H2.
-  by rewrite fcat_sins fnd_ins (negbTE H1) IH (negbTE H2).
-case/orP; first by move/eqP=><-; rewrite fcat_sins !fnd_ins eq_refl.
-move=>H1; rewrite fcat_sins !fnd_ins.
-by case: ifP=>//; rewrite IH H1.
-Qed.
- -
-Lemma supp_fcat s1 s2 : supp (fcat s1 s2) =i [predU supp s1 & supp s2].
-Proof.
-elim/fmap_ind': s2 s1=>[|k v s L IH] s1.
-- by rewrite supp_nil fcats0 => x; rewrite inE /= orbF.
-rewrite fcat_sins ?notin_path // => x.
-rewrite supp_ins !inE /=.
-case E: (x == k)=>/=.
-- rewrite ?inE !supp_ins ?inE E orbT.
-  reflexivity.
-rewrite ?inE. rewrite ?supp_ins. rewrite ?inE /=.
-rewrite IH. rewrite ?inE /=. rewrite E /=.
-reflexivity.
-Qed.
- -
-End Append.
- -
-(* an induction principle for pairs of finite maps with equal support *)
- -
-Section FMapInd.
-Variables (K : ordType) (V : Type).
-Notation fmap := (finMap K V).
-Notation nil := (@nil K V).
- -
-Lemma supp_eq_ins (s1 s2 : fmap) k1 k2 v1 v2 :
-        path ord k1 (supp s1) -> path ord k2 (supp s2) ->
-          supp (ins k1 v1 s1) =i supp (ins k2 v2 s2) ->
-        k1 = k2 /\ supp s1 =i supp s2.
-Proof.
-move=>H1 H2 H; move: (H k1) (H k2).
-rewrite !supp_ins !inE /= !eq_refl (eq_sym k2).
-case: totalP=>/= E; last 1 first.
-- by move: H1; move/(ord_path E); move/notin_path; move/negbTE=>->.
-- by move: H2; move/(ord_path E); move/notin_path; move/negbTE=>->.
-rewrite (eqP E) in H1 H2 H * => _ _; split=>// x; move: (H x).
-rewrite !supp_ins !inE /=; case: eqP=>//= -> _.
-by rewrite (negbTE (notin_path H1)) (negbTE (notin_path H2)).
-Qed.
- -
-Lemma fmap_ind2 (P : fmap -> fmap -> Prop) :
-        P nil nil ->
-        (forall k v1 v2 s1 s2,
-           path ord k (supp s1) -> path ord k (supp s2) ->
-           P s1 s2 -> P (ins k v1 s1) (ins k v2 s2)) ->
-        forall s1 s2, supp s1 =i supp s2 -> P s1 s2.
-Proof.
-move=>H1 H2; elim/fmap_ind'=>[|k1 v1 s1 T1 IH1];
-elim/fmap_ind'=>[|k2 v2 s2 T2 _] //.
-- by move/(_ k2); rewrite supp_ins inE /= eq_refl supp_nil.
-- by move/(_ k1); rewrite supp_ins inE /= eq_refl supp_nil.
-by case/supp_eq_ins=>// E; rewrite -{k2}E in T2 *; move/IH1; apply: H2.
-Qed.
- -
-End FMapInd.
- -
-Section DisjointUnion.
-Variable (K : ordType) (V : Type).
-Notation fmap := (finMap K V).
-Notation nil := (nil K V).
- -
-Definition disj (s1 s2 : fmap) :=
-  all (predC (fun x => x \in supp s2)) (supp s1).
- -
-CoInductive disj_spec (s1 s2 : fmap) : bool -> Type :=
-| disj_true of (forall x, x \in supp s1 -> x \notin supp s2) :
-    disj_spec s1 s2 true
-| disj_false x of x \in supp s1 & x \in supp s2 :
-    disj_spec s1 s2 false.
- -
-Lemma disjP s1 s2 : disj_spec s1 s2 (disj s1 s2).
-Proof.
-rewrite /disj; case E: (all _ _).
-- by apply: disj_true; case: allP E.
-move: E; rewrite all_predC; move/negbFE.
-by case: hasPx=>// x H1 H2 _; apply: disj_false H1 H2.
-Qed.
- -
-Lemma disjC s1 s2 : disj s1 s2 = disj s2 s1.
-Proof.
-case: disjP; case: disjP=>//.
-- by move=>x H1 H2; move/(_ x H2); rewrite H1.
-by move=>H1 x H2; move/H1; rewrite H2.
-Qed.
- -
-Lemma disj_nil (s : fmap) : disj s nil.
-Proof. by case: disjP. Qed.
- -
-Lemma disj_ins k v (s1 s2 : fmap) :
-        disj s1 (ins k v s2) = (k \notin supp s1) && (disj s1 s2).
-Proof.
-case: disjP=>[H|x H1].
-- case E: (k \in supp s1)=>/=.
-  - by move: (H _ E); rewrite supp_ins inE /= eq_refl.
-  case: disjP=>// x H1 H2.
-  by move: (H _ H1); rewrite supp_ins inE /= H2 orbT.
-rewrite supp_ins inE /=; case/orP=>[|H2].
-- by move/eqP=><-; rewrite H1.
-rewrite andbC; case: disjP=>[H|y H3 H4] //=.
-by move: (H _ H1); rewrite H2.
-Qed.
- -
-Lemma disj_rem k (s1 s2 : fmap) :
-        disj s1 s2 -> disj s1 (rem k s2).
-Proof.
-case: disjP=>// H _; case: disjP=>// x; move/H.
-by rewrite supp_rem inE /= andbC; move/negbTE=>->.
-Qed.
- -
-Lemma disj_remE k (s1 s2 : fmap) :
-        k \notin supp s1 -> disj s1 (rem k s2) = disj s1 s2.
-Proof.
-move=>H; case: disjP; case: disjP=>//; last first.
-- move=>H1 x; move/H1; rewrite supp_rem inE /= => E.
-  by rewrite (negbTE E) andbF.
-move=>x H1 H2 H3; move: (H3 x H1) H.
-rewrite supp_rem inE /= negb_and H2 orbF negbK.
-by move/eqP=><-; rewrite H1.
-Qed.
- -
-Lemma disj_fcat (s s1 s2 : fmap) :
-        disj s (fcat s1 s2) = disj s s1 && disj s s2.
-Proof.
-elim/fmap_ind': s s1 s2=>[|k v s L IH] s1 s2.
-- by rewrite !(disjC nil) !disj_nil.
-rewrite !(disjC (ins _ _ _)) !disj_ins supp_fcat inE /= negb_or.
-case: (k \in supp s1)=>//=.
-case: (k \in supp s2)=>//=; first by rewrite andbF.
-by rewrite -!(disjC s) IH.
-Qed.
- -
-Lemma fcatC (s1 s2 : fmap) : disj s1 s2 -> fcat s1 s2 = fcat s2 s1.
-Proof.
-rewrite /fcat.
-elim/fmap_ind': s2 s1=>[|k v s2 L IH] s1 /=; first by rewrite fcat_nil'.
-rewrite disj_ins; case/andP=>D1 D2.
-by rewrite fcat_ins' // -IH // seqof_ins //= -fcat_ins' ?notin_path.
-Qed.
- -
-Lemma fcatA (s1 s2 s3 : fmap) :
-        disj s2 s3 -> fcat (fcat s1 s2) s3 = fcat s1 (fcat s2 s3).
-Proof.
-move=>H.
-elim/fmap_ind': s3 s1 s2 H=>[|k v s3 L IH] s1 s2 /=; first by rewrite !fcats0.
-rewrite disj_ins; case/andP=>H1 H2.
-by rewrite fcat_sins ?notin_path // IH // fcat_sins ?notin_path // fcat_sins.
-Qed.
- -
-Lemma fcatAC (s1 s2 s3 : fmap) :
-        [&& disj s1 s2, disj s2 s3 & disj s1 s3] ->
-        fcat s1 (fcat s2 s3) = fcat s2 (fcat s1 s3).
-Proof. by case/and3P=>H1 H2 H3; rewrite -!fcatA // (@fcatC s1 s2). Qed.
- -
-Lemma fcatCA (s1 s2 s3 : fmap) :
-        [&& disj s1 s2, disj s2 s3 & disj s1 s3] ->
-        fcat (fcat s1 s2) s3 = fcat (fcat s1 s3) s2.
-Proof.
-by case/and3P=>H1 H2 H3; rewrite !fcatA // ?(@fcatC s2 s3) ?(disjC s3).
-Qed.
- -
-Lemma fcatsK (s s1 s2 : fmap) :
-        disj s1 s && disj s2 s -> fcat s1 s = fcat s2 s -> s1 = s2.
-Proof.
-elim/fmap_ind': s s1 s2=>// k v s.
-move/notin_path=>H IH s1 s2; rewrite !disj_ins.
-case/andP; case/andP=>H1 H2; case/andP=>H3 H4.
-rewrite !fcat_sins // => H5.
-apply: IH; first by rewrite H2 H4.
-by apply: cancel_ins H5; rewrite supp_fcat negb_or /= ?H1?H3 H.
-Qed.
- -
-Lemma fcatKs (s s1 s2 : fmap) :
-        disj s s1 && disj s s2 -> fcat s s1 = fcat s s2 -> s1 = s2.
-Proof.
-case/andP=>H1 H2.
-rewrite (fcatC H1) (fcatC H2); apply: fcatsK.
-by rewrite -!(disjC s) H1 H2.
-Qed.
- -
-End DisjointUnion.
- -
-Section EqType.
-Variables (K : ordType) (V : eqType).
- -
-Definition feq (s1 s2 : finMap K V) := seq_of s1 == seq_of s2.
- -
-Lemma feqP : Equality.axiom feq.
-Proof.
-move=>s1 s2; rewrite /feq.
-case: eqP; first by move/fmapE=>->; apply: ReflectT.
-by move=>H; apply: ReflectF; move/fmapE; move/H.
-Qed.
- -
-Canonical Structure fmap_eqMixin := EqMixin feqP.
-Canonical Structure fmap_eqType := EqType (finMap K V) fmap_eqMixin.
-End EqType.
- -
-
-
- -
- - - diff --git a/docs/LemmaOverloading.heaps.html b/docs/LemmaOverloading.heaps.html deleted file mode 100644 index e2059ed..0000000 --- a/docs/LemmaOverloading.heaps.html +++ /dev/null @@ -1,1902 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.heaps

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrfun ssrnat div ssrbool seq.
-From LemmaOverloading
-Require Import prelude finmap ordtype.
-From mathcomp
-Require Import path eqtype.
-Require Import Eqdep.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(*************)
-(* Locations *)
-(*************)
- -
-Inductive ptr := ptr_nat of nat.
- -
-Definition null := ptr_nat 0.
- -
-Definition nat_ptr (x : ptr) := let: ptr_nat y := x in y.
- -
-Definition eq_ptr (x y : ptr) :=
-  match x, y with ptr_nat m, ptr_nat n => m == n end.
- -
-Lemma eq_ptrP : Equality.axiom eq_ptr.
-Proof. by case=>x [y] /=; case: eqP=>[->|*]; constructor=>//; case. Qed.
- -
-Definition ptr_eqMixin := EqMixin eq_ptrP.
-Canonical Structure ptr_eqType := EqType ptr ptr_eqMixin.
- -
-(* some pointer arithmetic: offsetting from a base *)
- -
-Definition ptr_offset x i := ptr_nat (nat_ptr x + i).
- -
-Notation "x .+ i" := (ptr_offset x i)
-  (at level 3, format "x .+ i").
- -
-Lemma ptrE x y : (x == y) = (nat_ptr x == nat_ptr y).
-Proof. by move: x y=>[x][y]. Qed.
- -
-Lemma ptr0 x : x.+0 = x.
-Proof. by case: x=>x; rewrite /ptr_offset addn0. Qed.
- -
-Lemma ptrA x i j : x.+i.+j = x.+(i+j).
-Proof. by case: x=>x; rewrite /ptr_offset addnA. Qed.
- -
-Lemma ptrK x i j : (x.+i == x.+j) = (i == j).
-Proof.
-by case: x=>x; rewrite ptrE eqn_add2l.
-Qed.
- -
-Lemma ptr_null x m : (x.+m == null) = (x == null) && (m == 0).
-Proof. by case: x=>x; rewrite !ptrE addn_eq0. Qed.
- -
-Lemma ptrT x y : {m : nat | (x == y.+m) || (y == x.+m)}.
-Proof.
-case: x y=>x [y]; exists (if x <= y then (y - x) else (x - y)).
-rewrite !ptrE leq_eqVlt /=.
-by case: (ltngtP x y)=>/= E; rewrite subnKC ?(ltnW E) ?eq_refl ?orbT // E.
-Qed.
- -
-Definition ltn_ptr (x y : ptr) :=
-  match x, y with ptr_nat m, ptr_nat n => m < n end.
- -
-Lemma ltn_ptr_irr : irreflexive ltn_ptr.
-Proof. by case=>x /=; rewrite ltnn. Qed.
- -
-Lemma ltn_ptr_trans : transitive ltn_ptr.
-Proof. by case=>x [y][z]; apply: ltn_trans. Qed.
- -
-Lemma ltn_ptr_total : forall x y : ptr, [|| ltn_ptr x y, x == y | ltn_ptr y x].
-Proof. by case=>x [y]; rewrite ptrE /=; case: ltngtP. Qed.
- -
-Definition ptr_ordMixin := OrdMixin ltn_ptr_irr ltn_ptr_trans ltn_ptr_total.
-Canonical Structure ptr_ordType := OrdType ptr ptr_ordMixin.
- -
-(*********)
-(* Heaps *)
-(*********)
- -
-Inductive heap :=
-  Undef | Def (finmap : {finMap ptr -> dynamic}) of
-               null \notin supp finmap.
- -
-Section NullLemmas.
-Variables (f g : {finMap ptr -> dynamic}) (x : ptr) (d : dynamic).
- -
-Lemma upd_nullP :
-        x != null -> null \notin supp f -> null \notin supp (ins x d f).
-Proof. by move=>H1 H2; rewrite supp_ins negb_or /= eq_sym H1. Qed.
- -
-Lemma free_nullP : null \notin supp f -> null \notin supp (rem x f).
-Proof. by move=>H; rewrite supp_rem negb_and /= H orbT. Qed.
- -
-Lemma un_nullP :
-        null \notin supp f -> null \notin supp g ->
-          null \notin supp (fcat f g).
-Proof. by move=>H1 H2; rewrite supp_fcat negb_or H1 H2. Qed.
- -
-Lemma heapE pf pg : f = g <-> @Def f pf = @Def g pg.
-Proof.
-split=>[E|[//]]; move: pf pg.
-by rewrite E=>pf pg; congr Def; apply: bool_irrelevance.
-Qed.
- -
-End NullLemmas.
- -
-(****************)
-(* main methods *)
-(****************)
- -
-Definition def h := if h is Def _ _ then true else false.
- -
-Definition empty := @Def (finmap.nil _ _) is_true_true.
- -
-Definition upd h x d := nosimpl
-  (if h is Def hs ns then
-    if decP (@idP (x != null)) is left pf then
-      Def (@upd_nullP _ _ d pf ns)
-    else Undef
-  else Undef).
- -
-Definition dom h : pred ptr := nosimpl
-  (if h is Def f _ then mem (supp f) else pred0).
- -
-Definition free x h : heap :=
-  (if h is Def hs ns then Def (free_nullP x ns) else Undef).
- -
-Definition look (x : ptr) h :=
-  (if h is Def hs _ then
-    if fnd x hs is Some d then d else dyn tt
-  else dyn tt).
- -
-Definition union2 h1 h2 := nosimpl
-  (if (h1, h2) is (Def hs1 ns1, Def hs2 ns2) then
-     if disj hs1 hs2 then
-        Def (@un_nullP _ _ ns1 ns2)
-     else Undef
-  else Undef).
- -
-Definition empb h :=
-  if h is Def hs _ then supp hs == [::] else false.
- -
-Definition fresh h :=
-  (if h is Def hs _ then last null (supp hs) else null) .+ 1.
- -
-Definition subdom h1 h2 :=
-  if (h1, h2) is (Def hs1 _, Def hs2 _) then
-    all (fun x => x \in supp hs2) (supp hs1)
-  else false.
- -
-Definition subheap h1 h2 :=
-  subdom h1 h2 /\ forall x, x \in dom h1 -> look x h1 = look x h2.
- -
-(* Definition subheap h1 h2 p :=  *)
-(*   if (h1, h2) is (Def hs1 _, Def hs2 _) then  *)
-(*     all (fun x => p (look x h1) (look x h2)) (supp hs1) *)
-(*   else false. *)
- -
-Definition subtract h1 h2 :=
-  if h1 is (Def hs1 _) then
-    foldl (fun h x => free x h) h2 (supp hs1)
-  else Undef.
- -
-Definition pick h :=
-  if h is Def hs _ then head null (supp hs) else null.
- -
-Definition pts A (x : ptr) (v : A) := upd empty x (dyn v).
- -
-Notation "h1 :+ h2" := (union2 h1 h2) (at level 43, left associativity).
-Notation "h2 :- h1" := (subtract h1 h2) (at level 43, left associativity).
-Notation "x :-> v" := (pts x v) (at level 30).
- -
-(***********************)
-(* monoidal properties *)
-(***********************)
- -
-Lemma unC : forall h1 h2, h1 :+ h2 = h2 :+ h1.
-Proof.
-case=>[|h1 H1]; case=>[|h2 H2] //; rewrite /union2.
-by case: ifP=>E; rewrite disjC E // -heapE fcatC.
-Qed.
- -
-Lemma unA : forall h1 h2 h3, h1 :+ (h2 :+ h3) = h1 :+ h2 :+ h3.
-Proof.
-case=>[|h1 H1]; case=>[|h2 H2]; case=>[|h3 H3] //; rewrite /union2;
-case: ifP=>//; case: ifP=>//; last first.
-- by move=>E1 E2; rewrite disjC disj_fcat andbC disjC E2.
-- by case: ifP=>E1 //; rewrite disj_fcat E1 /= -!(disjC h3) disj_fcat=>->->.
-rewrite disj_fcat; case/andP=>->.
-rewrite -!(disjC h3) disj_fcat=>E2 E3.
-by rewrite E2 E3 -heapE fcatA // disjC.
-Qed.
- -
-Lemma unCA h1 h2 h3 : h1 :+ (h2 :+ h3) = h2 :+ (h1 :+ h3).
-Proof. by rewrite unC (unC h1) unA. Qed.
- -
-Lemma unAC h1 h2 h3 : h1 :+ h2 :+ h3 = h1 :+ h3 :+ h2.
-Proof. by rewrite (unC h1) -unA unC. Qed.
- -
-Lemma un0h h : empty :+ h = h.
-Proof. by case: h=>[|h H] //; apply/heapE; rewrite fcat0s. Qed.
- -
-Lemma unh0 h : h :+ empty = h.
-Proof. by rewrite unC un0h. Qed.
- -
-(* cancelativity *)
- -
-Lemma unKhl h h1 h2 : def (h1 :+ h) -> h1 :+ h = h2 :+ h -> h1 = h2.
-Proof.
-case: h h1 h2=>[|h H]; case=>[|h1 H1]; case=>[|h2 H2] //=; rewrite /union2;
-case: ifP=>//; case: ifP=>// D1 D2 _ [E]; apply/heapE.
-by apply: fcatsK E; rewrite D1 D2.
-Qed.
- -
-Lemma unhKl h h1 h2 : def (h :+ h1) -> h :+ h1 = h :+ h2 -> h1 = h2.
-Proof. by rewrite !(unC h); apply: unKhl. Qed.
- -
-Lemma unKhr h h1 h2 : def (h2 :+ h) -> h1 :+ h = h2 :+ h -> h1 = h2.
-Proof. by move=>H1 H2; symmetry in H2; rewrite (unKhl H1 H2). Qed.
- -
-Lemma unhKr h h1 h2 : def (h :+ h2) -> h :+ h1 = h :+ h2 -> h1 = h2.
-Proof. by rewrite !(unC h); apply: unKhr. Qed.
- -
-(*******)
-(* dom *)
-(*******)
- -
-Lemma dom0 : dom empty = pred0.
-Proof. by []. Qed.
- -
-Lemma domU h y d :
-        dom (upd h y d) =i
-        [pred x | (y != null) && if x == y then def h else x \in dom h].
-Proof.
-case: h=>[|h T] /= x; rewrite inE /upd /=.
-- rewrite ?inE. case: ifP=>//; rewrite andbF; reflexivity.
-case: ifP=>E; case: decP=>H1; rewrite /dom /=.
-- by rewrite (eqP E) H1 supp_ins inE /= eq_refl.
-- by case: eqP H1.
-- by rewrite supp_ins inE /= E H1.
-by case: eqP H1.
-Qed.
- -
-Lemma domPt A x (v : A) : dom (x :-> v) =i [pred y | (x == y) && (x != null)].
-Proof.
-move=>y; rewrite domU dom0 !inE /=.
-by case: ifP=>E; rewrite -(eq_sym y) E andbC.
-Qed.
- -
-Lemma domF h x :
-        dom (free x h) =i [pred y | if x == y then false else y \in dom h].
-Proof.
-case: h=>[|h H] y /=; rewrite ?inE /=; case: ifP=>// E;
-by rewrite supp_rem inE /= eq_sym E.
-Qed.
- -
-Lemma domUn h1 h2 :
-        dom (h1 :+ h2) =i
-        [pred x | def (h1 :+ h2) && (x \in [predU dom h1 & dom h2])].
-Proof.
-case: h1 h2 =>[|h1 H1] // [|h2 H2] // x; rewrite /dom /union2.
-by case: ifP=>// E; rewrite supp_fcat.
-Qed.
- -
-Lemma dom_null h x : x \in dom h -> x != null.
-Proof. by case: h=>[|h H1] //; case: eqP=>// ->; rewrite (negbTE H1). Qed.
- -
-Lemma dom_def h x : x \in dom h -> def h.
-Proof. by case: h. Qed.
- -
-Lemma dom_free h x : x \notin dom h -> free x h = h.
-Proof. by case: h=>[|h H] // E; apply/heapE; apply: rem_supp. Qed.
- -
-Lemma dom_look h x : x \notin dom h -> look x h = dyn tt.
-Proof.
-by case: h=>[|h H] //; rewrite /look /dom -topredE /=; case: (suppP x)=>// ->.
-Qed.
- -
-(*******)
-(* def *)
-(*******)
- -
-Lemma def0 : def empty.
-Proof. by []. Qed.
- -
-Hint Resolve def0 : core.
- -
-Lemma defU h x d : def (upd h x d) = (x != null) && (def h).
-Proof.
-case: h=>[|h H] /=; first by rewrite andbF.
-by rewrite /upd; case: decP=>/= [->//|]; case: eqP.
-Qed.
- -
-Lemma defPt A x (v : A) : def (x :-> v) = (x != null).
-Proof. by rewrite defU andbT. Qed.
- -
-Lemma defF h x : def (free x h) = def h.
-Proof. by case: h. Qed.
- -
-CoInductive defUn_spec h1 h2 : bool -> Type :=
-| def_false1 of ~~ def h1 : defUn_spec h1 h2 false
-| def_false2 of ~~ def h2 : defUn_spec h1 h2 false
-| def_false3 x of x \in dom h1 & x \in dom h2 : defUn_spec h1 h2 false
-| def_true of def h1 & def h2 &
-    (forall x, x \in dom h1 -> x \notin dom h2) : defUn_spec h1 h2 true.
- -
-Lemma defUn : forall h1 h2, defUn_spec h1 h2 (def (h1 :+ h2)).
-Proof.
-case=>[|h1 H1][|h2 H2] /=; try by [apply: def_false1 | apply: def_false2].
-rewrite /union2; case: ifP=>E.
-- by apply: def_true=>// x H; case: disjP E=>//; move/( _ _ H).
-by case: disjP E=>// x T1 T2 _; apply: (def_false3 (x:=x)).
-Qed.
- -
-Lemma defUnl h1 h2 : def (h1 :+ h2) -> def h1.
-Proof. by case: h1. Qed.
- -
-Lemma defUnr h1 h2 : def (h1 :+ h2) -> def h2.
-Proof. by case: h1=>h1 // H; case: h2. Qed.
- -
-Lemma defFUn h1 h2 x : def (h1 :+ h2) -> def (free x h1 :+ h2).
-Proof.
-case: defUn=>// H1 H2 H _.
-case: defUn=>//; [by rewrite defF H1|by rewrite H2|].
-move=>k; rewrite domF inE /=.
-by case: ifP=>_ //; move/H; move/negbTE=>->.
-Qed.
- -
-Lemma defUnF h1 h2 x : def (h1 :+ h2) -> def (h1 :+ free x h2).
-Proof. by rewrite unC; move/(defFUn x); rewrite unC. Qed.
- -
-Lemma undefE x : ~~ def x <-> x = Undef.
-Proof. by case: x; split. Qed.
- -
-(**********)
-(* update *)
-(**********)
- -
-Lemma upd_inj h x d1 d2 :
-        def h -> x != null -> upd h x d1 = upd h x d2 -> d1 = d2.
-Proof.
-case: h=>[|h H] // _ H1; rewrite /upd; case: decP=>// H2 [E].
-have: fnd x (ins x d1 h) = fnd x (ins x d2 h) by rewrite E.
-by rewrite !fnd_ins eq_refl; case.
-Qed.
- -
-Lemma heap_eta h x : x \in dom h -> h = upd (free x h) x (look x h).
-Proof.
-case: h=>[|h H] //; rewrite /upd /look /dom /free.
-case: decP; rewrite -topredE => /= H1 H2; last first.
-- by case: eqP H1 H H2=>// -> _ H; rewrite (negbTE H).
-apply/heapE; apply: fmapP=>k; rewrite fnd_ins.
-case: ifP=>[|E]; last by rewrite fnd_rem E.
-move/eqP=>->; case E1: (fnd x h)=>//.
-by case: (suppP _ h) H2 E1=>// v ->.
-Qed.
- -
-Lemma updU h x y d1 d2 :
-        upd (upd h x d1) y d2 =
-        if x == y then upd h x d2 else upd (upd h y d2) x d1.
-Proof.
-case: h =>[|h T]; rewrite /upd; case: ifP=>// H;
-case: decP=>H1 //; case: decP=>// H2; last 2 first.
-- by rewrite -(eqP H) H1 in H2.
-- by apply/heapE; rewrite ins_ins eq_sym H.
-by apply/heapE; rewrite ins_ins (eqP H) eq_refl.
-Qed.
- -
-Lemma updF h x y d :
-        upd (free x h) y d =
-        if x == y then upd h x d else free x (upd h y d).
-Proof.
-case: h=>[|h H] /=; case: ifP=>E //; rewrite /upd; last first.
-- case: decP=>// H1.
-  by apply/heapE; rewrite ins_rem eq_sym E.
-case: decP=>// H1; case: decP=>// H2.
-- by apply/heapE; rewrite ins_rem (eqP E) eq_refl.
-- by rewrite (eqP E) H1 in H2.
-by rewrite -(eqP E) H2 in H1.
-Qed.
- -
-Lemma updUnl h1 h2 x d :
-        upd (h1 :+ h2) x d =
-        if x \in dom h1 then upd h1 x d :+ h2 else h1 :+ upd h2 x d.
-Proof.
-case: h1 h2=>[|h1 H1][|h2 H2] //; case: ifP=>H //;
-rewrite /upd /union2; case: decP=>// H3; case: ifP=>D //.
-- rewrite disjC disj_ins disjC D.
-  case: disjP D=>//; move/(_ _ H)=>H4 _; rewrite H4.
-  by apply/heapE; rewrite fcat_inss.
-- by rewrite disjC disj_ins disjC D andbF.
-- rewrite disj_ins D H /=; apply/heapE.
-  rewrite (@fcatC _ _ h1) // (@fcatC _ _ h1).
-  - by rewrite fcat_inss // H.
-  by rewrite disj_ins H D.
-by rewrite disj_ins D andbF.
-Qed.
- -
-Lemma updUnr h1 h2 x d :
-        upd (h1 :+ h2) x d =
-        if x \in dom h2 then h1 :+ upd h2 x d else upd h1 x d :+ h2.
-Proof. by rewrite unC updUnl (unC h1) (unC h2). Qed.
- -
-Lemma pts_injP A1 A2 x1 x2 (v1 : A1) (v2 : A2) :
-        def (x1 :-> v1) -> x1 :-> v1 = x2 :-> v2 -> x1 = x2 /\ A1 = A2.
-Proof.
-rewrite /pts /upd /=.
-by case: decP=>H1; case: decP=>H2 // _; case.
-Qed.
- -
-Lemma pts_injT A1 A2 x (v1 : A1) (v2 : A2) :
-        def (x :-> v1) -> x :-> v1 = x :-> v2 -> A1 = A2.
-Proof. by move=>D; case/(pts_injP D). Qed.
- -
-Lemma pts_inj A x (v1 v2 : A) :
-        def (x :-> v1) -> x :-> v1 = x :-> v2 -> v1 = v2.
-Proof.
-move=>D; rewrite /pts /upd.
-case: decP; last by rewrite -(defPt _ v1) D.
-by move=>H []; apply: inj_pairT2.
-Qed.
- -
-(********)
-(* free *)
-(********)
- -
-Lemma free0 x : free x empty = empty.
-Proof. by apply/heapE; rewrite rem_empty. Qed.
- -
-Lemma freeU h x y d :
-        free x (upd h y d) = if x == y then
-          if y == null then Undef else free x h
-        else upd (free x h) y d.
-Proof.
-case: h=>[|h H] /=; first by case: ifP=>// E; case: ifP.
-rewrite /upd; case: ifP=>E1; case: decP=>H1 //.
-- by rewrite (negbTE H1); apply/heapE; rewrite rem_ins E1.
-- by case: ifP H1=>// ->.
-by apply/heapE; rewrite rem_ins E1.
-Qed.
- -
-Lemma freeF h x y :
-        free x (free y h) = if x == y then free x h else free y (free x h).
-Proof. by case: h=>*; case: ifP=>E //; apply/heapE; rewrite rem_rem E. Qed.
- -
-Lemma freeUn h1 h2 x :
-        free x (h1 :+ h2) =
-        if x \in dom (h1 :+ h2) then free x h1 :+ free x h2
-        else h1 :+ h2.
-Proof.
-case: h1 h2=>[|h1 H1] [|h2 H2] //; rewrite /union2 /free /dom /=.
-case: ifP=>E1 //; rewrite supp_fcat inE /=.
-case: ifP=>E2; last by apply/heapE; rewrite rem_supp // supp_fcat inE /= E2.
-rewrite disj_rem; last by rewrite disjC disj_rem // disjC.
-apply/heapE; case/orP: E2=>E2.
-- suff E3: x \notin supp h2 by rewrite -fcat_rems // (rem_supp E3).
-  by case: disjP E1 E2=>// H _; move/H.
-suff E3: x \notin supp h1 by rewrite -fcat_srem // (rem_supp E3).
-by case: disjP E1 E2=>// H _; move/contra: (H x); rewrite negbK.
-Qed.
- -
-Lemma freeUnD h1 h2 x :
-        def (h1 :+ h2) -> free x (h1 :+ h2) = free x h1 :+ free x h2.
-Proof.
-move=>D; rewrite freeUn domUn D !inE /=; case: ifP=>//.
-by move/negbT; rewrite negb_or; case/andP=>H1 H2; rewrite !dom_free.
-Qed.
- -
-Lemma freeUnl h1 h2 x : x \notin dom h1 -> free x (h1 :+ h2) = h1 :+ free x h2.
-Proof.
-move=>D1; rewrite freeUn domUn !inE (negbTE D1) /=.
-case: ifP; first by case/andP; rewrite dom_free.
-move/negbT; rewrite negb_and; case/orP=>D2; last by rewrite dom_free.
-suff: ~~ def (h1 :+ free x h2).
-- by case: (h1 :+ free x h2)=>// _; case: (h1 :+ h2) D2.
-apply: contra D2; case: defUn=>// H1 H2 H _.
-case: defUn=>//; first by [rewrite H1]; first by move: H2; rewrite defF=>->.
-move=>k H3; move: (H _ H3); rewrite domF inE /=.
-by case: ifP H3 D1=>[|_ _ _]; [move/eqP=><- -> | move/negbTE=>->].
-Qed.
- -
-Lemma freeUnr h1 h2 x : x \notin dom h2 -> free x (h1 :+ h2) = free x h1 :+ h2.
-Proof. by move=>H; rewrite unC freeUnl // unC. Qed.
- -
-(**********)
-(* lookup *)
-(**********)
- -
-Lemma lookU h x y d :
-        look x (upd h y d) = if x == y then
-          if def h && (y != null) then d else dyn tt
-        else if y != null then look x h else dyn tt.
-Proof.
-case: h=>[|h H] /=; case: ifP=>E //; case: ifP=>H1 //; rewrite /upd;
-by case: decP=>// H2; rewrite /look fnd_ins E //; rewrite H1 in H2.
-Qed.
- -
-Lemma lookF h x y :
-        look x (free y h) = if x == y then dyn tt else look x h.
-Proof. by case: h=>[|h H]; case: ifP=>E //; rewrite /look /free fnd_rem E. Qed.
- -
-Lemma lookUnl h1 h2 x :
-        def (h1 :+ h2) ->
-        look x (h1 :+ h2) = if x \in dom h1 then look x h1 else look x h2.
-Proof.
-case: h1 h2=>[|h1 H1] // [|h2 H2] //; rewrite /look /dom /union2.
-case: ifP=>D //= _; case: ifP=>E1; last first.
-- by rewrite fnd_fcat; case: ifP=>// E2; rewrite fnd_supp ?E1 // fnd_supp ?E2.
-suff E2: x \notin supp h2 by rewrite fnd_fcat (negbTE E2).
-by case: disjP D E1=>// H _; apply: H.
-Qed.
- -
-Lemma lookUnr h1 h2 x :
-        def (h1 :+ h2) ->
-        look x (h1 :+ h2) = if x \in dom h2 then look x h2 else look x h1.
-Proof. by rewrite unC=>D; rewrite lookUnl. Qed.
- -
-(********)
-(* empb *)
-(********)
- -
-Lemma empP h : reflect (h = empty) (empb h).
-Proof.
-case: h=>[|h] /=; first by right.
-case: eqP=>E H; first by apply: ReflectT; apply/heapE; apply/supp_nilE.
-by apply: ReflectF; move/heapE=>S; rewrite S supp_nil in E.
-Qed.
- -
-Lemma empU h x d : empb (upd h x d) = false.
-Proof.
-case: h=>[|h H] //; rewrite /upd /empb; case: decP=>// H1.
-suff: x \in supp (ins x d h) by case: (supp _).
-by rewrite supp_ins inE /= eq_refl.
-Qed.
- -
-Lemma empPt A x (v : A) : empb (x :-> v) = false.
-Proof. by rewrite empU. Qed.
- -
-Lemma empUn h1 h2 : empb (h1 :+ h2) = empb h1 && empb h2.
-Proof.
-case: h1 h2=>[|h1 H1] // [|h2 H2] /=; first by rewrite andbC.
-rewrite /empb /union2; case: ifP=>E;
-case: eqP=>E1; case: eqP=>E2 //=; last 2 first.
-- by move: E2 E1; move/supp_nilE=>->; rewrite fcat0s; case: eqP.
-- by move: E1 E2 E; do 2![move/supp_nilE=>->]; case: disjP.
-- by move/supp_nilE: E2 E1=>-> <-; rewrite fcat0s eq_refl.
-have [k H3]: exists k, k \in supp h1.
-- case: (supp h1) {E1 H1 E} E2=>[|x s _] //.
-  by exists x; rewrite inE eq_refl.
-suff: k \in supp (fcat h1 h2) by rewrite E1.
-by rewrite supp_fcat inE /= H3.
-Qed.
- -
-(* some transformation lemmas *)
- -
-Lemma empbE h : h = empty <-> empb h.
-Proof. by split=>[-> //|]; case: empP. Qed.
- -
-Lemma un0E h1 h2 : h1 :+ h2 = empty <-> h1 = empty /\ h2 = empty.
-Proof. by rewrite !empbE empUn; case: andP. Qed.
- -
-Lemma defE h : reflect (def h /\ forall x, x \notin dom h)(empb h).
-Proof.
-case: empP=>T; constructor; first by rewrite T.
-case=>D E; case: T; case: h D E=>// f H _; rewrite /dom => E.
-apply/heapE; apply/supp_nilE.
-by case: (supp f) E=>// x s; move/(_ x); rewrite inE eq_refl.
-Qed.
- -
-Lemma defUnhh h : def (h :+ h) = empb h.
-Proof.
-case E: (empb h); first by move/empbE: E=>->.
-case: defUn=>// D _ L.
-case: defE E=>//; case; split=>// x.
-case E: (x \in dom h)=>//.
-by move: (L x E); rewrite E.
-Qed.
- -
-(*********)
-(* fresh *)
-(*********)
- -
-Lemma path_last n s x : path ord x s -> ord x (last x s).+(n+1).
-Proof.
-move: n s x.
-suff L: forall s x, path ord x s -> ord x (last x s).+(1).
-- elim=>[|n IH] // s x; move/IH=>E; apply: trans E _.
-  by case: (last x s)=>m; rewrite /ord /= addSn (addnS m).
-elim=>[|y s IH x] /=; first by case=>x; rewrite /ord /= addn1.
-by case/andP=>H1; move/IH; apply: trans H1.
-Qed.
- -
-Lemma path_filter (A : ordType) (s : seq A) (p : pred A) x :
-        path ord x s -> path ord x (filter p s).
-Proof.
-elim: s x=>[|y s IH] x //=.
-case/andP=>H1 H2.
-case: ifP=>E; first by rewrite /= H1 IH.
-apply: IH; elim: s H2=>[|z s IH] //=.
-by case/andP=>H2 H3; rewrite (@trans _ y).
-Qed.
- -
-Lemma dom_fresh h n : (fresh h).+n \notin dom h.
-Proof.
-suff L2: forall h x, x \in dom h -> ord x (fresh h).
-- by apply: (contra (L2 _ _)); rewrite -leqNgt leq_addr.
-case=>[|[s H1]] //; rewrite /supp => /= H2 x.
-rewrite /dom /fresh /supp -topredE /=.
-elim: s H1 null H2 x=>[|[y d] s IH] //= H1 x.
-rewrite inE negb_or; case/andP=>H3 H4 z; rewrite inE.
-case/orP; first by move/eqP=>->{z}; apply: (path_last 0).
-by apply: IH; [apply: path_sorted H1 | apply: notin_path H1].
-Qed.
- -
-Lemma fresh_null h : fresh h != null.
-Proof. by rewrite -lt0n addn1. Qed.
- -
-Opaque fresh.
- -
-Hint Resolve dom_fresh fresh_null : core.
- -
-(********)
-(* pick *)
-(********)
- -
-Lemma emp_pick h : (pick h == null) = (~~ def h || empb h).
-Proof.
-case: h=>[|h] //=; case: (supp h)=>[|x xs] //=.
-by rewrite inE negb_or eq_sym; case/andP; move/negbTE=>->.
-Qed.
- -
-Lemma pickP h : def h && ~~ empb h = (pick h \in dom h).
-Proof.
-by rewrite /dom; case: h=>[|h] //=; case: (supp h)=>// *; rewrite inE eq_refl.
-Qed.
- -
-(**********)
-(* subdom *)
-(**********)
- -
-Lemma subdom_def h1 h2 : subdom h1 h2 -> def h1 && def h2.
-Proof. by case: h1 h2=>[|h1 H1] // [|h2 H2]. Qed.
- -
-Lemma subdomP h1 h2 :
-        def h1 -> ~~ empb h1 ->
-        reflect (forall x, x \in dom h1 -> x \in dom h2)
-                (subdom h1 h2).
-Proof.
-case: h1 h2=>[|h1 H1] // [|h2 H2] //= _ H3; last by apply: allP.
-apply: ReflectF.
-suff H: head null (supp h1) \in supp h1 by move/(_ _ H).
-by case: (supp h1) H1 H3=>[|x xs] //=; rewrite !inE eq_refl.
-Qed.
- -
-Lemma subdomQ x h1 h2 : subdom h1 h2 -> x \in dom h1 -> x \in dom h2.
-Proof.
-move=>S H; case: subdomP S=>//.
-- by apply: dom_def H.
-- by case: empP=>// E; rewrite E dom0 in H.
-by move=>H2 _; apply: H2.
-Qed.
- -
-Lemma subdom_refl h : def h -> subdom h h.
-Proof. by case: h=>[//|h H _]; apply/allP. Qed.
- -
-Lemma subdomD h1 h2 h : subdom h1 h2 -> def (h2 :+ h) -> def (h1 :+ h).
-Proof.
-case: h1 h2 h=>[|h1 H1]; case=>[|h2 H2]; case=>[|h H] //=.
-rewrite /subdom /def /union2 /=; case: ifP=>E1 //; case: ifP=>E2 // E _.
-case: disjP E2=>// x H3 H4 _; case: disjP E1=>// X1 _.
-by case: (allP (s := supp h1)) E=>//; move/(_ _ H3); move/X1; rewrite H4.
-Qed.
- -
-Lemma subdomE h1 h2 h :
-        def (h2 :+ h) -> subdom h1 h2 -> subdom (h1 :+ h) (h2 :+ h).
-Proof.
-case: h1 h2 h=>[|h1 H1]; case=>[|h2 H2]; case=>[|h H] //=.
-rewrite /union2 /subdom /def /=; case: ifP=>E1 // _; case: ifP=>E2;
-case: (allP (s:=supp h1))=>// E _; last first.
-- case: disjP E2=>// x H3 H4; move/E: H3.
-  by case: disjP E1=>// X _; move/X; rewrite H4.
-case: (allP (s:=supp (fcat h1 h)))=>//; case=>x.
-rewrite !supp_fcat !inE /=.
-by case/orP; rewrite ?inE; [move/E=>->| move=>->; rewrite orbT].
-Qed.
- -
-Lemma subdomUE h1 h2 h1' h2' :
-        def (h2 :+ h2') -> subdom h1 h2 -> subdom h1' h2' ->
-          subdom (h1 :+ h1') (h2 :+ h2').
-Proof.
-case: h1 h2 h1' h2'=>[|h1 H1]; case=>[|h2 H2];
-case=>[|h1' H1']; case=>[|h2' H2'] //.
-rewrite /subdom /def /union2.
-case: ifP=>E1 // _; case: ifP=>E2 // T1 T2; last first.
-- case: disjP E2=>// x; case: allP T1=>// X _; move/X=>{X}.
-  case: disjP E1=>// X _; move/X=>{X}.
-  by case: allP T2=>// X _ H3 H4; move/X: H4 H3=>->.
-case: allP=>//; case=>x.
-rewrite !supp_fcat !inE; case/orP=>E.
-- by case: allP T1=>//; move/(_ _ E)=>->.
-by case: allP T2=>//; move/(_ _ E)=>->; rewrite orbT.
-Qed.
- -
-Lemma subdom_emp h : def h -> subdom empty h.
-Proof. by case: h. Qed.
- -
-Lemma subdom_emp_inv h : subdom h empty -> h = empty.
-Proof.
-case: h=>[|h H] //; rewrite /subdom /=.
-case: (allP (s:=supp h))=>// E _; apply/heapE; apply: fmapP=>x.
-case: suppP (E x)=>// v E2; move/(_ (erefl _)).
-by rewrite supp_nil.
-Qed.
- -
-Lemma subdomPE A B x (v1 : A) (v2 : B) :
-        x != null -> subdom (x :-> v1) (x :-> v2).
-Proof.
-move=>H; rewrite /subdom /pts /upd /=; case: decP=>//= _.
-rewrite (_ : FinMap _ = ins x (dyn v2) (finmap.nil _ _)) //.
-by rewrite supp_ins inE /= eq_refl.
-Qed.
- -
-Lemma subdom_trans h2 h1 h3 : subdom h1 h2 -> subdom h2 h3 -> subdom h1 h3.
-Proof.
-move=>H1 H2; move: (subdom_def H1) (subdom_def H2).
-case/andP=>D1 _; case/andP=>_ D2.
-case E: (empb h1).
-- by move/empP: E =>->; rewrite subdom_emp.
-apply/subdomP=>[//||x in1]; first by apply negbT.
-by apply: (subdomQ H2) (subdomQ H1 in1).
-Qed.
- -
-Hint Resolve subdom_emp subdomPE : core.
- -
-(***********)
-(* subheap *)
-(***********)
- -
-Lemma subheap_refl h : def h -> subheap h h.
-Proof. by move=>D; split=>//; apply: subdom_refl. Qed.
- -
-Lemma subheapE h : def h -> subheap empty h.
-Proof. by split; [apply subdom_emp | rewrite dom0]. Qed.
- -
-Lemma subheapUn h1 h2 h1' h2' :
-        def (h2 :+ h2') -> subheap h1 h2 -> subheap h1' h2' ->
-        subheap (h1 :+ h1') (h2 :+ h2').
-Proof.
-move=>defs [Sd1 Sl1] [Sd2 Sl2].
-split=>[|x]; first by apply: subdomUE.
-rewrite domUn inE /= inE /=; case/andP=>D; case/orP=>H.
-- by rewrite !lookUnl // H Sl1 // (subdomQ Sd1 H).
-by rewrite !lookUnr // H Sl2 // (subdomQ Sd2 H).
-Qed.
- -
-Lemma subheapUnl h1 h2 : def (h1 :+ h2) -> subheap h1 (h1 :+ h2).
-Proof.
-move=>D; rewrite -{1}[h1]unh0; apply: subheapUn=>//.
-- by apply: subheap_refl; apply: defUnl D.
-by apply: subheapE; apply: defUnr D.
-Qed.
- -
-Lemma subheapUnr h1 h2 : def (h1 :+ h2) -> subheap h2 (h1 :+ h2).
-Proof. by rewrite unC; apply: subheapUnl. Qed.
- -
-Lemma subheap_def h1 h2 : subheap h1 h2 -> def h1 /\ def h2.
-Proof. by case=>[subdm _]; move/andP: (subdom_def subdm). Qed.
- -
-Lemma subheap_trans h2 h1 h3 : subheap h1 h2 -> subheap h2 h3 -> subheap h1 h3.
-Proof.
-move=>[S12 E12] [S23 E23].
-split=> [|x in1]; first by apply: (subdom_trans S12 S23).
-by rewrite (E12 x in1); apply: (E23 x (subdomQ S12 in1)).
-Qed.
- -
-Lemma subheap_id hp1 hp2: subheap hp1 hp2 -> subheap hp2 hp1 -> hp1 = hp2.
-Proof.
-move=>S12; move: (S12) => [D12 _].
-move/andP: (subdom_def D12) S12=>{D12} [D1 D2].
-case: hp1 D1=>[//=|fm1 pf1].
-case: hp2 D2=>[//=|fm2 pf2] _ _ [S12 L12] [S21 L21].
-rewrite -heapE; apply: fmapP => k.
-move: (@subdomQ k _ _ S12) (@subdomQ k _ _ S21) => S'12 S'21.
-move: (L12 k) (L21 k).
-case H1: (k \in dom (Def pf1)).
-- move: (S'12 H1)=> H2.
-  case F1: (fnd k fm1)=> [d1|]; case F2: (fnd k fm2)=> [d2|] //=; rewrite F1 F2.
-  - by move=>H; rewrite (H is_true_true).
-  - by move: (fnd_supp_in H2); rewrite F2=> [[v]].
-  - by move: (fnd_supp_in H1); rewrite F1=> [[v]].
-case H2 : (k \in dom (Def pf2)).
-- by rewrite (S'21 H2) in H1.
-move => _ _; rewrite /dom -topredE in H2.
-by rewrite (fnd_supp (negbT H1)) (fnd_supp (negbT H2)).
-Qed.
- -
-(***********************)
-(* Some derived lemmas *)
-(***********************)
- -
-Lemma noalias h1 h2 x1 x2 :
-        x1 \in dom h1 -> x2 \in dom h2 -> def (h1 :+ h2) -> x1 != x2.
-Proof.
-by case: defUn=>// H1 H2 H; move/H; case: eqP=>// ->; move/negbTE=>->.
-Qed.
- -
-Lemma defPtUn A h x (v : A) :
-        def (x :-> v :+ h) = [&& x != null, def h & x \notin dom h].
-Proof.
-case: defUn; last 1 first.
-- by rewrite defPt=>H1 -> H2; rewrite H1 (H2 x) // domPt inE /= eq_refl.
-- by rewrite defPt; move/negbTE=>->.
-- by move/negbTE=>->; rewrite andbF.
-by move=>y; rewrite domPt inE /=; case/andP; move/eqP=><-->->; rewrite andbF.
-Qed.
- -
-(* the three projections from defPtUn are often useful *)
- -
-Lemma defPt_null A h x (v : A) : def (x :-> v :+ h) -> x != null.
-Proof. by rewrite defPtUn; case/and3P. Qed.
- -
-Lemma defPt_def A h x (v : A) : def (x :-> v :+ h) -> def h.
-Proof. by rewrite defPtUn; case/and3P. Qed.
- -
-Lemma defPt_dom A h x (v : A) : def (x :-> v :+ h) -> x \notin dom h.
-Proof. by rewrite defPtUn; case/and3P. Qed.
- -
-(* now dom *)
- -
-Lemma domPtUn A h x (v : A) :
-        dom (x :-> v :+ h) =i
-        [pred y | def (x :-> v :+ h) && ((x == y) || (y \in dom h))].
-Proof.
-move=>y; rewrite domUn !inE !defPtUn domPt inE /=.
-by case: (x =P null)=>//= _; rewrite andbT.
-Qed.
- -
-(* look and free *)
-Lemma lookPtUn A h x (v : A) :
-        def (x :-> v :+ h) -> look x (x :-> v :+ h) = dyn v.
-Proof.
-by move=>D; rewrite lookUnl // lookU domPt !inE eq_refl (defPt_null D).
-Qed.
- -
-Lemma freePtUn A h x (v : A) :
-        def (x :-> v :+ h) -> free x (x :-> v :+ h) = h.
-Proof.
-move=>D; rewrite freeUnr; last by rewrite (defPt_dom D).
-by rewrite freeU eqxx (negbTE (defPt_null D)) free0 un0h.
-Qed.
- -
-Lemma updPtUn A1 A2 x i (v1 : A1) (v2 : A2) :
-        upd (x :-> v1 :+ i) x (dyn v2) = x :-> v2 :+ i.
-Proof.
-case E1: (def (x :-> v1 :+ i)).
-- by rewrite updUnl domPt inE /= eqxx (defPt_null E1) /= updU eqxx.
-have E2: def (x :-> v2 :+ i) = false by rewrite !defPtUn in E1 *.
-by case: (_ :+ _) E1=>// _; case: (_ :+ _) E2.
-Qed.
- -
-Lemma heap_etaP h x : x \in dom h -> h = x :-> Dyn.val (look x h) :+ free x h.
-Proof.
-move=>H; rewrite {1}(heap_eta H) /pts -dyn_eta.
-by rewrite -{1}[free x h]un0h updUnr domF inE /= eq_refl.
-Qed.
- -
-Lemma cancelT A1 A2 h1 h2 x (v1 : A1) (v2 : A2) :
-        def (x :-> v1 :+ h1) ->
-          x :-> v1 :+ h1 = x :-> v2 :+ h2 -> A1 = A2.
-Proof.
-move=>D E.
-have: look x (x :-> v1 :+ h1) = look x (x :-> v2 :+ h2) by rewrite E.
-by rewrite !lookPtUn -?E //; apply: dyn_injT.
-Qed.
- -
-Lemma cancel A h1 h2 x (v1 v2 : A) :
-        def (x :-> v1 :+ h1) ->
-        x :-> v1 :+ h1 = x :-> v2 :+ h2 -> [/\ v1 = v2, def h1 & h1 = h2].
-Proof.
-move=>D E.
-have: look x (x :-> v1 :+ h1) = look x (x :-> v2 :+ h2) by rewrite E.
-rewrite !lookPtUn -?E // => /dyn_inj X.
-by rewrite -{}X in E *; rewrite -(unhKl D E) (defUnr D).
-Qed.
- -
-Lemma domPtUnX A (v : A) x i : def (x :-> v :+ i) -> x \in dom (x :-> v :+ i).
-Proof. by move=>D; rewrite domPtUn inE /= D eq_refl. Qed.
- -
-Lemma domPtX A (v : A) x : def (x :-> v) -> x \in dom (x :-> v).
-Proof. by move=>D; rewrite -(unh0 (x :-> v)) domPtUnX // unh0. Qed.
- -
-Lemma dom_notin_notin h1 h2 x :
-        def (h1 :+ h2) -> x \notin dom (h1 :+ h2) -> x \notin dom h1.
-Proof. by move=>D; rewrite domUn inE /= negb_and negb_or /= D; case/andP. Qed.
- -
-Lemma dom_in_notin h1 h2 x : def (h1 :+ h2) -> x \in dom h1 -> x \notin dom h2.
-Proof. by case: defUn=>// D1 D2 H _; apply: H. Qed.
- -
-(******************************)
-(* Properties of block update *)
-(******************************)
- -
-Section BlockUpdate.
-Variable (A : Type).
- -
-Fixpoint updi x (vs : seq A) {struct vs} : heap :=
-  if vs is v'::vs' then (x :-> v') :+ updi (x .+ 1) vs' else empty.
- -
-Lemma updiS x v vs : updi x (v :: vs) = x :-> v :+ updi (x .+ 1) vs.
-Proof. by []. Qed.
- -
-Lemma updi_last x v vs :
-        updi x (rcons vs v) = updi x vs :+ x.+(size vs) :-> v.
-Proof.
-elim: vs x v=>[|w vs IH] x v /=.
-- by rewrite ptr0 unh0 un0h.
-by rewrite -(addn1 (size vs)) addnC -ptrA IH unA.
-Qed.
- -
-Lemma updi_cat x vs1 vs2 :
-        updi x (vs1 ++ vs2) = updi x vs1 :+ updi x.+(size vs1) vs2.
-Proof.
-elim: vs1 x vs2=>[|v vs1 IH] x vs2 /=.
-- by rewrite ptr0 un0h.
-by rewrite -(addn1 (size vs1)) addnC -ptrA IH unA.
-Qed.
- -
-Lemma updi_catI x y vs1 vs2 :
-        y = x.+(size vs1) -> updi x vs1 :+ updi y vs2 = updi x (vs1 ++ vs2).
-Proof. by move=>->; rewrite updi_cat. Qed.
- -
-(* helper lemma *)
-Lemma updiVm' x m xs : m > 0 -> x \notin dom (updi x.+m xs).
-Proof.
-elim: xs x m=>[|v vs IH] x m //= H.
-rewrite ptrA domPtUn inE /= negb_and negb_or -{4}(ptr0 x) ptrK -lt0n H /=.
-by rewrite orbC IH // addn1.
-Qed.
- -
-Lemma updiD x xs : def (updi x xs) = (x != null) || (size xs == 0).
-Proof.
-elim: xs x=>[|v xs IH] x //=; first by rewrite orbC.
-by rewrite defPtUn updiVm' // orbF IH ptr_null andbF andbC.
-Qed.
- -
-Lemma updiVm x m xs :
-        x \in dom (updi x.+m xs) = [&& x != null, m == 0 & size xs > 0].
-Proof.
-case: m=>[|m] /=; last first.
-- by rewrite andbF; apply: negbTE; apply: updiVm'.
-case: xs=>[|v xs]; rewrite ptr0 ?andbF ?andbT //=.
-by rewrite domPtUn inE /= eq_refl -updiS updiD orbF andbT /=.
-Qed.
- -
-Lemma updimV x m xs :
-        x.+m \in dom (updi x xs) = (x != null) && (m < size xs).
-Proof.
-case H: (x == null)=>/=.
-- by case: xs=>// a s; rewrite (eqP H).
-elim: xs x m H=>[|v vs IH] x m H //; case: m=>[|m].
-- by rewrite ptr0 /= domPtUn inE /= eq_refl andbT -updiS updiD H.
-rewrite -addn1 addnC -ptrA updiS domPtUn inE /= IH; last first.
-- by rewrite ptrE /= addn1.
-by rewrite -updiS updiD H /= -{1}(ptr0 x) ptrA ptrK.
-Qed.
- -
-Lemma updiP x y xs :
-        reflect (y != null /\ exists m, x = y.+m /\ m < size xs)
-                (x \in dom (updi y xs)).
-Proof.
-case H: (y == null)=>/=.
-- by rewrite (eqP H); elim: xs=>[|z xs IH] //=; constructor; case.
-case E: (x \in _); constructor; last first.
-- by move=>[_][m][H1] H2; rewrite H1 updimV H2 H in E.
-case: (ptrT x y) E=>m; case/orP; move/eqP=>->.
-- by rewrite updimV H /= => H1; split=>//; exists m.
-rewrite updiVm; case/and3P=>H1; move/eqP=>-> H2.
-by split=>//; exists 0; rewrite ptrA addn0 ptr0.
-Qed.
- -
-(* Invertibility *)
-Lemma updi_inv x xs1 xs2 :
-        def (updi x xs1) -> updi x xs1 = updi x xs2 -> xs1 = xs2.
-Proof.
-elim: xs1 x xs2 =>[|v1 xs1 IH] x /=; case=>[|v2 xs2 D] //=;
-try by move/esym; rewrite empbE empUn empPt.
-by case/(cancel D)=><- /IH E /E->.
-Qed.
- -
-Lemma updi_iinv x xs1 xs2 h1 h2 :
-        size xs1 = size xs2 -> def (updi x xs1 :+ h1) ->
-        updi x xs1 :+ h1 = updi x xs2 :+ h2 -> xs1 = xs2 /\ h1 = h2.
-Proof.
-elim: xs1 x xs2 h1 h2=>[|v1 xs1 IH] x /=; case=>[|v2 xs2] //= h1 h2.
-- by rewrite !un0h.
-by case=>E; rewrite -!unA=>D; case/(cancel D)=><- /IH F /F - /(_ E) [->->].
-Qed.
- -
-End BlockUpdate.
- -
-(*********************************************************************)
-(* Freshness for even and odd locations -- used in information flow, *)
-(* where heaps are split into low (even) and high (odd) parts.       *)
-(*********************************************************************)
- -
-Definition low : pred ptr := fun x => 0 == nat_ptr x %[mod 2].
-Definition high : pred ptr := fun x => 1 == nat_ptr x %[mod 2].
- -
-Definition get_lows h :=
-  if h is Def hs _ then filter low (supp hs) else [::].
- -
-Definition get_highs h :=
-  if h is Def hs _ then filter high (supp hs) else [::].
- -
-Definition ldom h : pred ptr := fun x => x \in get_lows h.
-Definition hdom h : pred ptr := fun x => x \in get_highs h.
- -
-Lemma ldomP h x : x \in ldom h = (x \in dom h) && low x.
-Proof.
-case: h=>[//|[h S]]; rewrite /ldom /= /dom /supp /= =>H.
-rewrite -!topredE /=.
-elim: (map key h)=>[|y s IH] //=.
-case: ifP=>E; rewrite !inE IH; case: eqP=>// -> //=.
-by rewrite E andbF.
-Qed.
- -
-Lemma hdomP h x : x \in hdom h = (x \in dom h) && high x.
-Proof.
-case: h=>[//|[h S]]; rewrite /hdom /= /dom /supp /= =>H.
-rewrite -!topredE /=.
-elim: (map key h)=>[|y s IH] //=.
-case: ifP=>E; rewrite !inE IH; case: eqP=>// -> //=.
-by rewrite E andbF.
-Qed.
- -
-Lemma ldomK h1 h2 t1 t2 :
-        def (h1 :+ t1) -> def (h2 :+ t2) ->
-        ldom h1 =i ldom h2 ->
-        ldom (h1 :+ t1) =i ldom (h2 :+ t2) -> ldom t1 =i ldom t2.
-Proof.
-move=>D1 D2 H1 H2 x; move: {H1 H2} (H1 x) (H2 x).
-rewrite !ldomP !domUn !inE.
-case: defUn D1=>// H1 H2 L1 _; case: defUn D2=>// H3 H4 L2 _.
-case E1: (x \in dom t1); case E2: (x \in dom t2)=>//; rewrite orbF orbT /=;
-case E3: (x \in dom h1); case E4: (x \in dom h2)=>//= _ _;
-by [move/L1: E3; rewrite E1 | move/L2: E4; rewrite E2].
-Qed.
- -
-Definition lfresh h := (last null (get_lows h)) .+ 2.
-Definition hfresh h := (last (null .+ 1) (get_highs h)) .+ 2.
- -
-Lemma last_inv A B (f : A -> B) (x1 x2 : A) (h : seq A) :
-        f x1 = f x2 -> f (last x1 h) = f (last x2 h).
-Proof. by elim: h. Qed.
- -
-Lemma lfresh_low h n : low (lfresh h) .+ (2*n).
-Proof.
-rewrite /lfresh /low /get_lows.
-case: h; first by rewrite modnDl modnMr.
-case; rewrite /supp /low /=.
-elim=>[|[[x] v] h IH] /=; first by rewrite modnDl modnMr.
-rewrite inE negb_or ptrE /=; move/path_sorted=>H1; case/andP=>H2 H3.
-case: ifP=>E /=; last by apply: IH.
-set f := fun x => (nat_ptr x + 2 + 2 * n) %% 2.
-have F: f (ptr_nat x) = f null.
-- by rewrite /f -modn_mod -addnA -modnDm -(eqP E) !modn_mod.
-move: (last_inv (f := f) (x1 := (ptr_nat x)) (x2 := null))=>L.
-by rewrite /f /= in L; rewrite {}L //; apply: IH.
-Qed.
- -
-Lemma hfresh_high h n : high (hfresh h) .+ (2*n).
-Proof.
-rewrite /hfresh /high /get_highs.
-case: h n=>[n|].
-- by rewrite /null /= add0n -addnA -modnDm modnDl modnMr addn0.
-case; rewrite /supp /high /=.
-elim=>[|[[x] v] h IH] /=.
-- by move=>_ _ n; rewrite add0n -addnA -modnDm modnDl modnMr addn0.
-rewrite inE negb_or ptrE /=; move/path_sorted=>H1; case/andP=>H2 H3.
-case: ifP=>E n /=; last by apply: IH.
-set f := fun x => (nat_ptr x + 2 + 2 * n) %% 2.
-have F: f (ptr_nat x) = f (null .+ 1).
-- rewrite /f -modn_mod /= add0n -addnA.
-   rewrite -modnDm -(eqP E) modn_mod.
-   by rewrite modnDm addnA.
-move: (last_inv (f := f) (x1 := (ptr_nat x)) (x2 := null .+ 1))=>L.
-by rewrite /f /= in L; rewrite {}L //; apply: IH.
-Qed.
- -
-Lemma dom_lfresh h n : (lfresh h) .+ (2*n) \notin dom h.
-Proof.
-suff L2: forall h x, low x -> x \in dom h -> ord x (lfresh h).
-- apply: (contra (L2 _ _ (lfresh_low h n))).
-  by rewrite -leqNgt leq_addr.
-case=>[|[s H1]] //; rewrite /supp => /= H2 x.
-rewrite /dom /lfresh /get_lows /low /supp -topredE /=.
-elim: s H1 null H2 x=>[|[y d] s IH] //= H1 x.
-rewrite inE negb_or; case/andP=>H3 H4 z /= E; rewrite inE.
-case/orP=>H5.
-- rewrite -!{H5 y}(eqP H5) E in H1 H3 *.
-  by apply: (path_last 1); apply: path_filter.
-by case: ifP=>E2; apply: IH=>//; move: H1;
-[apply: path_sorted | apply: notin_path | apply: path_sorted].
-Qed.
- -
-Lemma dom_hfresh h n : (hfresh h) .+ (2*n) \notin dom h.
-Proof.
-suff L2: forall h x, high x -> x \in dom h -> ord x (hfresh h).
-- apply: (contra (L2 _ _ (hfresh_high h n))).
-  by rewrite -leqNgt leq_addr.
-case=>[|[s H1]] //; rewrite /supp => /= H2 x.
-rewrite /dom /hfresh /get_highs /high /supp -topredE /=.
-elim: s H1 null H2 x=>[|[y d] s IH] //= H1 x.
-rewrite inE negb_or; case/andP=>H3 H4 z /= E; rewrite inE.
-case/orP=>H5.
-- rewrite -!{H5 y}(eqP H5) E in H1 H3 *.
-  by apply: (path_last 1); apply: path_filter.
-case: ifP=>E2; last by apply: IH=>//; apply: path_sorted H1.
-move: H1.
-have [t -> H1]: exists t, y = t .+ 1.
-- case: y {H3} E2; case=>[|m] //.
-  by exists (ptr_nat m); rewrite /ptr_offset /= addn1.
-apply: IH=>//; first by apply: path_sorted H1.
-apply: notin_path; apply: ord_path H1.
-by case: t=>m; rewrite /ord /= addn1.
-Qed.
- -
-Lemma lfresh_null h : lfresh h != null.
-Proof. by case: h=>[//|[h H] F]; rewrite /lfresh ptrE -lt0n /= addnS. Qed.
- -
-Lemma hfresh_null h : hfresh h != null.
-Proof. by case: h=>[//|[h H] F]; rewrite /lfresh ptrE -lt0n /= addnS. Qed.
- -
-Lemma high_lowD : [predI low & high] =i pred0.
-Proof.
-case=>x; rewrite inE /low /high /= -!topredE /=.
-by case: x=>// n; case E: (0 %% 2 == _)=>//=; rewrite -(eqP E).
-Qed.
- -
-Lemma modnS x1 x2 : (x1 == x2 %[mod 2]) = (x1.+1 == x2.+1 %[mod 2]).
-Proof. by rewrite -![_.+1 as X in X %% 2]add1n eqn_modDl. Qed.
- -
-Lemma hlE x : high x = ~~ low x.
-Proof.
-case: x=>n; rewrite /high /low /=.
-elim: n=>[//|m IH]; apply: negb_inj.
-by rewrite negbK -modnS -IH modnS modnn.
-Qed.
- -
-Lemma lhE x : low x = ~~ high x.
-Proof. by apply: negb_inj; rewrite negbK hlE. Qed.
- -
-Lemma ldomUn h1 h2 :
-        ldom (h1 :+ h2) =i
-        [pred x | def (h1 :+ h2) && (x \in [predU ldom h1 & ldom h2])].
-Proof. by move=>x; rewrite !inE !ldomP domUn !inE /= -andbA andb_orl. Qed.
- -
-Definition loweq h1 h2 := get_lows h1 == get_lows h2.
- -
-Notation "h1 =~ h2" := (loweq h1 h2) (at level 80).
- -
-Lemma low_refl h : h =~ h.
-Proof. by rewrite /loweq. Qed.
- -
-Hint Resolve low_refl : core.
- -
-Lemma low_sym h1 h2 : (h1 =~ h2) = (h2 =~ h1).
-Proof. by rewrite /loweq eq_sym. Qed.
- -
-Lemma low_trans h2 h1 h3 : h1 =~ h2 -> h2 =~ h3 -> h1 =~ h3.
-Proof. by rewrite /loweq; move/eqP=>->. Qed.
- -
-Lemma loweqP h1 h2 : reflect (ldom h1 =i ldom h2) (h1 =~ h2).
-Proof.
-case E: (loweq h1 h2); constructor; rewrite /loweq in E.
-- by move=>x; rewrite /ldom (eqP E).
-move=>F.
-suff {E} : get_lows h1 = get_lows h2 by move/eqP; rewrite E.
-apply: (eq_sorted_irr (leT := ord)); last by apply: F.
-- by apply: trans.
-- by apply: irr.
-- case: h1 {F}=>// [[h S] H].
-  by rewrite sorted_filter //; apply: trans.
-case: h2 {F}=>// [[h S] H].
-by rewrite sorted_filter //; apply: trans.
-Qed.
- -
-Lemma loweqK h1 h2 t1 t2 :
-        def (h1 :+ t1) -> def (h2 :+ t2) ->
-        h1 =~ h2 -> h1 :+ t1 =~ h2 :+ t2 -> t1 =~ t2.
-Proof.
-move=>D1 D2.
-case: loweqP=>// E1 _; case: loweqP=>// E2 _; apply/loweqP.
-by apply: ldomK E2.
-Qed.
- -
-Lemma loweqE h1 h2 : h1 =~ h2 -> lfresh h1 = lfresh h2.
-Proof. by rewrite /loweq /lfresh; move/eqP=>->. Qed.
- -
-Lemma lowUn h1 h2 t1 t2 :
-        def (h1 :+ t1) ->
-        def (h2 :+ t2) ->
-        h1 =~ h2 -> t1 =~ t2 -> h1 :+ t1 =~ h2 :+ t2.
-Proof.
-move=>D1 D2; do 2![case: loweqP=>//]=>H1 H2 _ _.
-apply/loweqP=>x; move: (H1 x) (H2 x).
-by rewrite !ldomP !domUn !inE D1 D2 /= !andb_orl=>-> ->.
-Qed.
- -
-Lemma lowPn A1 A2 (x : ptr) (v1 : A1) (v2 : A2) : x :-> v1 =~ x :-> v2.
-Proof. by apply/loweqP=>y; rewrite !ldomP !domPt. Qed.
- -
-Hint Resolve lowPn : core.
- -
-Lemma highPn A1 A2 (x1 x2 : ptr) (v1 : A1) (v2 : A2) :
-        high x1 -> high x2 -> x1 :-> v1 =~ x2 :-> v2.
-Proof.
-move=>H1 H2.
-apply/loweqP=>y; rewrite !ldomP !domPt !inE.
-case E1: (x1 == y); first by rewrite -(eqP E1) lhE H1 !andbF.
-case E2: (x2 == y)=>//=.
-by rewrite -(eqP E2) lhE H2 andbF.
-Qed.
- -
-Lemma lowPtUn A1 A2 h1 h2 (x : ptr) (v1 : A1) (v2 : A2) :
-        def (x :-> v1 :+ h1) ->
-        def (x :-> v2 :+ h2) ->
-        (x :-> v1 :+ h1 =~ x :-> v2 :+ h2) = (h1 =~ h2).
-Proof.
-move=>D1 D2.
-case E: (h1 =~ h2); first by apply: lowUn.
-move/(elimF idP): E=>E; apply: (introF idP)=>F; case: E.
-by apply: loweqK F.
-Qed.
- -
-Lemma highPtUn A h1 h2 (x : ptr) (v : A) :
-        def (x :-> v :+ h1) -> high x ->
-        (x :-> v :+ h1 =~ h2) = (h1 =~ h2).
-Proof.
-move=>D H.
-case E: (h1 =~ h2); case: loweqP E=>// L1 _; apply/loweqP.
-- move=>y; rewrite !ldomP domPtUn !inE D.
-  case: eqP=>[<-|]; last by rewrite -!ldomP L1.
-  by rewrite lhE H /= andbF.
-move=>L2; case: L1 => y; move: {L2} (L2 y).
-rewrite !ldomP !domPtUn !inE D /=.
-by case: eqP=>//= <-; rewrite lhE H andbF -[x \in dom h1]negbK (defPt_dom D).
-Qed.
- -
-Lemma highPtUn2 A1 A2 h1 h2 (x1 x2 : ptr) (v1 : A1) (v2 : A2) :
-        def (x1 :-> v1 :+ h1) ->
-        def (x2 :-> v2 :+ h2) ->
-        high x1 -> high x2 ->
-        h1 =~ h2 -> x1 :-> v1 :+ h1 =~ x2 :-> v2 :+ h2.
-Proof. by move=>D1 D2 H1 H2 L; apply: lowUn=>//; apply: highPn. Qed.
- -
-(**********************************************)
-(* several basic operations on pairs of heaps *)
-(**********************************************)
- -
-Definition plus2 (h1 h2 : heap * heap) : heap * heap :=
-  (h1.1 :+ h2.1, h1.2 :+ h2.2).
- -
-Definition def2 (h : heap * heap) := def h.1 && def h.2.
- -
-Notation "h1 :++ h2" := (plus2 h1 h2) (at level 50).
- -
-Lemma unA2 h1 h2 h3 : h1 :++ (h2 :++ h3) = h1 :++ h2 :++ h3.
-Proof. by congr (_, _); rewrite /= unA. Qed.
- -
-Lemma unC2 h1 h2 : h1 :++ h2 = h2 :++ h1.
-Proof. by congr (_, _); rewrite unC. Qed.
- -
-Lemma unKhl2 h h1 h2 : def2 (h1 :++ h) -> h1 :++ h = h2 :++ h -> h1 = h2.
-Proof.
-move: h h1 h2=>[h1 h2][h11 h12][h21 h22]; case/andP=>/= [D1 D2] [E1 E2].
-by rewrite (unKhl D1 E1) (unKhl D2 E2).
-Qed.
- -
-Lemma unKhr2 h h1 h2 : def2 (h2 :++ h) -> h1 :++ h = h2 :++ h -> h1 = h2.
-Proof.
-move: h h1 h2=>[h1 h2][h11 h12][h21 h22]; case/andP=>/= [D1 D2] [E1 E2].
-by rewrite (unKhr D1 E1) (unKhr D2 E2).
-Qed.
- -
-Lemma unDl2 h1 h2 : def2 (h1 :++ h2) -> def2 h1.
-Proof. by case/andP=>/= D1 D2; rewrite /def2 (defUnl D1) (defUnl D2). Qed.
- -
-Lemma unDr2 h1 h2 : def2 (h1 :++ h2) -> def2 h2.
-Proof. by case/andP=>/= D1 D2; rewrite /def2 (defUnr D1) (defUnr D2). Qed.
- -
-Lemma un0h2 h : (empty, empty) :++ h = h.
-Proof. by case: h=>h1 h2; rewrite /plus2 /= !un0h. Qed.
- -
-Lemma unh02 h : h :++ (empty, empty) = h.
-Proof. by case: h=>h1 h2; rewrite /plus2 /= !unh0. Qed.
- -
-(**************************************************************************)
-(* Several tactics for canceling common terms in disjoint unions          *)
-(* Currently, they don't deal with weak pointers. I.e.  they only if they *)
-(* see iterms like x :-> v1 and x :-> v2, they will reduce to v1 = v2     *)
-(* only if v1, v2 are of the same type A more general tactic would emit   *)
-(* obligation dyn v1 = dyn v2, but I don't bother with this now.          *)
-(**************************************************************************)
- -
-(* First cancelation in hypotheses *)
- -
-Lemma injUh A h1 h2 x (v1 v2 : A) :
-        def (h1 :+ (x :-> v1)) ->
-        h1 :+ (x :-> v1) = h2 :+ (x :-> v2) ->
-          def h1 /\ h1 = h2 /\ v1 = v2.
-Proof. by rewrite -!(unC (x :-> _))=>D; case/(cancel D)=><- -> ->. Qed.
- -
-Lemma eqUh h1 h2 h : def (h1 :+ h) -> h1 :+ h = h2 :+ h -> def h1 /\ h1 = h2.
-Proof. by move=>D E; rewrite {2}(unKhl D E) (defUnl D). Qed.
- -
-Lemma exit1 h1 h2 h : def (h1 :+ h) -> h1 :+ h = h :+ h2 -> def h1 /\ h1 = h2.
-Proof. by move=>D; rewrite (unC h); apply: eqUh. Qed.
- -
-Lemma exit2 h1 h : def (h1 :+ h) -> h1 :+ h = h -> def h1 /\ h1 = empty.
-Proof. by move=>H1; rewrite -{2}(unh0 h)=>H2; apply: exit1 H2. Qed.
- -
-Lemma exit3 h1 h : def h -> h = h :+ h1 -> def empty /\ empty = h1.
-Proof.
-move=>H1 H2; split=>//; rewrite -{1}(unh0 h) in H2.
-by apply: unhKl H2; rewrite unh0.
-Qed.
- -
-Lemma exit4 h : def h -> h = h -> def empty /\ empty = empty.
-Proof. by []. Qed.
- -
-Ltac cancelator t H :=
-  match goal with
-  (* we exit when we hit the terminator on the left *)
-  | |- ?h1 :+ t = ?h2 -> _ =>
-     let j := fresh "j" in
-     set j := {1}(h1 :+ t);
-     rewrite -1?unA /j {j};
-     (move/(exit1 H)=>{H} [H] || move/(exit2 H)=>{H} [H])
-  | |- t = ?h2 -> _ =>
-     rewrite -?unA;
-     (move/(exit3 H)=>{H} [H] || move/(exit4 H)=>{H} [H])
-  | |- (?h1 :+ (?x :-> ?v) = ?h2) -> _ =>
-    let j := fresh "j" in
-    set j := {1}(h1 :+ (x :-> v));
-    (* if x appears in the second union, first bring it to the back *)
-    rewrite 1?(unC (x :-> _)) -?(unAC _ _ (x :-> _)) /j {j};
-    (* then one of the following must apply *)
-    (* if x is in the second union then cancel *)
-    (move/(injUh H)=>{H} [H []] ||
-    (* if not, rotate x in the first union *)
-     rewrite (unC h1) ?unA in H * );
-    (* and proceed *)
-    cancelator t H
-  (* if the heap is not a points-to relation, also try to cancel *)
-  | |- (?h1 :+ ?h = ?h2) -> _ =>
-    let j := fresh "j" in
-    set j := {1}(h1 :+ h);
-    (* if h appears in the second union, first bring it to the back *)
-    rewrite 1?(unC h) -?(unAC _ _ h) /j {j};
-    (* then one of the following must apply *)
-    (* if h is in the second union then cancel *)
-    (move/(eqUh H)=>{H} [H []] ||
-    (* if not, rotate h in the first union *)
-    rewrite (unC h1) ?unA in H * );
-    (* and proceed *)
-    cancelator t H
-  | |- _ => idtac
-  end.
- -
-Ltac heap_cancel :=
-  match goal with
-  | |- ?h1 = ?h2 -> ?GG =>
-    let t1 := fresh "t1" in
-    let t2 := fresh "t2" in
-    let t := fresh "t" in
-    let H := fresh "H" in
-    let G := fresh "hidden_goal"
-    in
-      (* generate the obligation to prove that the left heap is defined *)
-      suff : def h1; first (
-       (* make sure no sharing of expressions in the goal *)
-       set t1 := {1 2}h1; set t2 := {1}h2; set G := GG;
-       (* introduce terminators *)
-       rewrite -(un0h t1) -(un0h t2) [empty]lock;
-       set t := locked empty; rewrite /t1 /t2 {t1 t2};
-       move=>H;
-       (* flatten the goal *)
-       rewrite ?unA in H *;
-       (* call the cancelation routine *)
-       cancelator t H;
-       (* remove the terminator and push H onto the goal *)
-       move: H {t}; rewrite /G {G})
-  | |- _ => idtac
-  end.
- -
-(* Then cancelation in conclusions *)
- -
-Lemma cexit1 h1 h2 h : h1 = h2 -> h1 :+ h = h :+ h2.
-Proof. by move=>->; rewrite unC. Qed.
- -
-Lemma cexit2 h1 h : h1 = empty -> h1 :+ h = h.
-Proof. by move=>->; rewrite un0h. Qed.
- -
-Lemma cexit3 h1 h : empty = h1 -> h = h :+ h1.
-Proof. by move=><-; rewrite unh0. Qed.
- -
-Lemma congUh A h1 h2 x (v1 v2 : A) :
-        h1 = h2 -> v1 = v2 -> h1 :+ (x :-> v1) = h2 :+ (x :-> v2).
-Proof. by move=>-> ->. Qed.
- -
-Lemma congeqUh h1 h2 h : h1 = h2 -> h1 :+ h = h2 :+ h.
-Proof. by move=>->. Qed.
- -
-Ltac congruencer t :=
-  match goal with
-  | |- ?h1 :+ t = ?h2 =>
-     let j := fresh "j" in
-     set j := {1}(h1 :+ t);
-     rewrite -1?unA /j {j};
-     (apply: cexit1 || apply: cexit2)
-  | |- t = ?h2 =>
-     rewrite -1?unA;
-     (apply: cexit3 || apply: refl_equal)
-  | |- (?h1 :+ (?x :-> ?v) = ?h2) =>
-    let j := fresh "j" in
-    set j := {1}(h1 :+ (x :-> v));
-    (* if x appears in the second union, first bring it to the back *)
-    rewrite 1?(unC (x :-> _)) -?(unAC _ _ (x :-> _)) /j {j};
-    (* then one of the following must apply *)
-    (* if x is in the second union then cancel *)
-    ((apply: congUh; [congruencer t | idtac]) ||
-    (* if not, rotate x in the first union *)
-     (rewrite (unC h1) ?unA; congruencer t))
-  (* if the heap is not a points-to relation, also try to cancel *)
-  | |- (?h1 :+ ?h = ?h2) =>
-    let j := fresh "j" in
-    set j := {1}(h1 :+ h);
-    (* if h appears in the second union, first bring it to the back *)
-    rewrite 1?(unC h) -?(unAC _ _ h) /j {j};
-    (* then one of the following must apply *)
-    (* if h is in the second union then cancel *)
-    (apply: congeqUh ||
-    (* if not, rotate h in the first union *)
-    rewrite (unC h1) ?unA);
-    (* and proceed *)
-    congruencer t
-  | |- _ => idtac
-  end.
- -
-Ltac heap_congr :=
-  match goal with
-  | |- ?h1 = ?h2 =>
-    let t1 := fresh "t1" in
-    let t2 := fresh "t2" in
-    let t := fresh "t" in
-      set t1 := {1}h1; set t2 := {1}h2;
-      (* introduce terminators *)
-      rewrite -(un0h t1) -(un0h t2) [empty]lock;
-      set t := locked empty; rewrite /t1 /t2 {t1 t2};
-      (* flatten the goal *)
-      rewrite ?unA;
-      (* call the congruence routine and remove the terminator *)
-      congruencer t=>{t}
-  | |- _ => idtac
-  end.
- -
-Lemma test h1 h2 h3 x (v1 v2 : nat) :
-        h3 = h2 -> v1 = v2 ->
-        h1 :+ (x :-> v1) :+ h3= h2 :+ h1 :+ (x :-> v2).
-Proof. by move=>H1 H2; heap_congr. Qed.
- -
-(* and a tactic for computing the subdom relation *)
- -
-Definition supdom h2 h1 := subdom h1 h2.
- -
-Lemma sexit1 h1 h2 h :
-        def (h2 :+ h) ->
-          (def h2 -> supdom h2 h1) -> supdom (h2 :+ h) (h :+ h1).
-Proof.
-move=>H1 H2; rewrite (unC h); apply: subdomE=>//.
-by apply: H2; apply: defUnl H1.
-Qed.
- -
-Lemma sexit2 h1 h :
-        def (h1 :+ h) -> (def h1 -> supdom h1 empty) ->
-          supdom (h1 :+ h) h.
-Proof.
-move=>H1 H2; rewrite -{2}(un0h h); apply: subdomE=>//.
-by apply: H2; apply: defUnl H1.
-Qed.
- -
-Lemma sexit3 h1 h :
-        def h -> (def empty -> supdom empty h1) ->
-          supdom h (h :+ h1).
-Proof.
-move=>H1 H2; rewrite unC -{1}(un0h h).
-by apply: subdomE; [rewrite un0h | apply: H2].
-Qed.
- -
-Lemma sexit4 h : def h -> (def empty -> empty = empty) -> supdom h h.
-Proof. by move=>*; rewrite -(un0h h); apply: subdomE=>//; rewrite un0h. Qed.
- -
-Lemma supdomUh A B h1 h2 x (v1 : A) (v2 : B) :
-        def (h2 :+ (x :-> v2)) ->
-          (def h2 -> supdom h2 h1) ->
-            supdom (h2 :+ (x :-> v2)) (h1 :+ (x :-> v1)).
-Proof.
-move=>H1 H2.
-apply: subdomUE=>//; first by apply: H2; apply: defUnl H1.
-by apply: subdomPE; apply: (@defPt_null _ h2 x v2); rewrite unC.
-Qed.
- -
-Lemma supdomeqUh h1 h2 h :
-        def (h2 :+ h) -> (def h2 -> supdom h2 h1) -> supdom (h2 :+ h) (h1 :+ h).
-Proof. by rewrite (unC h1); apply: sexit1. Qed.
- -
-Lemma sup_defdef h1 h2 : def h2 -> supdom h2 h1 -> def h1.
-Proof. by move=>H1; rewrite /supdom; move/subdom_def; rewrite H1 andbT. Qed.
- -
-Ltac supdom_checker t H :=
-  match goal with
-  | |- is_true (supdom (?h1 :+ t) ?h2) =>
-     let j := fresh "j" in
-     set j := {1}(h1 :+ t);
-     rewrite -1?unA /j {j};
-     (apply: (sexit1 H)=>{H} H || apply: (sexit2 H)=>{H} H)
-  | |- is_true (supdom t ?h1) =>
-     rewrite -1?unA;
-     (apply: (sexit3 H)=>{H} H || apply: (sexit4 H)=>{H} H)
-  | |- is_true (supdom (?h1 :+ (?x :-> ?v)) ?h2) =>
-    let j := fresh "j" in
-    set j := {1}(h1 :+ (x :-> v));
-    (* if x appears in the second union, first bring it to the back *)
-    rewrite 1?(unC (x :-> _)) -?(unAC _ _ (x :-> _)) /j {j};
-    (* then one of the following must apply *)
-    (* if x is in the second union then cancel *)
-    (apply: (supdomUh _ H)=>{H} H ||
-    (* if not, rotate x in the first union *)
-     (rewrite (unC h1) ?unA in H * )); supdom_checker t H
-  (* if the heap is not a points-to relation, also try to cancel *)
-  | |- is_true (supdom (?h1 :+ ?h) ?h2) =>
-    let j := fresh "j" in
-    set j := {1}(h1 :+ h);
-    (* if h appears in the second union, first bring it to the back *)
-    rewrite 1?(unC h) -?(unAC _ _ h) /j {j};
-    (* then one of the following must apply *)
-    (* if h is in the second union then cancel *)
-    (apply: (supdomeqUh H)=>{H} H ||
-    (* if not, rotate h in the first union *)
-    (rewrite (unC h1) ?unA in H * ));
-    (* and proceed *)
-    supdom_checker t H
-  | |- _ => idtac
-  end.
- -
-Ltac defcheck :=
-  match goal with
-  | |- is_true (def ?h2) -> is_true (def ?h1) =>
-    let t1 := fresh "t1" in
-    let t2 := fresh "t2" in
-    let t := fresh "t" in
-    let H := fresh "H" in
-      set t2 := {1}h2; set t1 := {1}h1;
-      (* introduce terminators *)
-      rewrite -(un0h t1) -(un0h t2) [empty]lock;
-      set t := locked empty; rewrite /t1 /t2 {t1 t2};
-      (* flatten the goal *)
-      rewrite ?unA;
-      move=>H;
-      apply: (sup_defdef H);
-      (* call the subdom_cheker routine and remove the terminator *)
-      supdom_checker t H; move: H {t}; rewrite /supdom
-  | |- _ => idtac
-  end.
- -
-(* this diverges in coq 8.3
-Lemma test2 h1 h2 x (v1 v2 : nat) : subdom h1 h2 ->
-        def (h2 :+ (x :-> v2)) -> def (h1 :+ (x :-> v1)).
-Proof. by move=>H; defcheck. Qed.
-*)

- -
-Ltac hhauto := (do ?econstructor=>//; try by [heap_congr])=>//.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.hprop.html b/docs/LemmaOverloading.hprop.html deleted file mode 100644 index 0d9db7a..0000000 --- a/docs/LemmaOverloading.hprop.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.hprop

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrfun.
-From LemmaOverloading
-Require Import rels heaps.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-Ltac add_morphism_tactic := SetoidTactics.add_morphism_tactic.
-Notation " R ===> R' " := (@Morphisms.respectful _ _ R R')
-  (right associativity, at level 55) : signature_scope.
- -
-Definition star (p1 p2 : Pred heap) : Pred heap :=
-  [Pred h | exists h1, exists h2, h = h1 :+ h2 /\ h1 \In p1 /\ h2 \In p2].
- -
-Definition emp : Pred heap := [Pred i | i = empty].
-Definition this i : Pred heap := [Pred h : heap | i = h].
-Definition ppts A x (v : A) : Pred heap := [Pred h | locked x :-> v = h].
-Definition top : Pred heap := PredT.
- -
-Notation "p1 '#' p2" := (star p1 p2)
-  (at level 57, right associativity) : rel_scope.
-Notation "x ':-->' v" := (ppts x v) (at level 50) : rel_scope.
- -
-Add Parametric Morphism : star with signature
-  @EqPred _ ===> @EqPred _ ===> @EqPred _ as star_morph.
-Proof.
-by move=>p1 q1 H1 p2 q2 H2 h /=; split; case=>h1 [h2][->][H3] H4;
-exists h1; exists h2; [rewrite -H1 -H2 | rewrite H1 H2].
-Qed.
- -
-Section BasicProperties.
- -
-Lemma starC p1 p2 : p1 # p2 <~> p2 # p1.
-Proof.
-move=>h /=; split; case=>h1 [h2][->][H1] H2;
-by exists h2; exists h1; rewrite unC.
-Qed.
- -
-Lemma starp0 p : p # emp <~> p.
-Proof.
-move=>h /=; split; first by case=>h1 [h2][->][H1]->; rewrite unh0.
-by move=>H1; exists h; exists empty; rewrite unh0.
-Qed.
- -
-Lemma star0p p : emp # p <~> p.
-Proof. by rewrite starC starp0. Qed.
- -
-Lemma starCA p1 p2 p3 : p1 # p2 # p3 <~> p2 # p1 # p3.
-Proof.
-move=>h; split; case=>h1 [_][->][H1][h2][h3][->][H2] H3 /=;
-by rewrite unCA; do !esplit.
-Qed.
- -
-Lemma starA p1 p2 p3 : (p1 # p2) # p3 <~> p1 # p2 # p3.
-Proof. by rewrite (starC p2) starCA starC. Qed.
- -
-Lemma starAC p1 p2 p3 : (p1 # p2) # p3 <~> (p1 # p3) # p2.
-Proof. by rewrite -2!(starC p3) starA. Qed.
- -
-End BasicProperties.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.indom.html b/docs/LemmaOverloading.indom.html deleted file mode 100644 index d87720d..0000000 --- a/docs/LemmaOverloading.indom.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.indom

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool ssrnat eqtype.
-From LemmaOverloading
-Require Import heaps.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(*****************************************************************)
-(* indom :                                                       *)
-(*    lemma automated with Canonical Structures to prove/rewrite *)
-(*    expressions with the form                                  *)
-(*      x \in dom (... :+ x :-> v :+ ... )                       *)
-(*    for some v. Usage:                                         *)
-(*      rewrite/apply: (indom D)                                 *)
-(*    where D : def (... :+ x :-> v :+ ...)                      *)
-(*****************************************************************)
- -
-(* Tagging for controling the instance search *)
-Structure tagged_heap := Tag {untag :> heap}.
- -
-Definition right_tag := Tag.
-Definition left_tag := right_tag.
-Canonical Structure found_tag h := left_tag h.
- -
-Definition invariant x (h : tagged_heap) :=
-  def (untag h) -> x \in dom (untag h).
- -
-(* Main structure and instances *)
-Structure find (x : ptr) :=
-  Form { heap_of :> tagged_heap;
-         _ : invariant x heap_of }.
- -
-Lemma found_pf A x (v : A) : invariant x (found_tag (x :-> v)).
-Proof. by rewrite /invariant defPt domPt inE /= eq_refl. Qed.
- -
-Canonical Structure ptr_found A x (v : A) :=
-  @Form x (found_tag (x :-> v)) (@found_pf A x v).
- -
-Lemma left_pf x (h : heap) (f : find x) :
-        invariant x (left_tag (untag (heap_of f) :+ h)).
-Proof.
-case:f=>[[i]]; rewrite /invariant /= => H D.
-by rewrite domUn !inE /= D (H (defUnl D)).
-Qed.
- -
-Canonical Structure search_left x (h : heap) (f : find x) :=
-  @Form x (left_tag (untag (heap_of f) :+ h)) (@left_pf x h f).
- -
-Lemma right_pf x (h : heap) (f : find x) :
-        invariant x (right_tag (h :+ untag (heap_of f))).
-Proof.
-case: f=>[[i]]; rewrite /invariant /= => H D.
-by rewrite domUn !inE /= D (H (defUnr D)) orbT.
-Qed.
- -
-Canonical Structure search_right x (h : heap) (f : find x) :=
-  @Form x (right_tag (h :+ untag (heap_of f))) (@right_pf x h f).
- -
-(* Main lemma *)
-Lemma indom (x : ptr) (f : find x) : def f -> x \in dom f.
-Proof. by case: f=>[[i]]; apply. Qed.
- -
-(*************************************************)
-(*                   Examples                    *)
-(*************************************************)
- -
-(* simple example *)
-Example ex1 A (x1 x2 : ptr) (v1 v2 : A) (h1 h2 : heap) :
-          def (h1 :+ x1 :-> 1 :+ (x2 :-> 3 :+ empty)) ->
-          if x2 \in dom (h1 :+ x1 :-> 1 :+ (x2 :-> 3 :+ empty))
-            then 1 == 1
-            else 1 == 0.
-Proof.
-move=>D.
-by rewrite indom.
-Qed.
- -
-(* same example, automatically unfolding a definition *)
-Example ex2 A (x1 x2 : ptr) (v1 v2 : A) (h1 h2 : heap) :
-          def (h1 :+ x1 :-> 1 :+ (x2 :-> 3 :+ empty)) ->
-          if x2 \in dom (h1 :+ x1 :-> 1 :+ (x2 :-> 3 :+ empty))
-            then 1 == 1
-            else 1 == 0.
-Proof.
-set H := _ :+ _ :+ (_ :+ _).
-move=>D.
-by rewrite indom.
-Qed.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.indomCTC.html b/docs/LemmaOverloading.indomCTC.html deleted file mode 100644 index 55be6f9..0000000 --- a/docs/LemmaOverloading.indomCTC.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.indomCTC

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool ssrnat eqtype.
-From LemmaOverloading
-Require Import heaps.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-Class Indom (x : ptr) (h : heap) :=
-   { indom : def h -> x \in dom h }.
- -
-Program Instance found A x (v:A) : Indom x (x:->v).
-Next Obligation.
-rewrite defPt in H.
-by rewrite domPt !inE eq_refl H.
-Qed.
- -
-Program Instance found_left x h1 h2 (_ : Indom x h1) : Indom x (h1:+h2).
-Next Obligation.
-rewrite domUn !inE H0.
-case: H=>H; by rewrite (H (defUnl H0)).
-Qed.
- -
-Program Instance found_right x h1 h2 (_ : Indom x h2) : Indom x (h1:+h2).
-Next Obligation.
-rewrite domUn !inE H0.
-by case: H=>H; rewrite (H (defUnr H0)) orbT.
-Qed.
- -
-(* simple example *)
-Example ex1 A (x1 x2 : ptr) (v1 v2 : A) (h1 h2 : heap) :
-          def (h1 :+ x1 :-> 1 :+ (x2 :-> 3 :+ empty)) ->
-          if x2 \in dom (h1 :+ x1 :-> 1 :+ (x2 :-> 3 :+ empty))
-            then 1 == 1
-            else 1 == 0.
-Proof.
-move=>D.
-by rewrite indom.
-Qed.
- -
-(* same example, automatically unfolding a definition *)
-Example ex2 A (x1 x2 : ptr) (v1 v2 : A) (h1 h2 : heap) :
-          def (h1 :+ x1 :-> 1 :+ (x2 :-> 3 :+ empty)) ->
-          if x2 \in dom (h1 :+ x1 :-> 1 :+ (x2 :-> 3 :+ empty))
-            then 1 == 1
-            else 1 == 0.
-Proof.
-set H := _ :+ _ :+ (_ :+ _).
-move=>D.
-by rewrite indom.
-Qed.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.llistR.html b/docs/LemmaOverloading.llistR.html deleted file mode 100644 index 0295472..0000000 --- a/docs/LemmaOverloading.llistR.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.llistR

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool eqtype seq ssrfun.
-From LemmaOverloading
-Require Import heaps rels hprop stmod stsep stlogR.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(* linked lists, storing a value and next pointer in consecutive locations *)
- -
-Definition llist (T : Type) := ptr.
- -
-Section LList.
-Variable T : Type.
-Notation llist := (llist T).
- -
-Fixpoint lseg (p q : ptr) (xs : seq T) {struct xs} :=
-  if xs is x::xt then
-    [Pred h | exists r, exists h',
-       h = p :-> x :+ (p .+ 1 :-> r :+ h') /\ h' \In lseg r q xt]
-  else [Pred h | p = q /\ h = empty].
- -
-Lemma lseg_add_last xs x p r h :
-        h \In lseg p r (rcons xs x) <->
-        exists q, exists h',
-          h = h' :+ (q :-> x :+ q .+ 1 :-> r) /\ h' \In lseg p q xs.
-Proof.
-move: xs x p r h.
-elim=>[|x xs IH] y p r h /=; first by split; case=>x [_][->][<-] ->; hhauto.
-split.
-- case=>z [h1][->]; case/IH=>w [h2][->] H1.
-  by exists w; exists (p :-> x :+ (p .+ 1 :-> z :+ h2)); hhauto.
-case=>q [h1][->][z][h2][->] H1.
-exists z; exists (h2 :+ q :-> y :+ q .+ 1 :-> r).
-by rewrite -!unA; split=>//; apply/IH; eauto.
-Qed.
- -
-Lemma lseg_null xs q h :
-         def h -> h \In lseg null q xs ->
-           [/\ q = null, xs = [::] & h = empty].
-Proof.
-case:xs=>[|x xs] D /= H; first by case: H=><- ->.
-by case: H D=>r [h'][->] _; rewrite defPtUn eq_refl.
-Qed.
- -
-Lemma lseg_neq xs p q h :
-        p != q -> h \In lseg p q xs ->
-        exists x, exists r, exists h',
-          [/\ xs = x :: behead xs,
-              p :-> x :+ (p .+ 1 :-> r :+ h') = h & h' \In lseg r q (behead xs)].
-Proof.
-case:xs=>[|x xs] /= H []; last by move=>y [h'][->] H1; hhauto.
-by move=>E; rewrite E eq_refl in H.
-Qed.
- -
-Lemma lseg_empty xs p q : empty \In lseg p q xs -> p = q /\ xs = [::].
-Proof.
-case:xs=>[|x xs] /=; [by case | case=>r [h][]].
-by move/esym; case/un0E; move/empbE; rewrite empPt.
-Qed.
- -
-Lemma lseg_case xs p q h :
-        h \In lseg p q xs ->
-        [/\ p = q, xs = [::] & h = empty] \/
-        exists x, exists r, exists h',
-        [/\ xs = x :: behead xs, h = p :-> x :+ (p .+ 1 :-> r :+ h') &
-            h' \In lseg r q (behead xs)].
-Proof.
-case:xs=>[|x xs] /=; first by case=>->->; left.
-by case=>r [h'][->] H; right; hhauto.
-Qed.
- -
-(* Special case when p = null *)
-Definition lseq p := lseg p null.
- -
-Lemma lseq_null xs h : def h -> h \In lseq null xs -> xs = [::] /\ h = empty.
-Proof. by move=>D; case/(lseg_null D)=>_ ->. Qed.
- -
-Lemma lseq_pos xs p h :
-        p != null -> h \In lseq p xs ->
-        exists x, exists r, exists h',
-          [/\ xs = x :: behead xs,
-              p :-> x :+ (p .+ 1 :-> r :+ h') = h & h' \In lseq r (behead xs)].
-Proof. by apply: lseg_neq. Qed.
- -
-Program
-Definition insert p x :
-  STsep (fun i => exists xs, i \In lseq p xs,
-         fun y i m => forall xs, i \In lseq p xs ->
-                        exists q, m \In lseq q (x::xs) /\ y = Val q) :=
-  Do (q <-- allocb p 2;
-      q ::= x;;
-      ret q).
-Next Obligation.
-apply: ghE=>// i xs H _ _.
-apply: hstep=>q /=; rewrite unh0 -unA.
-by do 2![apply: hstep]=>/=; vauto.
-Qed.
- -
-Program
-Definition remove p :
-  STsep (fun i => exists xs, i \In lseq p xs,
-         fun y i m => forall xs, i \In lseq p xs ->
-                        exists q, m \In lseq q (behead xs) /\ y = Val q) :=
-  Do (If p == null then ret p
-      else pnext <-- !(p .+ 1);
-           dealloc p;; dealloc p .+ 1;;
-           ret pnext).
-Next Obligation.
-apply: ghE=>// i xs H _ D; move: H.
-case: ifP=>H1.
-- by rewrite (eqP H1); case/(lseq_null D)=>-> ->; apply: hstep; vauto.
-case/(lseq_pos (negbT H1))=>x [q][h][->] <- /= H2.
-by do 4![apply: hstep]=>/=; vauto; rewrite 2!un0h.
-Qed.
- -
-Definition shape_rev p s := [Pred h | h \In lseq p.1 s.1 # lseq p.2 s.2].
- -
-Definition revT : Type :=
-  forall p, STsep (fun i => exists ps, i \In shape_rev p ps,
-                   fun y i m => forall ps, i \In shape_rev p ps ->
-                     exists r, m \In lseq r (rev ps.1 ++ ps.2) /\ y = Val r).
- -
-Program
-Definition reverse p :
-  STsep (fun i => exists xs, i \In lseq p xs,
-         fun y i m => forall xs, i \In lseq p xs ->
-                        exists q, m \In lseq q (rev xs) /\ y = Val q) :=
-  Do (Fix (fun (reverse : revT) p =>
-            (Do (If p.1 == null then ret p.2
-                 else xnext <-- !p.1 .+ 1;
-                      p.1 .+ 1 ::= p.2;;
-                      reverse (xnext, p.1)))) (p, null)).
-Next Obligation.
-apply: ghE=>// i [x1 x2][i1][i2][->] /= [H1 H2] _ D; case: eqP H1=>[->|E].
-- by case/(lseq_null (defUnl D))=>->->; rewrite un0h; apply: hstep; vauto.
-case/lseq_pos=>[|xd [xn][h'][->] <- /= H1]; first by case: eqP.
-do ![apply: hstep]=>//=; rewrite -(unC h') -(unCA h') -!unA.
-apply: (val_ghR (t:=(behead x1, xd::x2))); last by vauto.
-- by move=>x m [r][/=]; rewrite rev_cons cat_rcons=>H [->] _; vauto.
-by move=>e m [r][_].
-Qed.
-Next Obligation.
-apply: ghE=>// i xs H _ _.
-apply: (val_ghR (t:=(xs, Nil T))); last by exists i; hhauto.
-- by move=>x m [r][/= H1][->] _; rewrite cats0 in H1 *; vauto.
-by move=>e m [r][_].
-Qed.
- -
-End LList.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.noalias.html b/docs/LemmaOverloading.noalias.html deleted file mode 100644 index 4becc0d..0000000 --- a/docs/LemmaOverloading.noalias.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.noalias

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool seq eqtype.
-From LemmaOverloading
-Require Import heaps.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(******************************************************************************)
-(* noaliasR :                                                                 *)
-(*    lemma automated with Canonical Structures to prove/rewrite expressions  *)
-(*    with the form                                                           *)
-(*      x1 != x2                                                              *)
-(*    for x1, x2 : ptr. Usage:                                                *)
-(*      rewrite/apply: (noaliasR D)                                           *)
-(*    where D : def h, and exists expressions h1 h2 in h, where               *)
-(*    hi = xi :-> vi for i in 1,2 and some v1 v2                            *)
-(*                                                                            *)
-(* The lemma uses several structures. They are defined in different modules.  *)
-(* - The module Scan stores in a list all the pointers in h                   *)
-(* - The module Search finds a pointer in a list                              *)
-(* - The module Search2 finds for two distinct pointers in a list             *)
-(* - The module NoAlias combines the above to prove our goal                  *)
-(******************************************************************************)
- -
-(* Collect pointers in a heap *)
-Module Scan.
-Section ScanSection.
-(* The algorithm is defined as follows:
-   - if the heap is h1 :+ h2, then recurse over h1 and h2 and concatenate the
-     results.
-   - if the heap is x :-> v, then return x
-   - otherwise, return 
-*)

- -
-(* Structure to control the flow of the algorithm *)
-Structure tagged_heap := Tag {untag : heap}.
-Local Coercion untag : tagged_heap >-> heap.
- -
-Definition default_tag := Tag.
-Definition ptr_tag := default_tag.
-Canonical Structure union_tag h := ptr_tag h.
- -
-Definition axiom h s :=
-  def h -> uniq s /\ forall x, x \in s -> x \in dom h.
- -
-(* Main structure *)
-Structure form s := Form {heap_of : tagged_heap; _ : axiom heap_of s}.
-Local Coercion heap_of : form >-> tagged_heap.
- -
-Lemma union_pf s1 s2 (h1 : form s1) (h2 : form s2) :
-        axiom (union_tag (h1 :+ h2)) (s1 ++ s2).
-Proof.
-move:h1 h2=>[[i1]] H1 [[i2]] H2; rewrite /axiom /= in H1 H2 * => D.
-case/(_ (defUnl D)): H1=>U1 H1; case/(_ (defUnr D)): H2=>U2 H2.
-split=>[|x]; last first.
-- rewrite mem_cat; case/orP; [move/H1 | move/H2];
-  by rewrite domUn !inE /= D => -> //=; rewrite orbT.
-rewrite cat_uniq U1 U2 andbT -all_predC.
-apply/allP=>x; move/H2=>H3; apply: (introN idP); move/H1=>H4.
-by case: defUn D=>// _ _; move/(_ _ H4); rewrite H3.
-Qed.
- -
-Canonical Structure union_form s1 s2 h1 h2 :=
-  Form (@union_pf s1 s2 h1 h2).
- -
-Lemma ptr_pf A x (v : A) : axiom (ptr_tag (x :-> v)) [:: x].
-Proof.
-rewrite /axiom /= defPt => D; split=>//.
-by move=>y; rewrite inE; move/eqP=>->; rewrite domPt inE /= eq_refl D.
-Qed.
- -
-Canonical Structure ptr_form A x (v : A) :=
-  Form (@ptr_pf A x v).
- -
-Lemma default_pf h : axiom (default_tag h) [::].
-Proof. by move=>D; split. Qed.
- -
-Canonical Structure default_form h := Form (@default_pf h).
- -
-Lemma scanE s (h : form s) x : def h -> x \in s -> x \in dom h.
-Proof. by case: h=>hp /= A D H; exact: ((proj2 (A D)) _ H). Qed.
- -
-End ScanSection.
- -
-(* Pack the exports, as they are not automatically exported by Coq *)
-Module Exports.
-Canonical Structure union_tag.
-Canonical Structure union_form.
-Canonical Structure ptr_form.
-Canonical Structure default_form.
-Coercion untag : tagged_heap >-> heap.
-Coercion heap_of : form >-> tagged_heap.
-End Exports.
- -
-End Scan.
- -
-Export Scan.Exports.
- -
-Example ex_scan x y h :
-          let: hp := (y :-> 1 :+ h :+ x :-> 2) in def hp -> x \in dom hp.
-Proof.
-move=>D; apply: Scan.scanE=>//=.
-by rewrite ?in_cons ?eqxx ?orbT.
-Abort.
- -
-(* Search a pointer in a list. Could be generalize to any type *)
-Module Search.
-Section SearchSection.
-(* The algorithm is defined as follow:
-   - test if the list is (x :: s) for x being the element we are looking for
-   - if the list is (y :: s), then recurse using s
-*)

- -
-(* Stucture for controlling the flow of the algorithm *)
-Structure tagged_seq := Tag {untag : seq ptr}.
-Local Coercion untag : tagged_seq >-> seq.
- -
-Definition recurse_tag := Tag.
-Canonical Structure found_tag s := recurse_tag s.
- -
-Definition axiom x (s : tagged_seq) := x \in untag s.
- -
-(* Main structure *)
-Structure form x := Form {seq_of : tagged_seq; _ : axiom x seq_of}.
-Local Coercion seq_of : form >-> tagged_seq.
- -
-Lemma found_pf x s : axiom x (found_tag (x :: s)).
-Proof. by rewrite /axiom inE eq_refl. Qed.
- -
-Canonical Structure found_form x s :=
-  Form (found_pf x s).
- -
-Lemma recurse_pf x y (f : form x) : axiom x (recurse_tag (y :: f)).
-Proof. by move:f=>[[s]]; rewrite /axiom /= inE orbC => ->. Qed.
- -
-Canonical Structure recurse_form x y (f : form x) :=
-  Form (recurse_pf y f).
- -
-Lemma findE x (f : form x) : x \in untag f.
-Proof. by move:f=>[s]; apply. Qed.
- -
-End SearchSection.
- -
-Module Exports.
-Canonical Structure found_tag.
-Canonical Structure found_form.
-Canonical Structure recurse_form.
-Coercion untag : tagged_seq >-> seq.
-Coercion seq_of : form >-> tagged_seq.
-End Exports.
- -
-End Search.
- -
-Export Search.Exports.
- -
-Example ex_find (x y z : ptr) : x \in [:: z; x; y].
-by apply: Search.findE.
-Abort.
- -
-(* Search for two different pointers in a list *)
-Module Search2.
-Section Search2Section.
-(* The algorithm works as follow: Let x and y be the pointers we are looking for
-   - If we found x, then search for y using the previous module
-   - If we found y, then search for x using the previous module
-   - If, instead, we found some pointer z, then recurse
-*)

- -
-(* Stucture for controlling the flow of the algorithm *)
-Structure tagged_seq := Tag {untag : seq ptr}.
-Local Coercion untag : tagged_seq >-> seq.
- -
-Definition foundz_tag := Tag.
-Definition foundy_tag := foundz_tag.
-Canonical Structure foundx_tag s := foundy_tag s.
- -
-Definition axiom (x y : ptr) (s : tagged_seq) :=
-  [/\ x \in untag s, y \in untag s & uniq s -> x != y].
- -
-(* Main structure *)
-Structure form x y := Form {seq_of : tagged_seq; _ : axiom x y seq_of}.
-Local Coercion seq_of : form >-> tagged_seq.
- -
-Lemma foundx_pf x y (s : Search.form y) : axiom x y (foundx_tag (x :: s)).
-Proof.
-move: s=>[[s]]; rewrite /Search.axiom /= /axiom !inE eq_refl /= => H1.
-by rewrite H1 orbT; split=>//; case/andP=>H2 _; case: eqP H1 H2=>// -> ->.
-Qed.
- -
-Canonical Structure foundx_form x y (s : Search.form y) :=
-  Form (foundx_pf x s).
- -
-Lemma foundy_pf x y (s : Search.form x) : axiom x y (foundy_tag (y :: s)).
-Proof.
-move: s=>[[s]]; rewrite /Search.axiom /= /axiom !inE eq_refl /= => H1.
-by rewrite H1 orbT; split=>//; case/andP=>H2 _; case: eqP H1 H2=>// -> ->.
-Qed.
- -
-Canonical Structure foundy_form x y (s : Search.form x) :=
-  Form (foundy_pf y s).
- -
-Lemma foundz_pf x y z (s : form x y) : axiom x y (foundz_tag (z :: s)).
-Proof.
-move: s=>[[s]]; case=>/= H1 H2 H3.
-rewrite /axiom /= !inE /= H1 H2 !orbT; split=>//.
-by case/andP=>_; apply: H3.
-Qed.
- -
-Canonical Structure foundz_form x y z (s : form x y) :=
-  Form (foundz_pf z s).
- -
-Lemma find2E x y (s : form x y) : uniq s -> x != y.
-Proof. by move: s=>[s /= [_ _]]; apply. Qed.
- -
-End Search2Section.
- -
-Module Exports.
-Canonical Structure foundx_tag.
-Canonical Structure foundx_form.
-Canonical Structure foundy_form.
-Canonical Structure foundz_form.
-Coercion untag : tagged_seq >-> seq.
-Coercion seq_of : form >-> tagged_seq.
-End Exports.
- -
-End Search2.
- -
-Export Search2.Exports.
- -
-Example ex_find2 (x y z : ptr) : uniq [:: z; x; y] -> x != y.
-move=>H.
-move: (Search2.find2E H).
-Abort.
- -
-(* Now package everything together *)
-Module NoAlias.
-Section NoAliasSection.
-(* The paper describes the reason for this module *)
- -
-Structure tagged_ptr (y : ptr) := Tag {untag : ptr}.
-Local Coercion untag : tagged_ptr >-> ptr.
- -
-(* Force the unification of y with what appears in the goal *)
-Definition singleton y := @Tag y y.
- -
-(* Main structure *)
-Structure form x y (s : seq ptr) :=
-  Form {y_of : tagged_ptr y;
-        _ : uniq s -> x != untag y_of}.
-Local Coercion y_of : form >-> tagged_ptr.
- -
-Arguments Form : clear implicits.
- -
-Lemma noalias_pf (x y : ptr) (f : Search2.form x y) :
-        uniq f -> x != singleton y.
-Proof. by move: f=>[[s]][]. Qed.
- -
-Canonical Structure start x y (f : Search2.form x y) :=
-  Form x y f (singleton y) (@noalias_pf x y f).
- -
-End NoAliasSection.
- -
-Module Exports.
-Canonical Structure singleton.
-Canonical Structure start.
-Coercion untag : tagged_ptr >-> ptr.
-Coercion y_of : form >-> tagged_ptr.
-End Exports.
- -
-End NoAlias.
- -
-Export NoAlias.Exports.
- -
-Lemma noaliasR s x y (f : Scan.form s) (g : NoAlias.form x y s) :
-               def f -> x != NoAlias.y_of g.
-Proof. by move: f g=>[[h]] H1 [[y']] /= H2; case/H1=>U _; apply: H2. Qed.
- -
-Arguments noaliasR {s x y f g}.
- -
-Example exnc A (x1 x2 x3 x4 : ptr) (v1 v2 : A) (h1 h2 : heap) :
-  def (h1 :+ x2 :-> 1 :+ h2 :+ x1 :-> v2 :+ (x3 :-> v1 :+ empty)) ->
-     (x1 != x2) /\
-     (x1 != x2) && (x2 != x3) && (x3 != x1) /\
-     (x2 == x3) = false /\ (x1 == x2) = false /\
-     ((x1 != x2) && (x2 != x3)) = (x1 != x2) /\
-     ((x1 != x2) && (x2 != x3)) = (x1 != x2) /\
-     ((x1 != x2) && (x2 != x3)) = (x1 != x2) /\
-     ((x1 != x2) && (x2 != x3)) = (x1 != x2) /\
-     (x1 != x2) && (x2 != x3) && (x1 != x4) && (x3 != x1).
- -
-Proof.
-move=>D.
-split.
-- by apply: (noaliasR D).
-split.
-  (* backwards reasoning works *)
-- by rewrite !(noaliasR D).
-split.
-  (* subterm selection works *)
-- by rewrite [x2 == x3](negbTE (noaliasR D)).
-split.
-- (* composition works *)
-  by rewrite (negbTE (noaliasR D)).
-split.
-- by rewrite [x2 != x3](noaliasR D) andbT.
-split.
-- by rewrite (noaliasR (x := x2) D) andbT.
-split.
-- by rewrite (noaliasR (y := x3) D) andbT.
-split.
-- by rewrite (noaliasR (x := x2) (y := x3) D) andbT.
-(* rewriting skips the subgoals that don't apply *)
-(* just as it should *)
-rewrite !(negbTE (noaliasR D)).
-admit.
-Abort.
- -
-Lemma noaliasR_fwd1 s (f : Scan.form s) (D : def f) x y (g : Search2.form x y) :
-  s = g ->
-  x != y.
-Proof.
-case: g=>[l/=[_ _]] H U.
-apply: H.
-move: U=><-.
-case: f D=>[h/=].
-move=>H D; by case: H.
-Qed.
- -
-Arguments noaliasR_fwd1 [s f] D x y [g].
- -
-Notation noaliasR_fwd D x y := (noaliasR_fwd1 D x y (Logic.eq_refl _)).
-Notation "()" := (Logic.eq_refl _).
- -
-Example exnc A (x1 x2 x3 x4 : ptr) (v1 v2 : A) (h1 h2 : heap) :
-  def (h1 :+ x2 :-> 1 :+ h2 :+ x1 :-> v2 :+ (x3 :-> v1 :+ empty)) ->
-     (x1 != x2) /\
-     (x1 != x2) && (x2 != x3) && (x3 != x1) /\
-     (x2 == x3) = false /\ (x1 == x2) = false.
-Proof.
-move=>D.
-split.
-- apply: (noaliasR_fwd1 D x1 x2 ()).
-split.
-  set H := noaliasR_fwd1 D.
-  by rewrite (H x1 x2 _ ()) (H x2 x3 _ ()) (H x3 x1 _ ()).
-split.
-  (* subterm selection works *)
-- by rewrite [x2 == x3](negbTE (noaliasR_fwd D x2 x3)).
-- (* composition works *)
-  by rewrite (negbTE (noaliasR_fwd D x1 x2)).
-Abort.
- -
-Lemma scan_it s (f : Scan.form s) : def f -> uniq s.
-case: f=>/= h A D.
-by case: A.
-Qed.
-Arguments scan_it [s f].
- -
-Definition search_them x y g := @Search2.find2E x y g.
-Arguments search_them x y [g].
- -
-Example without_notation
A (x1 x2 x3 : ptr) (v1 v2 v3 : A) (h1 h2 : heap) :
def (h1 :+ (x1 :-> v1 :+ x2 :-> v2) :+ (h2 :+ x3 :-> v3))
-> (x1 != x3).
-Proof.
-move=>D.
-by apply: (search_them x1 x3 (scan_it D)).
-Abort.
- -
-Lemma noaliasR_fwd_wrong1 x y (g : Search2.form x y) (f : Scan.form g) : def f -> x != y.
-case: f=>h /= A D.
-move: (A D)=>{A D} [U _].
-case: g U=>s /= [_ _].
-by apply.
-Qed.
- -
-(*
-Lemma noaliasR_fwd_wrong2 s (f : Scan.form s) (d : def f) x y (g : Search2.form x y)
-  : (@search_them x y g (@scan_it s f d)).
-*)

-Notation noaliasR_fwd' x y D := (search_them x y (scan_it D)).
- -
-Example exnc A (x1 x2 x3 x4 : ptr) (v1 v2 : A) (h1 h2 : heap) :
-  def (h1 :+ x2 :-> 1 :+ h2 :+ x1 :-> v2 :+ (x3 :-> v1 :+ empty)) ->
-     (x1 != x2) /\
-     (x1 != x2) && (x2 != x3) && (x3 != x1) /\
-     (x2 == x3) = false /\ (x1 == x2) = false.
-Proof.
-move=>D.
-split.
-  apply: (noaliasR_fwd' x1 x2 D).
-split.
-- by rewrite (noaliasR_fwd' x1 x2 D) (noaliasR_fwd' x2 x3 D) (noaliasR_fwd' x3 x1 D).
-split.
-  (* subterm selection works *)
-- by rewrite [x2 == x3](negbTE (noaliasR_fwd' x2 x3 D)).
-- (* composition works *)
-  by rewrite (negbTE (noaliasR_fwd' x1 x2 D)).
-Abort.
- -
-(* Main structure *)
-Structure check (x y : ptr) (s : seq ptr) :=
-  Check {y_of :> ptr;
-         _ : y_of = y;
-         _ : uniq s -> x != y_of}.
- -
-Program
-Canonical Structure start x y (f : Search2.form x y) :=
-  @Check x y f y (Logic.eq_refl _) _.
-Next Obligation.
-case: f H=>[s H /= U].
-by case: H=>_ _; apply.
-Qed.
- -
-Lemma noaliasR_fwd3 s (f : Scan.form s) (D : def f) x y
-  (g : check x y s) : x != y_of g.
-Proof.
-case: f D=>h A /= D.
-case: A g=>// U _ [y' /= ->].
-by apply.
-Qed.
- -
-Arguments noaliasR_fwd3 [s f] D x y {g}.
- -
-Example triggered
A (x1 x2 x3 : ptr) (v1 v2 v3 : A) (h1 h2 : heap) :
def (h1 :+ (x1 :-> v1 :+ x2 :-> v2) :+ (h2 :+ x3 :-> v3))
-> (x1 != x3) && (x2 != x3) && (x1 != x2).
-Proof.
-move=>D.
-have F := noaliasR_fwd3 D.
-by rewrite !(F _ x3) (F _ x2).
-Abort.
- -
-(* Main structure *)
-Structure check' (x : ptr) (s : seq ptr) :=
-  Check' {y_of' :> ptr;
-         _ : uniq s -> x != y_of'}.
- -
-Program
-Canonical Structure start' x y (f : Search2.form x y) :=
-  @Check' x f y _.
-Next Obligation.
-case: f H=>[s H /= U].
-by case: H=>_ _; apply.
-Qed.
- -
-Lemma noaliasR_fwd3' s (f : Scan.form s) (D : def f) x
-  (g : check' x s) : x != y_of' g.
-Proof.
-case: f D=>h A /= D.
-case: A g=>// U _[y' /= ->] //.
-Qed.
- -
-
-
- -
- - - diff --git a/docs/LemmaOverloading.noaliasBT.html b/docs/LemmaOverloading.noaliasBT.html deleted file mode 100644 index ccf3d47..0000000 --- a/docs/LemmaOverloading.noaliasBT.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.noaliasBT

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool seq eqtype.
-From LemmaOverloading
-Require Import heaps noalias.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(* A more symmetric implementation, which triggers on inequality, not on  *)
-(* x or y.  It works by firing on any boolean, and then rejecting those   *)
-(* that are not of the form x != y.  Thus, it can be composed with lemmas *)
-(* that expect a boolean, but not with lemmas that that are more specific *)
-(* and demand that the booleam is an inequality.                          *)
- -
-Module NoAlias2.
-Section NoAlias2Section.
- -
-Structure tagged_bool (x y : ptr) := Tag {untag : bool}.
-Local Coercion untag : tagged_bool >-> bool.
- -
-Canonical Structure ineq x y := @Tag x y (x != y).
- -
-Structure form x y (s : seq ptr) :=
-  Form {eq_of : tagged_bool x y;
-        _ : uniq s -> untag eq_of}.
- -
-Lemma start_pf (x y : ptr) (f : Search2.form x y) : uniq f -> ineq x y.
-Proof. by case: f=>s []. Qed.
- -
-Canonical Structure start x y (f : Search2.form x y) :=
-  @Form x y f (ineq x y) (@start_pf x y f).
- -
-End NoAlias2Section.
- -
-Module Exports.
-Canonical Structure ineq.
-Canonical Structure start.
-Coercion untag : tagged_bool >-> bool.
-End Exports.
- -
-End NoAlias2.
- -
-Export NoAlias2.Exports.
- -
-Lemma noaliasR2 s x y (f : Scan.form s) (g : NoAlias2.form x y s) :
-               def f -> NoAlias2.eq_of g.
-Proof. by case: f=> [h] H /H [U _]; case: g=> [] /= ? /(_ U). Qed.
- -
-Arguments noaliasR2 [s x y f g].
- -
-Example exnc A (x1 x2 x3 x4 : ptr) (v1 v2 : A) (h1 h2 : heap) :
-  def (h1 :+ x2 :-> 1 :+ h2 :+ x1 :-> v2 :+ (x3 :-> v1 :+ empty)) ->
-     (x1 != x2) /\
-     (x1 != x2) && (x2 != x3) && (x3 != x1) /\
-     (x2 == x3) = false /\ (x1 == x2) = false /\
-     (x1 != x2) && (x2 != x3) && (x1 != x4) && (x3 != x1).
-Proof.
-move=>D.
-split.
-- by apply: (noaliasR2 D).
-split.
-  (* backwards reasoning works *)
-- by rewrite !(noaliasR2 D).
-split.
-  (* subterm selection works *)
-- try by rewrite [x2 == x3](negbTE (noaliasR2 D)).
-  admit.
-split.
-- (* composition doesn't works, as expected *)
-  try by rewrite (negbTE (noaliasR2 D)).
-  admit.
-try rewrite !(negbTE (noaliasR2 D)).
-admit.
-Abort.
- -
-(* A faulty version that evidences a bug in the CS inference algorithm *)
-(* In this example we do not use the extra parametrized tagging, as in *)
-(* the paper.                                                          *)
-(* According to the general unification case, the value in a field of  *)
-(* a structure is unified *after* the parameters of the structure. In  *)
-(* the default instance (one whose value is a variable), it does the   *)
-(* opposite. In short: this example works by mistake. It is expectable *)
-(* that this will be fixed in some future release.                     *)
-Module NoAlias3.
-Section NoAlias3Section.
- -
-(* Main structure *)
-Structure form x (s : seq ptr) :=
-  Form {y_of : ptr;
-        _ : uniq s -> x != y_of}.
-Local Coercion y_of : form >-> ptr.
- -
-Arguments Form : clear implicits.
- -
-Lemma noalias_pf (x y : ptr) (f : Search2.form x y) :
-        uniq f -> x != y.
-Proof. by move: f=>[[s]][]. Qed.
- -
-Canonical Structure start x y (f : Search2.form x y) :=
-  @Form x f y (@noalias_pf x y f).
- -
-End NoAlias3Section.
- -
-Module Exports.
-Canonical Structure start.
-Coercion y_of : form >-> ptr.
-End Exports.
- -
-End NoAlias3.
- -
-Export NoAlias3.Exports.
- -
-Lemma noaliasR s x (f : Scan.form s) (g : NoAlias3.form x s) :
-               def f -> x != NoAlias3.y_of g.
-Proof. by move: f g=>[[h]] H1 [[y']] /= H2; case/H1=>U _; apply: H2. Qed.
- -
-Arguments noaliasR {s x f g}.
- -
-Example exnc A (x1 x2 x3 x4 : ptr) (v1 v2 : A) (h1 h2 : heap) :
-  def (h1 :+ x2 :-> 1 :+ h2 :+ x1 :-> v2 :+ (x3 :-> v1 :+ empty)) ->
-     (x1 != x2) /\
-     (x1 != x2) && (x2 != x3) && (x3 != x1) /\
-     (x2 == x3) = false /\ (x1 == x2) = false /\
-     (x1 != x2) && (x2 != x3) && (x1 != x4) && (x3 != x1).
-Proof.
-move=>D.
-split.
-- by apply: (noaliasR D).
-split.
-  (* backwards reasoning works *)
-- by rewrite !(noaliasR D).
-split.
-  (* subterm selection works *)
-- by rewrite [x2 == x3](negbTE (noaliasR D)).
-split.
-- (* composition works *)
-  by rewrite (negbTE (noaliasR D)).
-(* rewriting skips the subgoals that don't apply *)
-(* just as it should *)
-rewrite !(negbTE (noaliasR D)).
-admit.
-Abort.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.noaliasCTC.html b/docs/LemmaOverloading.noaliasCTC.html deleted file mode 100644 index a160727..0000000 --- a/docs/LemmaOverloading.noaliasCTC.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.noaliasCTC

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool seq eqtype.
-From LemmaOverloading
-Require Import heaps.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(* Same as noalias but with Coq Type Classes. *)
- -
-(* Scan *)
-Definition scan_axiom h s :=
-  def h -> uniq s /\ forall x, x \in s -> x \in dom h.
- -
-Class Scan (h : heap) :=
-        { seq_of : seq ptr ;
-          scan : scan_axiom h seq_of }.
- -
-Program Instance scan_union h1 h2 (f1 : Scan h1) (f2 : Scan h2) :
-                   Scan (h1:+h2) | 2 := {| seq_of := @seq_of _ f1 ++ @seq_of _ f2 |}.
-Next Obligation.
-case: f1 f2=>s1 /= sc1 [s2 /= sc2] D.
-case/(_ (defUnl D)): sc1=>U1 H1; case/(_ (defUnr D)): sc2=>U2 H2.
-split=>[|x]; last first.
-- rewrite mem_cat; case/orP; [move/H1 | move/H2];
-  by rewrite domUn !inE /= D => -> //=; rewrite orbT.
-rewrite cat_uniq U1 U2 andbT -all_predC.
-apply/allP=>x; move/H2=>H3; apply: (introN idP); move/H1=>H4.
-by case: defUn D=>// _ _; move/(_ _ H4); rewrite H3.
-Qed.
- -
-Program Instance scan_ptr A x (v : A) : Scan (x:->v) | 1 := {| seq_of := [:: x] |}.
-Next Obligation.
-rewrite /scan_axiom /= defPt => D; split=>//.
-by move=>y; rewrite inE; move/eqP=>->; rewrite domPt inE /= eq_refl D.
-Qed.
- -
-Program Instance scan_default h : Scan h | 10 := {| seq_of := [::] |}.
-Next Obligation.
-by move=>_; split.
-Qed.
- -
-Lemma scanE x h (f : Scan h): def h -> x \in seq_of -> x \in dom h.
-Proof. move=>D; case:f=>s /= [//|_]; apply. Qed.
- -
-Example ex_scan x y h :
-          let: hp := (y :-> 1 :+ h :+ x :-> 2) in def hp -> x \in dom hp.
-Proof.
-move=>D.
-apply: scanE=>//=.
-by rewrite ?in_cons ?eqxx ?orbT.
-Abort.
- -
-(* Search *)
-Class Search (x : ptr) (s : seq ptr) :=
-        { search : x \in s }.
- -
-Program Instance search_found x s : Search x (x :: s).
-Next Obligation.
-by rewrite inE eq_refl.
-Qed.
- -
-Program Instance search_recurse x y s (f : Search x s) : Search x (y :: s) | 5.
-Next Obligation.
-by case: f; rewrite inE=>->; rewrite orbT.
-Qed.
- -
-Example ex_find (x y z : ptr) : x \in [:: z; x; y].
-Proof.
-rewrite search.
-Abort.
- -
-(* Search2 *)
-Definition search2_axiom (x y : ptr) (s : seq ptr) :=
-  [/\ x \in s, y \in s & uniq s -> x != y].
- -
-Class Search2 x y s := { search2 : search2_axiom x y s}.
- -
-Program Instance search2_foundx x y s (s1 : Search y s) : Search2 x y (x :: s).
-Next Obligation.
-case: s1=>s2; rewrite /search2_axiom !inE eq_refl.
-by rewrite s2 orbT; split=>//; case/andP=>H2 _; case: eqP s2 H2=>// -> ->.
-Qed.
- -
-Program Instance search2_foundy x y s (f : Search x s) : Search2 x y (y :: s).
-Next Obligation.
-case: f=>H1; rewrite /search2_axiom !inE eq_refl.
-by rewrite H1 orbT; split=>//; case/andP=>H2 _; case: eqP H1 H2=>// -> ->.
-Qed.
- -
-Program Instance search2_foundz x y z s (f : Search2 x y s) : Search2 x y (z :: s) | 1.
-Next Obligation.
-case: f=>[[H1 H2 H3]].
-rewrite /search2_axiom /= !inE /= H1 H2 !orbT; split=>//.
-by case/andP=>_; apply: H3.
-Qed.
- -
-Lemma find2E x y s (f : Search2 x y s) : uniq s -> x != y.
-Proof. by move: f=>[[_ _]]; apply. Qed.
- -
-Arguments find2E [x y s f].
- -
-Example ex_find2 (w x y z : ptr) : uniq [:: z; y; w; x] -> x != y.
-move=>H.
-rewrite (find2E H).
-Abort.
- -
-(* Now, the main lemma *)
-Lemma noaliasR h x y (sc : Scan h) (s2 : Search2 x y seq_of):
-               def h -> x != y.
-Proof.
-move=>D.
-by case: sc s2=>s /= [//|] U _ [/= [_ _ H3]]; apply: H3.
-Qed.
- -
-Arguments noaliasR [h x y sc s2].
- -
-Hint Extern 20 (Search2 _ _ _) => progress simpl : typeclass_instances.
- -
-Example ex_noalias x1 x2 : def (x2 :-> 1 :+ x1 :-> 2) -> x1 != x2.
-Proof.
-move=>D.
-by eapply (noaliasR D).
-Abort.
- -
-Example ex_noalias2 x1 x2 h : def (x2 :-> 1 :+ h :+ x1 :-> 2) -> x1 != x2.
-Proof.
-move=>D.
-by eapply (noaliasR D).
-Abort.
- -
-Example exnc A (x1 x2 x3 x4 : ptr) (v1 v2 : A) (h1 h2 : heap) :
-  def (h1 :+ x2 :-> 1 :+ h2 :+ x1 :-> v2 :+ (x3 :-> v1 :+ empty)) ->
-     (x1 != x2) /\
-     (x1 != x2) && (x2 != x3) && (x3 != x1) /\
-     (x2 == x3) = false /\ (x1 == x2) = false /\
-     ((x1 != x2) && (x2 != x3)) = (x1 != x2) /\
-     ((x1 != x2) && (x2 != x3)) = (x1 != x2) /\
-     ((x1 != x2) && (x2 != x3)) = (x1 != x2) /\
-     ((x1 != x2) && (x2 != x3)) = (x1 != x2) /\
-     (x1 != x2) && (x2 != x3) && (x1 != x4) && (x3 != x1).
- -
-Proof.
-move=>D.
-split.
-- by apply: (noaliasR D).
-split.
-  (* backwards reasoning works *)
-- by rewrite !(noaliasR D).
-split.
-  (* subterm selection works *)
-- by rewrite [x2 == x3](negbTE (noaliasR D)).
-split.
-- (* composition works *)
-  by rewrite (negbTE (noaliasR D)).
-split.
-- by rewrite [x2 != x3](noaliasR D) andbT.
-split.
-- by rewrite (noaliasR (x := x2) D) andbT.
-split.
-- by rewrite (noaliasR (y := x3) D) andbT.
-split.
-- by rewrite (noaliasR (x := x2) (y := x3) D) andbT.
-(* rewriting skips the subgoals that don't apply *)
-(* just as it should *)
-rewrite !(negbTE (noaliasR D)).
-admit.
-Abort.
- -
-
-
- -
- - - diff --git a/docs/LemmaOverloading.ordtype.html b/docs/LemmaOverloading.ordtype.html deleted file mode 100644 index d205ba9..0000000 --- a/docs/LemmaOverloading.ordtype.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.ordtype

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq fintype.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-Module Ordered.
- -
-Section RawMixin.
- -
-Structure mixin_of (T : eqType) :=
-  Mixin {ordering : rel T;
-         _ : irreflexive ordering;
-         _ : transitive ordering;
-         _ : forall x y, [|| ordering x y, x == y | ordering y x]}.
- -
-End RawMixin.
- -
-(* the class takes a naked type T and returns all the *)
-(* relatex mixins; the inherited ones and the added ones *)
-Section ClassDef.
- -
-Record class_of (T : Type) := Class {
-   base : Equality.class_of T;
-   mixin : mixin_of (EqType T base)}.
- -
-Local Coercion base : class_of >-> Equality.class_of.
- -
-Structure type : Type := Pack {sort : Type; _ : class_of sort; _ : Type}.
-Local Coercion sort : type >-> Sortclass.
- -
-Variables (T : Type) (cT : type).
-Definition class := let: Pack _ c _ as cT' := cT return class_of cT' in c.
-Definition clone c of phant_id class c := @Pack T c T.
- -
-(* produce an ordered type out of the inherited mixins *)
-(* equalize m0 and m by means of a phantom; will be exploited *)
-(* further down in the definition of OrdType *)
-Definition pack b (m0 : mixin_of (EqType T b)) :=
-  fun m & phant_id m0 m => Pack (@Class T b m) T.
- -
-Definition eqType := Eval hnf in EqType cT class.
- -
-End ClassDef.
- -
-Module Exports.
-Coercion sort : type >-> Sortclass.
-Coercion eqType : type >-> Equality.type.
-Canonical Structure eqType.
-Notation ordType := Ordered.type.
-Notation OrdMixin := Mixin.
-Notation OrdType T m := (@pack T _ m _ id).
-Definition ord T : rel (sort T) := (ordering (mixin (class T))).
-Notation "[ 'ordType' 'of' T 'for' cT ]" := (@clone T cT _ id)
-  (at level 0, format "[ 'ordType' 'of' T 'for' cT ]") : form_scope.
-Notation "[ 'ordType' 'of' T ]" := (@clone T _ _ id)
-  (at level 0, format "[ 'ordType' 'of' T ]") : form_scope.
-End Exports.
-End Ordered.
-Export Ordered.Exports.
- -
-Prenex Implicits ord.
- -
-Section Lemmas.
-Variable T : ordType.
- -
-Lemma irr : irreflexive (@ord T).
-Proof. by case: T=>s [b [m]]. Qed.
- -
-Lemma trans : transitive (@ord T).
-Proof. by case: T=>s [b [m]]. Qed.
- -
-Lemma total (x y : T) : [|| ord x y, x == y | ord y x].
-Proof. by case: T x y=>s [b [m]]. Qed.
- -
-Lemma nsym (x y : T) : ord x y -> ord y x -> False.
-Proof. by move=>E1 E2; move: (trans E1 E2); rewrite irr. Qed.
- -
-End Lemmas.
- -
-Section Totality.
-Variable K : ordType.
- -
-CoInductive total_spec (x y : K) : bool -> bool -> bool -> Type :=
-| total_spec_lt of ord x y : total_spec x y true false false
-| total_spec_eq of x == y : total_spec x y false true false
-| total_spec_gt of ord y x : total_spec x y false false true.
- -
-Lemma totalP x y : total_spec x y (ord x y) (x == y) (ord y x).
-Proof.
-case H1: (x == y).
-- by rewrite (eqP H1) irr; apply: total_spec_eq.
-case H2: (ord x y); case H3: (ord y x).
-- by case: (nsym H2 H3).
-- by apply: total_spec_lt H2.
-- by apply: total_spec_gt H3.
-by move: (total x y); rewrite H1 H2 H3.
-Qed.
-End Totality.
- -
-Section NatOrd.
-Lemma irr_ltn_nat : irreflexive ltn. Proof. by move=>x; rewrite /= ltnn. Qed.
-Lemma trans_ltn_nat : transitive ltn. Proof. by apply: ltn_trans. Qed.
-Lemma total_ltn_nat : forall x y, [|| x < y, x == y | y < x].
-Proof. by move=>*; case: ltngtP. Qed.
- -
-Definition nat_ordMixin := OrdMixin irr_ltn_nat trans_ltn_nat total_ltn_nat.
-Canonical Structure nat_ordType := OrdType nat nat_ordMixin.
-End NatOrd.
- -
-Section ProdOrd.
-Variables K T : ordType.
- -
-(* lexicographic ordering *)
-Definition lex : rel (K * T) :=
-  fun x y => if x.1 == y.1 then ord x.2 y.2 else ord x.1 y.1.
- -
-Lemma irr_lex : irreflexive lex.
-Proof. by move=>x; rewrite /lex eq_refl irr. Qed.
- -
-Lemma trans_lex : transitive lex.
-Proof.
-move=>[x1 x2][y1 y2][z1 z2]; rewrite /lex /=.
-case: ifP=>H1; first by rewrite (eqP H1); case: eqP=>// _; apply: trans.
-case: ifP=>H2; first by rewrite (eqP H2) in H1 *; rewrite H1.
-case: ifP=>H3; last by apply: trans.
-by rewrite (eqP H3)=>R1; move/(nsym R1).
-Qed.
- -
-Lemma total_lex : forall x y, [|| lex x y, x == y | lex y x].
-Proof.
-move=>[x1 x2][y1 y2]; rewrite /lex /=.
-case: ifP=>H1.
-- rewrite (eqP H1) eq_refl -pair_eqE /= eq_refl /=; exact: total.
-rewrite (eq_sym y1) -pair_eqE /= H1 /=.
-by move: (total x1 y1); rewrite H1.
-Qed.
- -
-Definition prod_ordMixin := OrdMixin irr_lex trans_lex total_lex.
-Canonical Structure prod_ordType := Eval hnf in OrdType (K * T) prod_ordMixin.
-End ProdOrd.
- -
-Section FinTypeOrd.
-Variable T : finType.
- -
-Definition ordf : rel T :=
-  fun x y => index x (enum T) < index y (enum T).
- -
-Lemma irr_ordf : irreflexive ordf.
-Proof. by move=>x; rewrite /ordf ltnn. Qed.
- -
-Lemma trans_ordf : transitive ordf.
-Proof. by move=>x y z; rewrite /ordf; apply: ltn_trans. Qed.
- -
-Lemma total_ordf : forall x y, [|| ordf x y, x == y | ordf y x].
-Proof.
-move=>x y; rewrite /ordf; case: ltngtP=>//= H; rewrite ?orbT ?orbF //.
-have [H1 H2]: x \in enum T /\ y \in enum T by rewrite !mem_enum.
-by rewrite -(nth_index x H1) -(nth_index x H2) H eq_refl.
-Qed.
- -
-Definition fin_ordMixin := OrdMixin irr_ordf trans_ordf total_ordf.
-End FinTypeOrd.
- -
-(* notation to let us write I_n instead of (ordinal_finType n) *)
-Notation "[ 'fin_ordMixin' 'of' T ]" :=
-  (fin_ordMixin _ : Ordered.mixin_of [eqType of T]) (at level 0).
- -
-Definition ordinal_ordMixin n := [fin_ordMixin of 'I_n].
-Canonical Structure ordinal_ordType n := OrdType 'I_n (ordinal_ordMixin n).
-
-
- -
- - - diff --git a/docs/LemmaOverloading.perms.html b/docs/LemmaOverloading.perms.html deleted file mode 100644 index fcb7598..0000000 --- a/docs/LemmaOverloading.perms.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.perms

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrfun seq.
-From LemmaOverloading
-Require Import rels.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(****************************************************)
-(* A theory of permutations over non-equality types *)
-(****************************************************)
- -
-Section Permutations.
-Variable A : Type.
- -
-Lemma in_split (x : A) (s : seq A) :
-        x \In s -> exists s1, exists s2, s = s1 ++ x :: s2.
-Proof.
-elim:s=>[|y s IH] //=; rewrite InE.
-case=>[<-|]; first by exists [::]; exists s.
-by case/IH=>s1 [s2] ->; exists (y :: s1); exists s2.
-Qed.
- -
-Inductive perm (s1 s2 : seq A) : Prop :=
-| permutation_nil of s1 = [::] & s2 = [::]
-| permutation_skip x t1 t2 of s1 = x :: t1 & s2 = x :: t2 & perm t1 t2
-| permutation_swap x y t of s1 = x :: y :: t & s2 = y :: x :: t
-| permutation_trans t of perm s1 t & perm t s2.
- -
-Lemma perm_nil (s : seq A) : perm [::] s <-> s = [::].
-Proof.
-split=>[H|]; last by move=>->; apply: permutation_nil.
-move: {1 2}[::] s H (erefl (Nil A)).
-apply: perm_ind=>[|s1 s2 x t1 t2 ->|s1 s2 x y t ->|s1 s2 t _ IH1 _ IH2] //.
-by move/IH1; move/IH2.
-Qed.
- -
-Lemma perm_refl (s : seq A) : perm s s.
-Proof.
-elim:s=>[|e s IH]; first by apply: permutation_nil.
-by apply: (permutation_skip (x:=e)) IH.
-Qed.
- -
-Hint Resolve perm_refl : core.
- -
-Lemma perm_sym s1 s2 : perm s1 s2 <-> perm s2 s1.
-Proof.
-suff L: forall s1 s2, perm s1 s2 -> perm s2 s1 by split; apply: L.
-apply: perm_ind=>s1' s2'.
-- by move=>->->; apply: permutation_nil.
-- by move=>x t1 t2 -> -> H1; apply: permutation_skip.
-- by move =>x y t -> ->; apply: permutation_swap eq_refl eq_refl.
-by move=>t _ H1 _ H2; apply: permutation_trans H2 H1.
-Qed.
- -
-Lemma perm_trans s2 s1 s3 : perm s1 s2 -> perm s2 s3 -> perm s1 s3.
-Proof. by apply: permutation_trans. Qed.
- -
-Lemma perm_in s1 s2 x : perm s1 s2 -> x \In s1 -> x \In s2.
-Proof.
-move: s1 s2; apply: perm_ind=>s1 s2.
-- by move=>->->.
-- move=>y t1 t2 -> -> H; rewrite !InE; tauto.
-- by move=>y z t -> ->; rewrite !InE; tauto.
-by move=>t _ IH1 _ IH2; move/IH1; move/IH2.
-Qed.
- -
-Lemma perm_cat2lL s s1 s2 : perm s1 s2 -> perm (s ++ s1) (s ++ s2).
-Proof. by elim:s=>[|e s IH] //=; move/IH; apply: permutation_skip. Qed.
- -
-Lemma perm_cat2rL s s1 s2 : perm s1 s2 -> perm (s1 ++ s) (s2 ++ s).
-Proof.
-move=>H; move: s1 s2 H s; apply: perm_ind=>s1 s2.
-- by move=>->->.
-- by move=>x t1 t2 -> -> H IH s /=; apply: permutation_skip (IH _).
-- by move=>x y t -> -> s /=; apply: permutation_swap eq_refl.
-by move=>t H1 IH1 H2 IH2 s; apply: permutation_trans (IH2 s).
-Qed.
- -
-Lemma perm_catL s1 t1 s2 t2 :
-        perm s1 s2 -> perm t1 t2 -> perm (s1 ++ t1) (s2 ++ t2).
-Proof.
-move=>H; move: s1 s2 H t1 t2; apply: perm_ind=>s1 s2.
-- by move=>->->.
-- move=>x t1 t2 -> -> H IH r1 r2.
-  by move/IH; apply: permutation_skip.
-- move=>x y t -> -> t1 t2 H.
-  by apply: (permutation_trans (t:=[:: x, y & t] ++ t2));
-     [apply: perm_cat2lL | simpl; apply: permutation_swap eq_refl].
-move=>t H1 IH1 H2 IH2 t1 t2 H.
-by apply: permutation_trans (IH2 _ _ H); apply: IH1.
-Qed.
- -
-Lemma perm_cat_consL s1 t1 s2 t2 x :
-        perm s1 s2 -> perm t1 t2 -> perm (s1 ++ x :: t1) (s2 ++ x :: t2).
-Proof.
-by move=>H1 H2; apply: perm_catL H1 _; apply: permutation_skip H2.
-Qed.
- -
-Lemma perm_catC s1 s2 : perm (s1 ++ s2) (s2 ++ s1).
-Proof.
-elim:s1 s2=>[|x s1 IH1] s2 /=; first by rewrite cats0.
-apply: (@perm_trans (x::s2++s1)); first by apply: permutation_skip (IH1 s2).
-elim: s2=>[|y s2 IH2] //=.
-apply: (@perm_trans (y::x::s2++s1)); first by apply: permutation_swap eq_refl.
-by apply: permutation_skip IH2.
-Qed.
- -
-Hint Resolve perm_catC : core.
- -
-Lemma perm_cons_catCA s1 s2 x : perm (x :: s1 ++ s2) (s1 ++ x :: s2).
-Proof.
-rewrite -cat_rcons -cats1 -cat_cons -cat1s.
-by apply: perm_cat2rL; apply: perm_catC.
-Qed.
- -
-Lemma perm_cons_catAC s1 s2 x : perm (s1 ++ x :: s2) (x :: s1 ++ s2).
-Proof. by apply/perm_sym; apply: perm_cons_catCA. Qed.
- -
-Hint Resolve perm_cons_catCA perm_cons_catAC : core.
- -
-Lemma perm_cons_cat_consL s1 s2 s x :
-        perm s (s1 ++ s2) -> perm (x :: s) (s1 ++ x :: s2).
-Proof.
-case: s1=>[|a s1] /= H; first by apply: permutation_skip H.
-apply: (@perm_trans (x::a::s1++s2)); first by apply: permutation_skip eq_refl H.
-apply: (@perm_trans (a::x::s1++s2)); first by apply: permutation_swap eq_refl.
-by apply: permutation_skip eq_refl eq_refl _=>//.
-Qed.
- -
-(* a somewhat generalized induction principle *)
-Lemma perm_ind2 (P : seq A -> seq A -> Prop) :
-        P [::] [::] ->
-        (forall x s1 s2, perm s1 s2 -> P s1 s2 ->
-           P (x :: s1) (x :: s2)) ->
-        (forall x y s1 s2, perm s1 s2 -> P s1 s2 ->
-           P (y :: x :: s1) (x :: y :: s2)) ->
-        (forall s2 s1 s3, perm s1 s2 -> P s1 s2 ->
-           perm s2 s3 -> P s2 s3 -> P s1 s3) ->
-        forall s1 s2, perm s1 s2 -> P s1 s2.
-Proof.
-move=>H1 H2 H3 H4; apply: perm_ind=>s1 s2; last 1 first.
-- by move=>t; apply: H4.
-- by move=>->->.
-- by move=>x t1 t2 -> ->; apply: H2.
-move=>x y t -> ->.
-have R : forall t, P t t by elim=>[|e t1 IH] //; apply: H2.
-apply: (H4 (y :: x :: t))=>//; last by apply: H3.
-by apply: permutation_swap eq_refl.
-Qed.
- -
-(* Now the hard part; the opposite implications *)
-Lemma perm_cat_consR s1 t1 s2 t2 x :
-        perm (s1 ++ x :: t1) (s2 ++ x :: t2) -> perm (s1 ++ t1) (s2 ++ t2).
-Proof.
-move: s1 t1 s2 t2 x.
-suff H:
-  forall r1 r2, perm r1 r2 -> forall x s1 t1 s2 t2,
-    r1 = s1 ++ x :: t1 -> r2 = s2 ++ x :: t2 -> perm (s1 ++ t1) (s2 ++ t2).
-- by move=>s1 t1 s2 t2 x; move/H; apply.
-apply: perm_ind2; last 1 first.
-- move=>s2 s1 s3 H1 IH1 H2 IH2 x r1 t1 r2 t2 E1 E2.
-  case: (@in_split x s2).
-  - apply: perm_in H1 _; rewrite E1; apply: (@perm_in (x::r1++t1))=>//.
-  by rewrite InE; left.
-  move=>s4 [s5] E; apply: (@perm_trans (s4++s5)); first by apply: IH1 E1 E.
-  by apply: IH2 E E2.
-- by move=>x [].
-- move=>x t1 t2 H IH y s1 s2 p1 p2 E1 E2.
-  case: s1 E1=>[|b s1] /=; case: p1 E2=>[|c p1] /= E1 E2.
-  - by case: E1 E2=><- <- [<-].
-  - apply: (@perm_trans (p1 ++ c :: p2))=>//.
-    by case: E1 H=><- ->; case: E2=><- ->.
-  - case: E1 E2 H=><- <- [<-] ->; apply: (@perm_trans (s1 ++ x:: s2)).
-    by apply: perm_cons_cat_consL.
-  case: E1 E2 H IH=><- -> [<-] -> H IH.
-  apply: permutation_skip eq_refl eq_refl _=>//; apply: IH eq_refl eq_refl.
-move=>x y p1 p2 H IH z s1 t1 s2 t2 E1 E2.
-case: s1 E1 H IH=>[|b s1]; case: s2 E2=>[|c s2]=>/=.
-- case=><- <- [<-] <- H IH; apply: permutation_skip eq_refl eq_refl H.
-- case=><-; case: s2=>[|b s2] /=.
-  - by case=><- <-; case=><- H IH; apply: permutation_skip eq_refl H.
-  case=><- -> [<-] <- H IH.
-  by apply: permutation_skip eq_refl eq_refl _=>//; apply: perm_trans H _.
-- case=><- <- [<-]; case: s1=>[|a s1] /=.
-  - by case=><- H IH; apply: permutation_skip eq_refl eq_refl _.
-  by case=><- -> H IH; apply: permutation_skip eq_refl eq_refl _=>//; apply: perm_trans H.
-case=><-; case: s2=>[|a s2] /=; case: s1=>[|d s1] /=.
-- by case=><- <- [<-] <- <- H IH; apply: permutation_skip eq_refl eq_refl _.
-- case=><- <- [<-] <- -> H IH.
-  apply: (@perm_trans (x::y::s1 ++ t1)); first by apply: permutation_swap eq_refl.
-  by apply: permutation_skip eq_refl eq_refl _=>//; apply: perm_trans H.
-- case=><- -> [<-] <- <- H IH.
-  apply: (@perm_trans (y::x::s2++t2)); last by apply: permutation_swap eq_refl.
-  by apply: permutation_skip eq_refl eq_refl _ =>//; apply: perm_trans H _.
-case=><- -> [<-] <- -> H IH.
-apply: (@perm_trans (x::y::s1++t1)); first by apply: permutation_swap eq_refl.
-by apply: permutation_skip eq_refl eq_refl _=>//; apply: permutation_skip eq_refl eq_refl _=>//; apply: IH eq_refl eq_refl.
-Qed.
- -
-Lemma perm_cons x s1 s2 : perm (x :: s1) (x :: s2) <-> perm s1 s2.
-Proof.
-split; last by apply: permutation_skip.
-by move/(@perm_cat_consR [::] s1 [::] s2 x).
-Qed.
- -
-Lemma perm_cons_cat_cons x s1 s2 s :
-        perm (x :: s) (s1 ++ x :: s2) <-> perm s (s1 ++ s2).
-Proof.
-split=>[|H]; first by by move/(@perm_cat_consR [::] s s1 s2 x).
-by apply: (@perm_trans (x :: s1++s2))=>//; apply: permutation_skip eq_refl _.
-Qed.
- -
-Lemma perm_cat_cons x s1 s2 t1 t2 :
-        perm (s1 ++ x :: t1) (s2 ++ x :: t2) <-> perm (s1 ++ t1) (s2 ++ t2).
-Proof.
-split=>[|H]; first by apply: perm_cat_consR.
-apply: (@perm_trans (x::s1++t1))=>//; apply: (@perm_trans (x::s2++t2))=>//.
-by apply/perm_cons.
-Qed.
- -
-Lemma perm_cat2l s1 s2 s3: perm (s1 ++ s2) (s1 ++ s3) <-> perm s2 s3.
-Proof.
-split; last by apply: perm_cat2lL.
-elim: s1 s2 s3=>[|x s1 IH] s2 s3 //= H.
-by apply: IH; move/perm_cons: H.
-Qed.
- -
-Lemma perm_cat2r s1 s2 s3 : perm (s2 ++ s1) (s3 ++ s1) <-> perm s2 s3.
-Proof.
-split; last by apply: perm_cat2rL.
-elim: s1 s2 s3=>[|x s1 IH] s2 s3 /=; first by rewrite !cats0.
-by move=>H; apply: IH; apply: perm_cat_consR H.
-Qed.
- -
-Lemma perm_catAC s1 s2 s3 : perm ((s1 ++ s2) ++ s3) ((s1 ++ s3) ++ s2).
-Proof. by move=>*; rewrite -!catA perm_cat2l. Qed.
- -
-Lemma perm_catCA s1 s2 s3 : perm (s1 ++ s2 ++ s3) (s2 ++ s1 ++ s3).
-Proof. by move=>*; rewrite !catA perm_cat2r. Qed.
- -
-End Permutations.
- -
-Hint Resolve perm_refl perm_catC perm_cons_catCA
-             perm_cons_catAC perm_catAC perm_catCA : core.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.prefix.html b/docs/LemmaOverloading.prefix.html deleted file mode 100644 index 75ed4e8..0000000 --- a/docs/LemmaOverloading.prefix.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.prefix

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrfun ssrbool ssrnat seq.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(***********************************)
-(* option lookup and list prefixes *)
-(***********************************)
- -
-Section Prefix.
-Variable A : Type.
- -
-Fixpoint onth (s : seq A) n : option A :=
-  if s is x :: s' then
-    if n is n'.+1 then onth s' n' else Some x
-  else None.
- -
-Definition prefix s1 s2 :=
-  forall n x, onth s1 n = some x -> onth s2 n = some x.
- -
-Lemma size_onth (s : seq A) n : n < size s -> exists x, onth s n = Some x.
-Proof.
-elim:s n=>[//|x' s' IH] [|n] /=.
-- by move=>_; exists x'.
-rewrite -(addn1 n) -(addn1 (size s')) ltn_add2r.
-by apply: IH.
-Qed.
- -
-Lemma onth_size (s : seq A) n x : onth s n = Some x -> n < size s.
-Proof. by elim:s n=>[//|x' s' IH] [//|n]; apply: IH. Qed.
- -
-Lemma prefix_refl s : prefix s s.
-Proof. by move=>n x <-. Qed.
- -
-Lemma prefix_trans (s2 s1 s3 : seq A) :
-        prefix s1 s2 -> prefix s2 s3 -> prefix s1 s3.
-Proof. by move=>H1 H2 n x E; apply: H2; apply: H1. Qed.
- -
-Lemma prefix_cons x s1 s2 : prefix (x :: s1) (x :: s2) <-> prefix s1 s2.
-Proof. by split=>E n; [apply: (E n.+1) | case: n]. Qed.
- -
-Lemma prefix_cons' x y s1 s2 : prefix (x :: s1) (y :: s2) -> x = y /\ prefix s1 s2.
-Proof.
-move=>H; move: (H 0 x (erefl _))=>[H'].
-by move: H; rewrite H' prefix_cons.
-Qed.
- -
-Lemma prefix_size (s t : seq A) : prefix s t -> size s <= size t.
-Proof.
-elim: s t=>[//|a s IH] [|b t] H; first by move: (H 0 a (erefl _)).
-by rewrite ltnS; apply: (IH _ (proj2 (prefix_cons' H))).
-Qed.
- -
-Lemma prefix_onth (s t : seq A) x : x < size s -> prefix s t -> onth s x = onth t x.
-Proof.
-elim:s t x =>[//|a s IH] [|b t] x H1 H2; first by move: (H2 0 a (erefl _)).
-apply prefix_cons' in H2.
-case: x H1=>[_|n H1]; first by rewrite (proj1 H2).
-by apply: IH=>//; exact (proj2 H2).
-Qed.
- -
-End Prefix.
- -
-Hint Resolve prefix_refl : core.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.prelude.html b/docs/LemmaOverloading.prelude.html deleted file mode 100644 index e082940..0000000 --- a/docs/LemmaOverloading.prelude.html +++ /dev/null @@ -1,482 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.prelude

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool eqtype ssrfun seq.
-Require Import Eqdep ClassicalFacts.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(*****************************)
-(* Axioms and extensionality *)
-(*****************************)
- -
-(* extensionality is needed for domains *)
-Axiom pext : forall p1 p2 : Prop, (p1 <-> p2) -> p1 = p2.
-Axiom fext : forall A (B : A -> Type) (f1 f2 : forall x, B x),
-               (forall x, f1 x = f2 x) -> f1 = f2.
- -
-Lemma proof_irrelevance (P : Prop) (p1 p2 : P) : p1 = p2.
-Proof. by apply: ext_prop_dep_proof_irrel_cic; apply: pext. Qed.
- -
-Lemma eta A (B : A -> Type) (f : forall x, B x) : f = [eta f].
-Proof. by apply: fext. Qed.
- -
-Lemma ext A (B : A -> Type) (f1 f2 : forall x, B x) :
-        f1 = f2 -> forall x, f1 x = f2 x.
-Proof. by move=>->. Qed.
- -
-(*******************)
-(* Setoid renaming *)
-(*******************)
- -
-(* Setoid library takes up some important arrow notations *)
-(* used by ssreflect and elsewhere; so we must rename *)
-Ltac add_morphism_tactic := SetoidTactics.add_morphism_tactic.
-Notation " R ===> R' " := (@Morphisms.respectful _ _ R R')
-  (right associativity, at level 55) : signature_scope.
- -
-(***********)
-(* Prelude *)
-(***********)
- -
-(* often used notation definitions and lemmas that are *)
-(* not included in the other libraries *)
- -
-Definition inj_pair2 := @inj_pair2.
-Arguments inj_pair2 {U P p x y}.
- -
-Lemma inj_sval A P : injective (@sval A P).
-Proof.
-move=>[x Hx][y Hy] /= H; move: Hx Hy; rewrite H=>*.
-congr exist; apply: proof_irrelevance.
-Qed.
- -
-Lemma svalE A (P : A -> Prop) x H : sval (exist P x H) = x.
-Proof. by []. Qed.
- -
-(* rewrite rule for propositional symmetry *)
-Lemma sym A (x y : A) : x = y <-> y = x.
-Proof. by []. Qed.
- -
-(* selecting a list element *)
-(* should really be in seq.v *)
- -
-Section HasSelect.
-Variables (A : eqType) (p : pred A).
- -
-CoInductive has_spec (s : seq A) : bool -> Type :=
-| has_true x of x \in s & p x : has_spec s true
-| has_false of (all (predC p) s) : has_spec s false.
- -
-Lemma hasPx : forall s, has_spec s (has p s).
-Proof.
-elim=>[|x s IH] /=; first by apply: has_false.
-rewrite orbC; case: IH=>/=.
-- by move=>k H1; apply: has_true; rewrite inE H1 orbT.
-case E: (p x)=>H; last by apply: has_false; rewrite /= E H.
-by apply: has_true E; rewrite inE eq_refl.
-Qed.
- -
-End HasSelect.
- -
-(****************)
-(* Type dynamic *)
-(****************)
- -
-(* putting it in a module, to get a path name for typ and val *)
-Module Dyn.
-Record dynamic : Type := dyn {typ : Type; val : typ}.
-End Dyn.
- -
-Notation dynamic := Dyn.dynamic.
-Notation dyn := Dyn.dyn.
- -
-Lemma dyn_inj A (x y : A) : dyn x = dyn y -> x = y.
-Proof. move=>[H]; apply: inj_pairT2 H. Qed.
- -
-Lemma dyn_eta d : d = dyn (Dyn.val d).
-Proof. by case:d. Qed.
- -
-Lemma dyn_injT A1 A2 (x1 : A1) (x2 : A2) : dyn x1 = dyn x2 -> A1 = A2.
-Proof. by case. Qed.
- -
-Prenex Implicits dyn_inj dyn_injT.
- -
-(* is dyneq really needed? *)
-(*
-Module DynEq.
-Record dynamic_eq : Type := dyneq {typ : eqType; val : typ}.
-End DynEq.
-
-Notation dynamic_eq := DynEq.dynamic_eq.
-Notation dyneq := DynEq.dyneq.
-
-Lemma dyneq_inj (A : eqType) (x y : A) : dyneq x = dyneq y -> x = y.
-Proof. case=>H; apply: inj_pairT2 H. Qed.
-
-Lemma dyneq_eta d : d = dyneq (DynEq.val d).
-Proof. by case:d. Qed.
-
-Lemma dyneq_injT (A1 A2 : eqType) (x1 : A1) (x2 : A2) : dyneq x1 = dyneq x2 -> A1 = A2.
-Proof. by case. Qed.
-*)

- -
-(***********************)
-(* John Major equality *)
-(***********************)
- -
-Section Coercions.
-Variable (T : Type -> Type).
- -
-Definition coerce A B (x : T A) : A = B -> T B := [eta eq_rect A [eta T] x B].
- -
-Lemma eqc A (x : T A) (pf : A = A) : coerce x pf = x.
-Proof. by move:pf; apply: Streicher_K. Qed.
- -
-Definition jmeq A B (x : T A) (y : T B) := forall pf, coerce x pf = y.
- -
-Lemma jmE A (x y : T A) : jmeq x y <-> x = y.
-Proof.
-by split=>[|-> ?]; [move/(_ (erefl _))=><-|]; rewrite eqc.
-Qed.
- -
-Lemma jmeq_refl A (x : T A) : jmeq x x.
-Proof. by move=>pf; rewrite eqc. Qed.
- -
-End Coercions.
- -
-Hint Resolve jmeq_refl : core.
-Arguments jmeq T [A B] x y.
-Notation "a =jm b" := (jmeq id a b) (at level 50).
- -
-(* some additional elimination principles *)
- -
-Lemma contV B (P : B -> B -> Prop) :
-        (forall x x', x =jm x' -> P x x') <-> forall x, P x x.
-Proof.
-split; first by move=>H x; exact: (H x x (jmeq_refl _)).
-by move=>H x x'; move/jmE=>->.
-Qed.
- -
-Lemma contVT B (P : B -> B -> Prop) :
-        (forall x x', B = B -> x =jm x' -> P x x') <-> forall x, P x x.
-Proof.
-split; first by move=>H x; exact: (H x x (erefl _) (jmeq_refl _)).
-by move=>H x x' _; move/jmE=>->.
-Qed.
- -
-(* john major on pairs *)
- -
-Section Coercions2.
-Variable (T : Type -> Type -> Type).
- -
-Program
-Definition coerce2 A1 A2 B1 B2 (x : T A1 A2) :
-             (A1, A2) = (B1, B2) -> T B1 B2.
-Proof. by move =>[<- <-]; exact: x. Defined.
- -
-Lemma eqc2 A1 A2 (x : T A1 A2) (pf : (A1, A2) = (A1, A2)) :
-        coerce2 x pf = x.
-Proof. by move:pf; apply: Streicher_K. Qed.
- -
-Definition jmeq2 A1 A2 B1 B2 (x : T A1 B1) (y : T A2 B2) :=
-             forall pf, coerce2 x pf = y.
- -
-Lemma jm2E A B (x y : T A B) : jmeq2 x y <-> x = y.
-Proof.
-by move=>*; split=>[|-> ?]; [move/(_ (erefl _))=><-|]; rewrite eqc2.
-Qed.
- -
-Lemma refl_jmeq2 A B (x : T A B) : jmeq2 x x.
-Proof. by move=>pf; rewrite eqc2. Qed.
- -
-End Coercions2.
- -
-Hint Resolve refl_jmeq2 : core.
-Arguments jmeq2 T [A1 A2 B1 B2] x y.
- -
-(***************************)
-(* operations on functions *)
-(***************************)
- -
-Lemma compA A B C D (h : A -> B) (g : B -> C) (f : C -> D) :
-        (f \o g) \o h = f \o (g \o h).
-Proof. by []. Qed.
- -
-Lemma compf1 A B (f : A -> B) : f = f \o id.
-Proof. by apply: fext. Qed.
- -
-Lemma comp1f A B (f : A -> B) : f = id \o f.
-Proof. by apply: fext. Qed.
- -
-Definition fprod A1 A2 B1 B2 (f1 : A1 -> B1) (f2 : A2 -> B2) :=
-  fun (x : A1 * A2) => (f1 x.1, f2 x.2).
- -
-Notation "f1 \* f2" := (fprod f1 f2) (at level 45).
- -
-(* reordering functions *)
-Section Reorder.
-Variables (A B C : Type).
- -
-Definition swap (x : A * B) :=
-  let: (x1, x2) := x in (x2, x1).
-Definition rCA (x : A * (B * C)) :=
-  let: (x1, (x2, x3)) := x in (x2, (x1, x3)).
-Definition rAC (x : (A * B) * C) :=
-  let: ((x1, x2), x3) := x in ((x1, x3), x2).
-Definition rA (x : A * (B * C)) :=
-  let: (x1, (x2, x3)) := x in ((x1, x2), x3).
-Definition iA (x : (A * B) * C) :=
-  let: ((x1, x2), x3) := x in (x1, (x2, x3)).
-Definition pL (x : A * B) :=
-  let: (x1, x2) := x in x1.
-Definition pR (x : A * B) :=
-  let: (x1, x2) := x in x2.
-End Reorder.
- -
-Prenex Implicits swap rCA rAC rA iA pL pR.
- -
-(* idempotency lemmas *)
-Lemma swapI A B : swap \o swap = @id (A * B).
-Proof. by apply: fext; case. Qed.
- -
-Lemma rCAI A B C : rCA \o (@rCA A B C) = id.
-Proof. by apply: fext; case=>a [b c]. Qed.
- -
-Lemma rACI A B C : rAC \o (@rAC A B C) = id.
-Proof. by apply: fext; case=>[[a]] b c. Qed.
- -
-Lemma riA A B C : rA \o (@iA A B C) = id.
-Proof. by apply: fext; case=>[[]]. Qed.
- -
-Lemma irA A B C : iA \o (@rA A B C) = id.
-Proof. by apply: fext; case=>a []. Qed.
- -
-Lemma swap_prod A1 B1 A2 B2 (f1 : A1 -> B1) (f2 : A2 -> B2) :
-        swap \o f1 \* f2 = f2 \* f1 \o swap.
-Proof. by apply: fext; case. Qed.
- -
-Lemma swap_rCA A B C : swap \o (@rCA A B C) = rAC \o rA.
-Proof. by apply: fext; case=>x []. Qed.
- -
-Lemma swap_rAC A B C : swap \o (@rAC A B C) = rCA \o iA.
-Proof. by apply: fext; case=>[[]]. Qed.
- -
-(*
-Lemma swapCAAC A B C : rCA \o swap \o (@rAC A B C) = (@iA A B C).
-*)

- -
-(* rewrite equality/john major equality, forward/backwards *)
-Ltac rfe1 x1 := let H := fresh "H" in move=>H; move:H x1=>-> x1.
-Ltac rfe2 x1 x2 := let H := fresh "H" in move=>H; move:H x1 x2=>-> x1 x2.
-Ltac rfjm := move/jmE=>->.
-Ltac rfejm1 x1 := rfe1 x1; rfjm.
-Ltac rfejm2 x1 x2 := rfe2 x1 x2; rfjm.
-Ltac rfp := move/inj_pair2=>->.
-Ltac rfep1 x1 := rfe1 x1; rfp.
-Ltac rfep2 x1 x2 := rfe1 x2; rfp.
- -
-Ltac rbe1 x1 := let H := fresh "H" in move=>H; move:H x1=><- x1.
-Ltac rbe2 x1 x2 := let H := fresh "H" in move=>H; move:H x1 x2=><- x1 x2.
-Ltac rbjm := move/jmE=><-.
-Ltac rbejm1 x1 := rbe1 x1; rbjm.
-Ltac rbejm2 x1 x2 := rbe2 x1 x2; rbjm.
-Ltac rbp := move/inj_pair2=><-.
-Ltac rbep1 x1 := rbe1 x1; rbp.
-Ltac rbep2 x1 x2 := rbe1 x2; rbp.
- -
-(************************)
-(* extension to ssrbool *)
-(************************)
- -
-Reserved Notation "[ /\ P1 , P2 , P3 , P4 , P5 & P6 ]" (at level 0, format
-  "'[hv' [ /\ '[' P1 , '/' P2 , '/' P3 , '/' P4 , '/' P5 ']' '/ ' & P6 ] ']'").
- -
-Reserved Notation "[ \/ P1 , P2 , P3 , P4 & P5 ]" (at level 0, format
-  "'[hv' [ \/ '[' P1 , '/' P2 , '/' P3 , '/' P4 ']' '/ ' & P5 ] ']'").
-Reserved Notation "[ \/ P1 , P2 , P3 , P4 , P5 & P6 ]" (at level 0, format
-  "'[hv' [ \/ '[' P1 , '/' P2 , '/' P3 , '/' P4 , '/' P5 ']' '/ ' & P6 ] ']'").
- -
-Inductive and6 (P1 P2 P3 P4 P5 P6 : Prop) : Prop :=
-  And6 of P1 & P2 & P3 & P4 & P5 & P6.
- -
-Inductive or5 (P1 P2 P3 P4 P5 : Prop) : Prop :=
-  Or51 of P1 | Or52 of P2 | Or53 of P3 | Or54 of P4 | Or55 of P5.
-Inductive or6 (P1 P2 P3 P4 P5 P6 : Prop) : Prop :=
-  Or61 of P1 | Or62 of P2 | Or63 of P3 | Or64 of P4 | Or65 of P5 | Or66 of P6.
- -
-Notation "[ /\ P1 , P2 , P3 , P4 , P5 & P6 ]" := (and6 P1 P2 P3 P4 P5 P6) : type_scope.
-Notation "[ \/ P1 , P2 , P3 , P4 | P5 ]" := (or5 P1 P2 P3 P4 P5) : type_scope.
-Notation "[ \/ P1 , P2 , P3 , P4 , P5 | P6 ]" := (or6 P1 P2 P3 P4 P5 P6) : type_scope.
- -
-Section ReflectConnectives.
- -
-Variable b1 b2 b3 b4 b5 b6 : bool.
-Lemma and6P : reflect [/\ b1, b2, b3, b4, b5 & b6] [&& b1, b2, b3, b4, b5 & b6].
-Proof.
-by case b1; case b2; case b3; case b4; case b5; case b6; constructor; try by case.
-Qed.
- -
-Lemma or5P : reflect [\/ b1, b2, b3, b4 | b5] [|| b1, b2, b3, b4 | b5].
-Proof.
-case b1; first by constructor; constructor 1.
-case b2; first by constructor; constructor 2.
-case b3; first by constructor; constructor 3.
-case b4; first by constructor; constructor 4.
-case b5; first by constructor; constructor 5.
-by constructor; case.
-Qed.
- -
-Lemma or6P : reflect [\/ b1, b2, b3, b4, b5 | b6] [|| b1, b2, b3, b4, b5 | b6].
-Proof.
-case b1; first by constructor; constructor 1.
-case b2; first by constructor; constructor 2.
-case b3; first by constructor; constructor 3.
-case b4; first by constructor; constructor 4.
-case b5; first by constructor; constructor 5.
-case b6; first by constructor; constructor 6.
-by constructor; case.
-Qed.
- -
-End ReflectConnectives.
- -
-Arguments and6P {b1 b2 b3 b4 b5 b6}.
-Arguments or5P {b1 b2 b3 b4 b5}.
-Arguments or6P {b1 b2 b3 b4 b5 b6}.
- -
-
-
- -
- - - diff --git a/docs/LemmaOverloading.rels.html b/docs/LemmaOverloading.rels.html deleted file mode 100644 index f87f51f..0000000 --- a/docs/LemmaOverloading.rels.html +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.rels

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrfun ssrbool seq.
-Require Import Setoid.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(* First some basic propositional equalities Basically, we need to repeat *)
-(* most of ssrbool.v here but we'll do it as we go. *)
- -
-Lemma andTp p : True /\ p <-> p. Proof. by intuition. Qed.
-Lemma andpT p : p /\ True <-> p. Proof. by intuition. Qed.
-Lemma andFp p : False /\ p <-> False. Proof. by intuition. Qed.
-Lemma andpF p : p /\ False <-> False. Proof. by intuition. Qed.
-Lemma orTp p : True \/ p <-> True. Proof. by intuition. Qed.
-Lemma orpT p : p \/ True <-> True. Proof. by intuition. Qed.
-Lemma orFp p : False \/ p <-> p. Proof. by intuition. Qed.
-Lemma orpF p : p \/ False <-> p. Proof. by intuition. Qed.
- -
-Delimit Scope rel_scope with rel.
-Open Scope rel_scope.
- -
-(**************************************************************************)
-(* We follow ssrbool, and provide four different types of predicates.     *)
-(*                                                                        *)
-(* (1) Pred is the type of propositional functions                        *)
-(* (2) Simpl_Pred is the type of predicates that automatically simplify   *)
-(*     when used in an applicative position.                              *)
-(* (3) Mem_Pred is for predicates that support infix notation x \In P     *)
-(* (4) PredType is the structure for interpreting various types, such as  *)
-(* lists, tuples, etc. as predicates.                                     *)
-(*                                                                        *)
-(* Important point is that custom lemmas over predicates can be stated in *)
-(* terms of Pred, while Simpl_Pred, Mem_Pred and PredType are for         *)
-(* technical developments used in this file only. More on this point      *)
-(* can be found in ssrbool.                                               *)
-(**************************************************************************)
- -
-Definition Pred T := T -> Prop.
-Identity Coercion fun_of_Pred : Pred >-> Funclass.
- -
-Notation xPred0 := (fun _ => False).
-Notation xPred1 := (fun x y => x = y).
-Notation xPredT := (fun _ => True).
-Notation xPredI := (fun (p1 p2 : Pred _) x => p1 x /\ p2 x).
-Notation xPredU := (fun (p1 p2 : Pred _) x => p1 x \/ p2 x).
-Notation xPredC := (fun (p : Pred _) x => ~ p x).
-Notation xPredD := (fun (p1 p2 : Pred _) x => ~ p2 x /\ p1 x).
-Notation xPreim := (fun f (p : Pred _) x => p (f x)).
- -
-Section Predicates.
-Variable T : Type.
- -
-(* simple predicates *)
- -
-Definition Simpl_Pred := simpl_fun T Prop.
-Definition SimplPred (p : Pred T) : Simpl_Pred := SimplFun p.
-Coercion Pred_of_Simpl (p : Simpl_Pred) : Pred T := p : T -> Prop.
- -
-(* it's useful to declare the operations as simple predicates, so that *)
-(* complex expressions automatically reduce when used in applicative   *)
-(* positions *)
- -
-Definition Pred0 := SimplPred xPred0.
-Definition Pred1 x := SimplPred (xPred1 x).
-Definition PredT := SimplPred xPredT.
-Definition PredI p1 p2 := SimplPred (xPredI p1 p2).
-Definition PredU p1 p2 := SimplPred (xPredU p1 p2).
-Definition PredC p := SimplPred (xPredC p).
-Definition PredD p1 p2 := SimplPred (xPredD p1 p2).
-Definition Preim rT f (d : Pred rT) := SimplPred (xPreim f d).
- -
-(* membership predicates *)
- -
-CoInductive Mem_Pred : Type := MemProp of Pred T.
-Definition isMem pT toPred mem := mem = (fun p : pT => MemProp [eta toPred p]).
- -
-(* the general structure for predicates *)
- -
-Structure PredType : Type := PropPredType {
-  Pred_Sort :> Type;
-  toPred : Pred_Sort -> Pred T;
-  _ : {mem | isMem toPred mem}}.
- -
-Definition mkPredType pT toP := PropPredType (exist (@isMem pT toP) _ (erefl _)).
- -
-(* Pred, SimplPred, Mem_Pred, pred and simpl_pred are PredType's *)
-Canonical Structure PredPredType := Eval hnf in @mkPredType (Pred T) id.
-Canonical Structure SimplPredPredType := Eval hnf in mkPredType Pred_of_Simpl.
-Coercion Pred_of_Mem mp : Pred_Sort PredPredType :=
-  let: MemProp p := mp in [eta p].
-Canonical Structure MemPredType := Eval hnf in mkPredType Pred_of_Mem.
-Canonical Structure predPredType := Eval hnf in @mkPredType (pred T) id.
-Canonical Structure simplpredPredType :=
-  Eval hnf in @mkPredType (simpl_pred T) (fun p x => p x).
- -
-End Predicates.
- -
-Arguments Pred0 {T}.
-Arguments PredT {T}.
-Prenex Implicits PredI PredU PredC PredD Preim.
- -
-Notation "r1 +p r2" := (PredU r1 r2)
-  (at level 55, right associativity) : rel_scope.
-Notation "r1 *p r2" := (PredI r1 r2)
-  (at level 45, right associativity) : rel_scope.
- -
-Notation "[ 'Pred' : T | E ]" := (SimplPred (fun _ : T => E))
-  (at level 0, format "[ 'Pred' : T | E ]") : fun_scope.
-Notation "[ 'Pred' x | E ]" := (SimplPred (fun x => E))
-  (at level 0, x ident, format "[ 'Pred' x | E ]") : fun_scope.
-Notation "[ 'Pred' x : T | E ]" := (SimplPred (fun x : T => E))
-  (at level 0, x ident, only parsing) : fun_scope.
-Notation "[ 'Pred' x y | E ]" := (SimplPred (fun t => let: (x, y) := t in E))
-  (at level 0, x ident, y ident, format "[ 'Pred' x y | E ]") : fun_scope.
-Notation "[ 'Pred' x y : T | E ]" :=
-  (SimplPred (fun t : (T*T) => let: (x, y) := t in E))
-  (at level 0, x ident, y ident, only parsing) : fun_scope.
- -
-Definition repack_Pred T pT :=
-  let: PropPredType _ a mP := pT return {type of @PropPredType T for pT} -> _ in
-   fun k => k a mP.
- -
-Notation "[ 'PredType' 'of' T ]" := (repack_Pred (fun a => @PropPredType _ T a))
-  (at level 0, format "[ 'PredType' 'of' T ]") : form_scope.
- -
-Notation Pred_Class := (Pred_Sort (PredPredType _)).
-Coercion Sort_of_Simpl_Pred T (p : Simpl_Pred T) : Pred_Class := p : Pred T.
- -
-Definition PredArgType := Type.
-Coercion Pred_of_argType (T : PredArgType) : Simpl_Pred T := PredT.
- -
-Notation "{ :: T }" := (T%type : PredArgType)
-  (at level 0, format "{ :: T }") : type_scope.
- -
-(* These must be defined outside a Section because "cooking" kills the *)
-(* nosimpl tag. *)
-Definition Mem T (pT : PredType T) : pT -> Mem_Pred T :=
-  nosimpl (let: PropPredType _ _ (exist mem _) := pT return pT -> _ in mem).
-Definition InMem T x mp := nosimpl Pred_of_Mem T mp x.
- -
-Prenex Implicits Mem.
- -
-(* Membership Predicates can be used as simple ones *)
-Coercion Pred_of_Mem_Pred T mp := [Pred x : T | InMem x mp].
- -
-(* equality and subset *)
- -
-Definition EqPredType T (pT : PredType T) (p1 p2 : pT) :=
-  forall x : T, toPred p1 x <-> toPred p2 x.
- -
-Definition SubPredType T (pT : PredType T) (p1 p2 : pT) :=
-  forall x : T, toPred p1 x -> toPred p2 x.
- -
-Definition EqPred T (p1 p2 : Pred T) := EqPredType p1 p2.
-Definition SubPred T (p1 p2 : Pred T) := SubPredType p1 p2.
-Definition EqSimplPred T (p1 p2 : Simpl_Pred T) := EqPredType p1 p2.
-Definition SubSimplPred T (p1 p2 : Simpl_Pred T) := SubPredType p1 p2.
-(*
-Definition EqMem T (p1 p2 : Mem_Pred T) := EqPredType p1 p2.
-Definition SubMem T (p1 p2 : Mem_Pred T) := SubPredType p1 p2.
-*)

- -
-Definition EqPredFun T1 T2 p1 p2 :=
-  forall x : T1, @EqPred T2 (p1 x) (p2 x).
-Definition SubPredFun T1 T2 p1 p2 :=
-  forall x : T1, @SubPred T2 (p1 x) (p2 x).
- -
-Definition EqMem T p1 p2 := forall x : T, InMem x p1 <-> InMem x p2.
-Definition SubMem T p1 p2 := forall x : T, InMem x p1 -> InMem x p2.
- -
-Notation "A <~> B" := (EqPred A B)
-  (at level 70, no associativity) : rel_scope.
-Notation "A ~> B" := (SubPred A B)
-  (at level 70, no associativity) : rel_scope.
-Notation "A <~1> B" := (EqPredFun A B)
-  (at level 70, no associativity) : rel_scope.
-Notation "A ~1> B" := (SubPredFun A B)
-  (at level 70, no associativity) : rel_scope.
- -
-Notation "x \In A" := (InMem x (Mem A))
-  (at level 70, no associativity) : rel_scope.
-Notation "x \Notin A" := (~ (x \In A))
-  (at level 70, no associativity) : rel_scope.
-Notation "A =p B" := (EqMem (Mem A) (Mem B))
-  (at level 70, no associativity) : type_scope.
-Notation "A <=p B" := (SubMem (Mem A) (Mem B))
-  (at level 70, no associativity) : type_scope.
- -
-(* Some notation for turning PredTypes into Pred or Simple Pred *)
-Notation "[ 'Mem' A ]" := (Pred_of_Simpl (Pred_of_Mem_Pred (Mem A)))
-  (at level 0, only parsing) : fun_scope.
-Notation "[ 'PredI' A & B ]" := (PredI [Mem A] [Mem B])
-  (at level 0, format "[ 'PredI' A & B ]") : fun_scope.
-Notation "[ 'PredU' A & B ]" := (PredU [Mem A] [Mem B])
-  (at level 0, format "[ 'PredU' A & B ]") : fun_scope.
-Notation "[ 'PredD' A & B ]" := (PredD [Mem A] [Mem B])
-  (at level 0, format "[ 'PredD' A & B ]") : fun_scope.
-Notation "[ 'PredC' A ]" := (PredC [Mem A])
-  (at level 0, format "[ 'PredC' A ]") : fun_scope.
-Notation "[ 'Preim' f 'of' A ]" := (Preim f [Mem A])
-  (at level 0, format "[ 'Preim' f 'of' A ]") : fun_scope.
- -
-Notation "[ 'Pred' x \In A ]" := [Pred x | x \In A]
-  (at level 0, x ident, format "[ 'Pred' x \In A ]") : fun_scope.
-Notation "[ 'Pred' x \In A | E ]" := [Pred x | (x \In A) /\ E]
-  (at level 0, x ident, format "[ 'Pred' x \In A | E ]") : fun_scope.
-Notation "[ 'Pred' x y \In A & B | E ]" :=
-  [Pred x y | (x \In A) /\ (y \In B) /\ E]
-  (at level 0, x ident, y ident,
-   format "[ 'Pred' x y \In A & B | E ]") : fun_scope.
-Notation "[ 'Pred' x y \In A & B ]" := [Pred x y | (x \In A) /\ (y \In B)]
-  (at level 0, x ident, y ident,
-   format "[ 'Pred' x y \In A & B ]") : fun_scope.
-Notation "[ 'Pred' x y \In A | E ]" := [Pred x y \In A & A | E]
-  (at level 0, x ident, y ident,
-   format "[ 'Pred' x y \In A | E ]") : fun_scope.
-Notation "[ 'Pred' x y \In A ]" := [Pred x y \In A & A]
-  (at level 0, x ident, y ident,
-   format "[ 'Pred' x y \In A ]") : fun_scope.
- -
-Section Simplifications.
-Variables (T : Type) (pT : PredType T).
- -
-Lemma Mem_toPred : forall (p : pT), Mem (toPred p) = Mem p.
-Proof. by rewrite /Mem; case: pT => T1 app1 [mem1 /= ->]. Qed.
- -
-Lemma toPredE : forall x (p : pT), toPred p x = (x \In p).
-Proof. by move=> *; rewrite -Mem_toPred. Qed.
- -
-Lemma In_Simpl : forall x (p : Simpl_Pred T), (x \In p) = p x.
-Proof. by []. Qed.
- -
-Lemma Simpl_PredE : forall (p : Pred T), [Pred x | p x] <~> p.
-Proof. by []. Qed.
- -
-(* Definition InE := (In_Simpl, Simpl_PredE). (* to be extended *) *)
- -
-Lemma Mem_Simpl : forall (p : Simpl_Pred T), Mem p = p :> Pred T.
-Proof. by []. Qed.
- -
-Definition MemE := Mem_Simpl. (* could be extended *)
- -
-Lemma Mem_Mem : forall p : pT, (Mem (Mem p) = Mem p) * (Mem [Mem p] = Mem p).
-Proof. by move=> p; rewrite -Mem_toPred. Qed.
- -
-End Simplifications.
- -
-(**************************************)
-(* Definitions and lemmas for setoids *)
-(**************************************)
- -
-Section RelProperties.
-Variables (T : Type) (pT : PredType T).
- -
-Lemma EqPredType_refl (r : pT) : EqPredType r r. Proof. by []. Qed.
-Lemma SubPredType_refl (r : pT) : SubPredType r r. Proof. by []. Qed.
- -
-Lemma EqPredType_sym (r1 r2 : pT) : EqPredType r1 r2 -> EqPredType r2 r1.
-Proof. by move=>H1 x; split; move/H1. Qed.
- -
-Lemma EqPredType_trans' (r1 r2 r3 : pT) :
-  EqPredType r1 r2 -> EqPredType r2 r3 -> EqPredType r1 r3.
-Proof. by move=>H1 H2 x; split; [move/H1; move/H2 | move/H2; move/H1]. Qed.
- -
-Lemma SubPredType_trans' (r1 r2 r3 : pT) :
-  SubPredType r1 r2 -> SubPredType r2 r3 -> SubPredType r1 r3.
-Proof. by move=>H1 H2 x; move/H1; move/H2. Qed.
- -
-Definition EqPredType_trans r2 r1 r3 := @EqPredType_trans' r1 r2 r3.
-Definition SubPredType_trans r2 r1 r3 := @SubPredType_trans' r1 r2 r3.
-End RelProperties.
- -
-Hint Resolve EqPredType_refl SubPredType_refl : core.
- -
-(* Declaration of relations *)
- -
-(* Unfortunately, Coq setoids don't seem to understand implicit coercions *)
-(* and canonical structures so we have to repeat relation declarations    *)
-(* for all instances. This is really annoying, but at least I don't have  *)
-(* to reprove the lemmas on refl, sym and trans                           *)
-(*                                                                        *)
-(* Add Parametric Relation T (pT : PredType T) : pT (@EqPredType _ pT)    *)
-(*   reflexivity proved by (@EqPredType_refl _ _)                         *)
-(*  symmetry proved by (@EqPredType_sym _ _)                              *)
-(*  transitivity proved by (@EqPredType_trans' _ _) as EqPredType_rel.    *)
-(*                                                                        *)
-(* Add Parametric Relation T (pT : PredType T) : pT (@SubPredType _ pT)   *)
-(*  reflexivity proved by (@SubPredType_refl _ _)                         *)
-(*  transitivity proved by (@SubPredType_trans' _ _) as SubPredType_rel.  *)
- -
-Add Parametric Relation T : (Pred T) (@EqPred _)
-  reflexivity proved by (@EqPredType_refl _ _)
-  symmetry proved by (@EqPredType_sym _ _)
-  transitivity proved by (@EqPredType_trans' _ _) as EqPred_rel.
- -
-Add Parametric Relation T : (Pred T) (@SubPred _)
-  reflexivity proved by (@SubPredType_refl _ _)
-  transitivity proved by (@SubPredType_trans' _ _) as SubPred_rel.
- -
-Add Parametric Relation T : (Simpl_Pred T) (@EqSimplPred _)
-  reflexivity proved by (@EqPredType_refl _ _)
-  symmetry proved by (@EqPredType_sym _ _)
-  transitivity proved by (@EqPredType_trans' _ _) as EqSimplPred_rel.
- -
-Add Parametric Relation T : (Simpl_Pred T) (@SubSimplPred _)
-  reflexivity proved by (@SubPredType_refl _ _)
-  transitivity proved by (@SubPredType_trans' _ _) as SubSimplPred_rel.
- -
-Add Parametric Relation T : (Mem_Pred T) (@EqMem T)
-  reflexivity proved by (@EqPredType_refl _ _)
-  symmetry proved by (@EqPredType_sym _ _)
-  transitivity proved by (@EqPredType_trans' _ _) as EqMem_rel.
- -
-Add Parametric Relation T : (Mem_Pred T) (@SubMem _)
-  reflexivity proved by (@SubPredType_refl _ _)
-  transitivity proved by (@SubPredType_trans' _ _) as SubMem_rel.
- -
-(* Declaring morphisms. *)
-(* Annoyingly, even the coercions must be declared *)
- -
-Add Parametric Morphism T : (@Pred_of_Simpl T) with signature
-      @EqSimplPred _ ==> @EqPred T as Pred_of_Simpl_morph.
-Proof. by []. Qed.
- -
-(* Do we need other coercions? We'll discover as we go *)
- -
-(* Now the other morphisms. Again, not clear which ones are needed.   *)
-(* However, for all this to work, it seems that morphisms must be     *)
-(* declared with most specific signatures, or else the system         *)
-(* complains. For example, we use EqPred _ instead of EqPredType _ _, *)
-(* even though the former is an instance of the later.                *)
- -
-Add Parametric Morphism T : (@EqPred T) with signature
-    @EqPred _ ==> @EqPred _ ==> iff as EqPred_morph.
-Proof. by move=>r1 s1 H1 r2 s2 H2; rewrite H1 H2. Qed.
- -
-Add Parametric Morphism T : (@SubPred T) with signature
-    @EqPred _ ==> @EqPred _ ==> iff as SubPred_morph.
-Proof. by move=>r1 s1 H1 r2 s2 H2; split=>H x; move/H1; move/H; move/H2. Qed.
- -
-Add Parametric Morphism T : (@InMem T) with signature
-    @eq _ ==> @EqMem _ ==> iff as InMem_morph.
-Proof. by move=>x r s H; split; move/H. Qed.
- -
-Add Parametric Morphism T (pT : PredType T) : (@Mem T pT) with signature
-  @EqPredType _ _ ==> @EqMem _ as Mem_morhp.
-Proof. by move=>x y H p; rewrite /EqPredType -!toPredE in H *; rewrite H. Qed.
- -
-Add Parametric Morphism T : (@PredU T) with signature
-    @EqPred _ ==> @EqPred _ ==> @EqSimplPred _ as predU_morph.
-Proof.
-move=>r1 s1 H1 r2 h2 H2 x; split;
-by case; [move/H1 | move/H2]=>/=; auto.
-Qed.
- -
-Add Parametric Morphism T : (@PredI T) with signature
-    @EqPred _ ==> @EqPred _ ==> @EqPred _ as predI_morph.
-Proof.
-move=>r1 s1 H1 r2 s2 H2 x; split;
-by case; move/H1=>T1; move/H2=>T2.
-Qed.
- -
-Add Parametric Morphism T : (@PredC T) with signature
-    @EqPred _ ==> @EqPred _ as predC_morph.
-Proof. by move=>r s H x; split=>H1; apply/H. Qed.
- -
-Section RelLaws.
-Variable (T : Type).
- -
-Lemma orrI (r : Pred T) : r +p r <~> r.
-Proof. by move=>x; split; [case | left]. Qed.
- -
-Lemma orrC (r1 r2 : Pred T) : r1 +p r2 <~> r2 +p r1.
-Proof. move=>x; split=>/=; tauto. Qed.
- -
-Lemma orr0 (r : Pred T) : r +p Pred0 <~> r.
-Proof. by move=>x; split; [case | left]. Qed.
- -
-Lemma or0r (r : Pred T) : Pred0 +p r <~> r.
-Proof. by rewrite orrC orr0. Qed.
- -
-Lemma orrCA (r1 r2 r3 : Pred T) : r1 +p r2 +p r3 <~> r2 +p r1 +p r3.
-Proof. by move=>x; split=>/=; intuition. Qed.
- -
-Lemma orrAC (r1 r2 r3 : Pred T) : (r1 +p r2) +p r3 <~> (r1 +p r3) +p r2.
-Proof. by move=>?; split=>/=; intuition. Qed.
- -
-Lemma orrA (r1 r2 r3 : Pred T) : (r1 +p r2) +p r3 <~> r1 +p r2 +p r3.
-Proof. by rewrite (orrC r2) orrCA orrC. Qed.
- -
-(* absorption *)
-Lemma orrAb (r1 a : Pred T) : r1 <~> r1 +p a <-> a ~> r1.
-Proof.
-split; first by move=>-> x /=; auto.
-move=>H x /=; split; first by auto.
-by case=>//; move/H.
-Qed.
- -
-Lemma sub_orl (r1 r2 : Pred T) : r1 ~> r1 +p r2. Proof. by left. Qed.
-Lemma sub_orr (r1 r2 : Pred T) : r2 ~> r1 +p r2. Proof. by right. Qed.
- -
-End RelLaws.
- -
-Section SubMemLaws.
-Variable T : Type.
- -
-Lemma subp_refl (p : Pred T) : p <=p p.
-Proof. by []. Qed.
- -
-Lemma subp_asym (p1 p2 : Pred T) : p1 <=p p2 -> p2 <=p p1 -> p1 =p p2.
-Proof. by move=>H1 H2 x; split; [move/H1 | move/H2]. Qed.
- -
-Lemma subp_trans (p2 p1 p3 : Pred T) : p1 <=p p2 -> p2 <=p p3 -> p1 <=p p3.
-Proof. by move=>H1 H2 x; move/H1; move/H2. Qed.
- -
-Lemma subp_or (p1 p2 q : Pred T) : p1 <=p q /\ p2 <=p q <-> p1 +p p2 <=p q.
-Proof.
-split=>[[H1] H2 x|H1]; first by case; [move/H1 | move/H2].
-by split=>x H2; apply: H1; [left | right].
-Qed.
- -
-Lemma subp_and (p1 p2 q : Pred T) : q <=p p1 /\ q <=p p2 <-> q <=p p1 *p p2.
-Proof.
-split=>[[H1] H2 x|] H; last by split=>x; case/H.
-by split; [apply: H1 | apply: H2].
-Qed.
- -
-Lemma subp_orl (p1 p2 q : Pred T) : p1 <=p p2 -> p1 +p q <=p p2 +p q.
-Proof. by move=>H x; case; [move/H; left|right]. Qed.
- -
-Lemma subp_orr (p1 p2 q : Pred T) : p1 <=p p2 -> q +p p1 <=p q +p p2.
-Proof. by move=>H x; case; [left | move/H; right]. Qed.
- -
-Lemma subp_andl (p1 p2 q : Pred T) : p1 <=p p2 -> p1 *p q <=p p2 *p q.
-Proof. by by move=>H x [H1 H2]; split; [apply: H|]. Qed.
- -
-Lemma subp_andr (p1 p2 q : Pred T) : p1 <=p p2 -> q *p p1 <=p q *p p2.
-Proof. by move=>H x [H1 H2]; split; [|apply: H]. Qed.
- -
-End SubMemLaws.
- -
-Hint Resolve subp_refl : core.
- -
-Section ListMembership.
-Variable T : Type.
- -
-Fixpoint Mem_Seq (s : seq T) :=
-  if s is y::s' then (fun x => x = y \/ Mem_Seq s' x) else xPred0.
- -
-Definition EqSeq_Class := seq T.
-Identity Coercion seq_of_EqSeq : EqSeq_Class >-> seq.
- -
-Coercion Pred_of_Eq_Seq (s : EqSeq_Class) : Pred_Class := [eta Mem_Seq s].
- -
-Canonical Structure seq_PredType := @mkPredType T (seq T) Pred_of_Eq_Seq.
-(* The line below makes Mem_Seq a canonical instance of topred. *)
-Canonical Structure Mem_Seq_PredType := mkPredType Mem_Seq.
- -
-Lemma In_cons : forall y s x, (x \In y :: s) <-> (x = y) \/ (x \In s).
-Proof. by []. Qed.
- -
-Lemma In_nil : forall x, (x \In [::]) <-> False.
-Proof. by []. Qed.
- -
-Lemma Mem_Seq1 : forall x y, (x \In [:: y]) <-> (x = y).
-Proof. by move=> x y; rewrite In_cons orpF. Qed.
- -
-Definition InE := (Mem_Seq1, In_cons, In_Simpl).
-(* I also wanted to add Simpl_PredE, but setoid rewrite returns an error *)
-(* and instead of trying the other rules in the tuple, it just stops *)
-(* This is ridiculuous *)
- -
-End ListMembership.
- -
-(* Setoids for extensional equality of functions *)
- -
-Lemma eqfun_refl A B (f : A -> B) : f =1 f. Proof. by []. Qed.
-Lemma eqfun_sym A B (f1 f2 : A -> B) : f1 =1 f2 -> f2 =1 f1.
-Proof. by move=>H x; rewrite H. Qed.
-Lemma eqfun_trans A B (f1 f2 f3 : A -> B) : f1 =1 f2 -> f2 =1 f3 -> f1 =1 f3.
-Proof. by move=>H1 H2 x; rewrite H1 H2. Qed.
- -
-Add Parametric Relation A B : (A -> B) (@eqfun _ _)
-  reflexivity proved by (@eqfun_refl A B)
-  symmetry proved by (@eqfun_sym A B)
-  transitivity proved by (@eqfun_trans A B) as eqfun_morph.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.stlog.html b/docs/LemmaOverloading.stlog.html deleted file mode 100644 index df1d4fa..0000000 --- a/docs/LemmaOverloading.stlog.html +++ /dev/null @@ -1,520 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.stlog

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool seq ssrfun.
-From LemmaOverloading
-Require Import heaps rels hprop stmod stsep.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-Lemma bnd_is_try (A B : Type) (s1 : spec A) (s2 : A -> spec B) i r :
-        verify (try_s s1 s2 (fun y => fr (throw_s B y))) i r ->
-        verify (bind_s s1 s2) i r.
-Proof.
-move=>H; apply: frame0=>D.
-case: {H D} (H D) (D)=>[[i1]][i2][->][[H1 [H2 H3]]] _ T D.
-split=>[|y m].
-- split=>[|x m]; first by apply: fr_pre H1.
-  by case/(locality D H1)=>m1 [->][_]; move/H2; apply: fr_pre.
-move=>{D} H; apply: T=>h1 h2 E.
-rewrite {i1 i2 H1 H2 H3}E in H * => D1 [H1][H2] H3.
-case: H=>[[x][h][]|[e][->]]; move/(locality D1 H1);
-case=>[m1][->][D2] T1; move: (T1); [move/H2 | move/H3]=>H4.
-- move=>T2; case/(locality D2 H4): (T2)=>m3 [->][D3].
-  by exists m3; do !split=>//; left; exists x; exists m1.
-exists m1; do !split=>//; right; exists e; exists m1; split=>//.
-move=>j1 j2 E D _; rewrite {m1 D2}E in T1 D H4 *.
-exists j1; do !split=>//; move=>k1 k2 -> D2 ->.
-by exists empty; rewrite un0h; do !split=>//; apply: defUnr D2.
-Qed.
- -
-Local Notation cont A := (ans A -> heap -> Prop).
- -
-Section EvalDo.
-Variables (A B : Type).
- -
-Lemma val_do (s : spec A) i j (r : cont A) :
-         s.1 i ->
-         (forall x m, s.2 (Val x) i m -> def (m :+ j) -> r (Val x) (m :+ j)) ->
-         (forall e m, s.2 (Exn e) i m -> def (m :+ j) -> r (Exn e) (m :+ j)) ->
-         verify s (i :+ j) r.
-Proof.
-move=>H1 H2 H3; apply: frame; apply: frame0; split=>//.
-by case=>x m H4 D1 D2; [apply: H2 | apply: H3].
-Qed.
- -
-Lemma try_do (s : spec A) s1 s2 i j (r : cont B) :
-        s.1 i ->
-        (forall x m, s.2 (Val x) i m -> verify (s1 x) (m :+ j) r) ->
-        (forall e m, s.2 (Exn e) i m -> verify (s2 e) (m :+ j) r) ->
-        verify (try_s s s1 s2) (i :+ j) r.
-Proof.
-move=>H1 H2 H3; apply: frame0=>D; split=>[|y m].
-- split; first by apply: fr_pre; exists i; exists empty; rewrite unh0.
-  by split=>y m; case/(_ i j (erefl _) D H1)=>m1 [->][D2]; [case/H2 | case/H3].
-by case=>[[x]|[e]][h][]; case/(_ i j (erefl _) D H1)=>m1 [->][D2];
-   [case/H2 | case/H3]=>// _; apply.
-Qed.
- -
-Lemma bnd_do (s : spec A) s2 i j (r : cont B) :
-        s.1 i ->
-        (forall x m, s.2 (Val x) i m -> verify (s2 x) (m :+ j) r) ->
-        (forall e m, s.2 (Exn e) i m -> def (m :+ j) -> r (Exn e) (m :+ j)) ->
-        verify (bind_s s s2) (i :+ j) r.
-Proof.
-move=>H1 H2 H3; apply: bnd_is_try.
-apply: try_do=>// e m H4; apply: frame0; apply: frame1=>_.
-by split=>// y m1 [->] -> _; rewrite un0h; apply: H3.
-Qed.
- -
-End EvalDo.
- -
-Section EvalReturn.
-Variables (A B : Type).
- -
-Lemma val_ret v i (r : cont A) :
-       (def i -> r (Val v) i) -> verify (ret_s v) i r.
-Proof.
-by rewrite -[i]un0h=>H; apply: val_do=>// x m [->] // [->].
-Qed.
- -
-Lemma try_ret s1 s2 (v : A) i (r : cont B) :
-        verify (s1 v) i r -> verify (try_s (ret_s v) s1 s2) i r.
-Proof.
-by rewrite -[i]un0h=>H; apply: try_do=>// x m [->] // [->].
-Qed.
- -
-Lemma bnd_ret s (v : A) i (r : cont B) :
-        verify (s v) i r -> verify (bind_s (ret_s v) s) i r.
-Proof. by move=>H; apply: bnd_is_try; apply: try_ret. Qed.
- -
-End EvalReturn.
- -
-Section EvalRead.
-Variables (A B : Type).
- -
-Lemma val_read v x i (r : cont A) :
-        (def (x :-> v :+ i) -> r (Val v) (x :-> v :+ i)) ->
-        verify (read_s A x) (x :-> v :+ i) r.
-Proof.
-move=>*; apply: val_do; first by [exists v];
-by move=>y m [<-]; move/(_ v (erefl _))=>// [->].
-Qed.
- -
-Lemma try_read s1 s2 v x i (r : cont B) :
-        verify (s1 v) (x :-> v :+ i) r ->
-        verify (try_s (read_s A x) s1 s2) (x :-> v :+ i) r.
-Proof.
-move=>*; apply: try_do; first by [exists v];
-by move=>y m [<-]; move/(_ v (erefl _))=>// [->].
-Qed.
- -
-Lemma bnd_read s v x i (r : cont B) :
-        verify (s v) (x :-> v :+ i) r ->
-        verify (bind_s (read_s A x) s) (x :-> v :+ i) r.
-Proof. by move=>*; apply: bnd_is_try; apply: try_read. Qed.
- -
-End EvalRead.
- -
-Section EvalWrite.
-Variables (A B C : Type).
- -
-Lemma val_write (v : A) (w : B) x i (r : cont unit) :
-        (def (x :-> v :+ i) -> r (Val tt) (x :-> v :+ i)) ->
-        verify (write_s x v) (x :-> w :+ i) r.
-Proof.
-move=>*; apply: val_do; first by [exists B; exists w];
-by move=>y m [// [->] ->].
-Qed.
- -
-Lemma try_write s1 s2 (v: A) (w : C) x i (r : cont B) :
-        verify (s1 tt) (x :-> v :+ i) r ->
-        verify (try_s (write_s x v) s1 s2) (x :-> w :+ i) r.
-Proof.
-move=>*; apply: try_do; first by [exists C; exists w];
-by move=>y m [// [->] ->].
-Qed.
- -
-Lemma bnd_write s (v : A) (w : C) x i (r : cont B) :
-        verify (s tt) (x :-> v :+ i) r ->
-        verify (bind_s (write_s x v) s) (x :-> w :+ i) r.
-Proof. by move=>*; apply: bnd_is_try; apply: try_write. Qed.
- -
-End EvalWrite.
- -
-Section EvalAlloc.
-Variables (A B : Type).
- -
-Lemma val_alloc (v : A) i (r : cont ptr) :
-        (forall x, def (x :-> v :+ i) -> r (Val x) (x :-> v :+ i)) ->
-        verify (alloc_s v) i r.
-Proof.
-move=>H; rewrite -[i]un0h; apply: val_do=>//;
-by move=>y m [x][//][-> ->]; apply: H.
-Qed.
- -
-Lemma try_alloc s1 s2 (v : A) i (r : cont B) :
-        (forall x, verify (s1 x) (x :-> v :+ i) r) ->
-        verify (try_s (alloc_s v) s1 s2) i r.
-Proof.
-move=>H; rewrite -[i]un0h; apply: try_do=>//;
-by move=>y m [x][//][-> ->]; apply: H.
-Qed.
- -
-Lemma bnd_alloc s (v : A) i (r : cont B) :
-        (forall x, verify (s x) (x :-> v :+ i) r) ->
-        verify (bind_s (alloc_s v) s) i r.
-Proof. by move=>*; apply: bnd_is_try; apply: try_alloc. Qed.
- -
-End EvalAlloc.
- -
-Section EvalBlockAlloc.
-Variables (A B : Type).
- -
-Lemma val_allocb (v : A) n i (r : cont ptr) :
-        (forall x, def (updi x (nseq n v) :+ i) ->
-           r (Val x) (updi x (nseq n v) :+ i)) ->
-        verify (allocb_s v n) i r.
-Proof.
-move=>H; rewrite -[i]un0h; apply: val_do=>//;
-by move=>y m [x][//][->]->; apply: H.
-Qed.
- -
-Lemma try_allocb s1 s2 (v : A) n i (r : cont B) :
-        (forall x, verify (s1 x) (updi x (nseq n v) :+ i) r) ->
-        verify (try_s (allocb_s v n) s1 s2) i r.
-Proof.
-move=>H; rewrite -[i]un0h; apply: try_do=>//;
-by move=>y m [x][//][->]->; apply: H.
-Qed.
- -
-Lemma bnd_allocb s (v : A) n i (r : cont B) :
-        (forall x, verify (s x) (updi x (nseq n v) :+ i) r) ->
-        verify (bind_s (allocb_s v n) s) i r.
-Proof. by move=>*; apply: bnd_is_try; apply: try_allocb. Qed.
- -
-End EvalBlockAlloc.
- -
-Section EvalDealloc.
-Variables (A B : Type).
- -
-Lemma val_dealloc (v : A) x i (r : cont unit) :
-        (def i -> r (Val tt) i) ->
-        verify (dealloc_s x) (x :-> v :+ i) r.
-Proof.
-move=>H; apply: val_do; first by [exists A; exists v];
-by move=>y m [//][->] ->; rewrite un0h.
-Qed.
- -
-Lemma try_dealloc s1 s2 (v : B) x i (r : cont A) :
-        verify (s1 tt) i r ->
-        verify (try_s (dealloc_s x) s1 s2) (x :-> v :+ i) r.
-Proof.
-move=>H; apply: try_do; first by [exists B; exists v];
-by move=>y m [//][->] ->; rewrite un0h.
-Qed.
- -
-Lemma bnd_dealloc s (v : B) x i (r : cont A) :
-        verify (s tt) i r ->
-        verify (bind_s (dealloc_s x) s) (x :-> v :+ i) r.
-Proof. by move=>*; apply: bnd_is_try; apply: try_dealloc. Qed.
- -
-End EvalDealloc.
- -
-Section EvalThrow.
-Variables (A B : Type).
- -
-Lemma val_throw e i (r : cont A) :
-        (def i -> r (Exn e) i) -> verify (throw_s A e) i r.
-Proof.
-move=>H; rewrite -[i]un0h; apply: val_do=>//;
-by move=>y m [->] // [->]; rewrite un0h.
-Qed.
- -
-Lemma try_throw s1 s2 e i (r : cont B) :
-        verify (s2 e) i r ->
-        verify (try_s (throw_s A e) s1 s2) i r.
-Proof.
-move=>H; rewrite -[i]un0h; apply: try_do=>//;
-by move=>y m [->] // [->]; rewrite un0h.
-Qed.
- -
-Lemma bnd_throw s e i (r : cont B) :
-        (def i -> r (Exn e) i) ->
-        verify (bind_s (throw_s A e) s) i r.
-Proof.
-move=>H; apply: bnd_is_try; apply: try_throw; apply: frame0.
-by rewrite -[i]un0h; apply: val_do=>// y m [->] // [->]; rewrite un0h.
-Qed.
- -
-End EvalThrow.
- -
-(* specialized versions of do lemmas, to handle ghost variables. *)
- -
-Section EvalGhost.
-Variables (A B C : Type) (t : C) (p : C -> Pred heap) (q : C -> post A).
-Variables (s1 : A -> spec B) (s2 : exn -> spec B) (i j : heap) (P : Pred heap).
- -
-Lemma val_gh (r : cont A) :
-        let: s := (fun i => exists x, i \In p x,
-                   fun y i m => forall x, i \In p x -> q x y i m) in
-        (forall x m, q t (Val x) i m -> def (m :+ j) -> r (Val x) (m :+ j)) ->
-        (forall e m, q t (Exn e) i m -> def (m :+ j) -> r (Exn e) (m :+ j)) ->
-        i \In p t ->
-        verify s (i :+ j) r.
-Proof. by move=>*; apply: val_do=>/=; eauto. Qed.
- -
-Lemma val_gh1 (r : cont A) :
-        let: Q := fun y i m => forall x, i \In p x -> q x y i m in
-        (i \In p t -> P i) ->
-        (forall x m, q t (Val x) i m -> def (m :+ j) -> r (Val x) (m :+ j)) ->
-        (forall e m, q t (Exn e) i m -> def (m :+ j) -> r (Exn e) (m :+ j)) ->
-        i \In p t ->
-        verify (P, Q) (i :+ j) r.
-Proof. by move=>*; apply: val_do=>/=; eauto. Qed.
- -
-Lemma try_gh (r : cont B) :
-        let: s := (fun i => exists x, i \In p x,
-                   fun y i m => forall x, i \In p x -> q x y i m) in
-        (forall x m, q t (Val x) i m -> verify (s1 x) (m :+ j) r) ->
-        (forall e m, q t (Exn e) i m -> verify (s2 e) (m :+ j) r) ->
-        i \In p t ->
-        verify (try_s s s1 s2) (i :+ j) r.
-Proof. by move=>*; apply: try_do=>/=; eauto. Qed.
- -
-Lemma try_gh1 (r : cont B) :
-        let: Q := fun y i m => forall x, i \In p x -> q x y i m in
-        (i \In p t -> P i) ->
-        (forall x m, q t (Val x) i m -> verify (s1 x) (m :+ j) r) ->
-        (forall e m, q t (Exn e) i m -> verify (s2 e) (m :+ j) r) ->
-        i \In p t ->
-        verify (try_s (P, Q) s1 s2) (i :+ j) r.
-Proof. by move=>*; apply: try_do=>/=; eauto. Qed.
- -
-Lemma bnd_gh (r : cont B) :
-        let: s := (fun i => exists x, i \In p x,
-                   fun y i m => forall x, i \In p x -> q x y i m) in
-        (forall x m, q t (Val x) i m -> verify (s1 x) (m :+ j) r) ->
-        (forall e m, q t (Exn e) i m -> def (m :+ j) -> r (Exn e) (m :+ j)) ->
-        i \In p t ->
-        verify (bind_s s s1) (i :+ j) r.
-Proof. by move=>*; apply: bnd_do=>/=; eauto. Qed.
- -
-Lemma bnd_gh1 (r : cont B) :
-        let: Q := fun y i m => forall x, i \In p x -> q x y i m in
-        (i \In p t -> P i) ->
-        (forall x m, q t (Val x) i m -> verify (s1 x) (m :+ j) r) ->
-        (forall e m, q t (Exn e) i m -> def (m :+ j) -> r (Exn e) (m :+ j)) ->
-        i \In p t ->
-        verify (bind_s (P, Q) s1) (i :+ j) r.
-Proof. by move=>*; apply: bnd_do=>/=; eauto. Qed.
- -
-End EvalGhost.
- -
-(*****************************************************************************)
-(* associativity lemmas should go here, but I don't want to bother right now *)
-(*****************************************************************************)
- -
-(* packaging up the lemmas into a tactic that selects them appropriately *)
- -
-Definition pull (A : Type) x (v:A) := (unC (x :-> v), unCA (x :-> v)).
-Definition push (A : Type) x (v:A) := (unCA (x :-> v), unC (x :-> v)).
- -
-Ltac hstep :=
-  match goal with
-    | |- verify ?h (ret_s _) _ =>
-      apply: val_ret
-    | |- verify ?h (try_s (ret_s _) _ _) _ =>
-      apply: try_ret
-    | |- verify ?h (bind_s (ret_s _) _) _ =>
-      apply: bnd_ret
-
-    | |- verify ?h (read_s _ ?l) _ =>
-      rewrite -?(pull l); apply: val_read
-    | |- verify ?h (try_s (read_s _ ?l) _ _) _ =>
-      rewrite -?(pull l); apply: try_read
-    | |- verify (?h) (bind_s (read_s _ ?l) _) _ =>
-      rewrite -?(pull l); apply: bnd_read
-
-    | |- verify (?h) (write_s ?l _) _ =>
-      rewrite -?(pull l); apply: val_write
-    | |- verify (?h) (try_s (write_s ?l _) _ _) _ =>
-      rewrite -?(pull l); apply: try_write
-    | |- verify (?h) (bind_s (write_s ?l _) _) _ =>
-      rewrite -?(pull l); apply: bnd_write
-
-    | |- verify ?h (alloc_s _) _ =>
-      apply: val_alloc
-    | |- verify ?h (try_s (alloc_s _) _ _) _ =>
-      apply: try_alloc
-    | |- verify ?h (bind_s (alloc_s _) _) _ =>
-      apply: bnd_alloc
-
-    | |- verify ?h (allocb_s _ _) _ =>
-      apply: val_allocb
-    | |- verify ?h (try_s (allocb_s _ _) _ _) _ =>
-      apply: try_allocb
-    | |- verify ?h (bind_s (allocb_s _ _) _) _ =>
-      apply: bnd_allocb
-
-    | |- verify ?h (dealloc_s ?l) _ =>
-      rewrite -?(pull l); apply: val_dealloc
-    | |- verify ?h (try_s (dealloc_s ?l) _ _) _ =>
-      rewrite -?(pull l); apply: try_dealloc
-    | |- verify ?h (bind_s (dealloc_s ?l) _) _ =>
-      rewrite -?(pull l); apply: bnd_dealloc
-
-    | |- verify ?h (throw_s _ _) _ =>
-      apply: val_throw
-    | |- verify ?h (try_s (throw_s _ _) _ _) _ =>
-      apply: try_throw
-    | |- verify ?h (bind_s (throw_s _ _) _) _ =>
-      apply: bnd_throw
-  end.
- -
-Lemma swp : forall (A : Type) (v : A) x h, h \In x :--> v <-> h = x :-> v.
-Proof. by move=>A v x h; split; rewrite InE /pts /=; unlock. Qed.
- -
-Lemma opn : forall (A : Type) (v : A) x h, h \In x :--> v <-> x :-> v = h.
-Proof. by move=>A v x h; split=>[|H]; rewrite InE /= /pts; unlock. Qed.
- -
-Prenex Implicits swp opn.
- -
-Lemma blah (A : Type) (p : ptr) (l : A) : def (p :-> l) -> (p :-> l) \In p :--> l.
-Proof. by move=>H; apply/swp. Qed.
- -
-Hint Immediate blah : core.
- -
-Lemma blah2 (A : Type) (v1 v2 : A) q :
-        def (q :-> v1) -> v1 = v2 -> q :-> v1 \In q :--> v2.
-Proof. by move=>D E; apply/swp; rewrite E. Qed.
- -
-Hint Immediate blah2 : core.
- -
-Ltac hauto := (do ?econstructor=>//;
-                try by [defcheck; auto |
-                       eapply blah2; defcheck; auto])=>//.
- -
-Ltac hhauto := (do ?econstructor=>//; try by [heap_congr])=>//.
-Ltac hdone := repeat progress hhauto=>//=.
-Ltac heval := do ![hstep | by hhauto].
-
-
- -
- - - diff --git a/docs/LemmaOverloading.stlogCTC.html b/docs/LemmaOverloading.stlogCTC.html deleted file mode 100644 index a46bd8f..0000000 --- a/docs/LemmaOverloading.stlogCTC.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.stlogCTC

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool ssrfun.
-From LemmaOverloading
-Require Import heaps stmod stsep stlog.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-Class Update (h1 h2 k1 k2 : heap) :=
-  { rest : heap; update1 : h1 = k1 :+ rest; update2 : h2 = k2 :+ rest}.
- -
-Arguments update1 [h1 h2 k1 k2].
-Arguments update2 [h1 h2 k1 k2].
-Arguments rest [h1 h2 k1 k2].
- -
-Program
-Instance found_struct k1 k2 : Update k1 k2 k1 k2 | 1 := {| rest := empty |}.
-Next Obligation. by rewrite unh0. Qed.
-Next Obligation. by rewrite unh0. Qed.
- -
-Program
-Instance left_struct l h1 h2 k1 k2 (f : Update h1 h2 k1 k2) :
-  Update (l :+ h1) (l :+ h2) k1 k2 | 2 := {| rest := (l :+ rest f) |}.
-Next Obligation.
-have H : h1 = k1 :+ (rest f) by eapply (update1 f).
-by rewrite -unCA -H.
-Qed.
-Next Obligation.
-have H : h2 = k2 :+ (rest f) by eapply (update2 f).
-by rewrite -unCA -H.
-Qed.
- -
-Program
-Instance right_struct l h1 h2 k1 k2 (f : Update h1 h2 k1 k2) :
-  Update (h1 :+ l) (h2 :+ l) k1 k2 | 2 := {| rest := (rest f :+ l) |}.
-Next Obligation.
-have H : h1 = k1 :+ (rest f) by eapply (update1 f).
-by rewrite unA -H.
-Qed.
-Next Obligation.
-have H : h2 = k2 :+ (rest f) by eapply (update2 f).
-by rewrite unA -H.
-Qed.
- -
-Notation cont A := (ans A -> heap -> Prop).
- -
-Section EvalWriteR.
-Variables (A B C : Type).
- -
-Lemma bnd_writeR s (v : A) (w : C) x h1 h2
-(f : Update h1 h2 (x:->v) (x:->w)) (r : cont B) :
-        verify (s tt) h1 r ->
-        verify (bind_s (write_s x v) s) h2 r.
-Proof.
-set l := rest f.
-have H1 : h1 = (x :-> v) :+ l by eapply (update1 f).
-have H2 : h2 = (x :-> w) :+ l by eapply (update2 f).
-by rewrite H1 H2; apply: bnd_write.
-Qed.
- -
-End EvalWriteR.
- -
-Section EvalDeallocR.
-Variables (A B : Type).
- -
-Lemma bnd_deallocR s (v : A) x h1 h2
-  (f : Update h1 h2 empty (x:->v)) (r : cont B) :
-        verify (s tt) h1 r ->
-        verify (bind_s (dealloc_s x) s) h2 r.
-Proof.
-set l := rest f.
-have H1 : h1 = empty :+ l by eapply (update1 f).
-have H2 : h2 = (x :-> v) :+ l by eapply (update2 f).
-by rewrite H1 H2 un0h; apply bnd_dealloc.
-Qed.
- -
-End EvalDeallocR.
- -
-Class Find1 (h k : heap) :=
-  { rest1 : heap; heq1 : h = k :+ rest1}.
- -
-Program
-Instance ffound_struct1 k : Find1 k k | 1 := {| rest1 := empty|}.
-Next Obligation. by rewrite unh0. Qed.
- -
-Program
-Instance fleft_struct1 l r k (f : Find1 l k) :
-  Find1 (l :+ r) k | 2 := {| rest1 := rest1 :+ r |}.
-Next Obligation. by rewrite unA -heq1. Qed.
- -
-Program
-Instance fright_struct1 l r k (f : Find1 r k) :
-  Find1 (l :+ r) k | 2 := {| rest1 := l :+ rest1 |}.
-Next Obligation. by rewrite unCA -heq1. Qed.
- -
-Section EvalDoR.
-Variables (A B : Type).
- -
-Lemma val_doR (s : spec A) h i (r : cont A) (f : Find1 h i) :
-         s.1 i ->
-         (forall x m,
-               s.2 (Val x) i m -> def (m :+ rest1) -> r (Val x) (m :+ rest1)) ->
-         (forall e m,
-               s.2 (Exn e) i m -> def (m :+ rest1) -> r (Exn e) (m :+ rest1)) ->
-         verify s h r.
-Proof.
-move=>H1 H2 H3.
-generalize (heq1 (h:=h))=>H.
-rewrite H.
-by apply: (val_do (i:=i) (j:=rest1)).
-Qed.
- -
-End EvalDoR.
- -
-Example ex_val_do (s : spec nat) (r : cont nat) (x y : ptr) :
-         s.1 (y:->2) ->
-         (forall x' m,
-               s.2 (Val x') (y:->2) m -> def (x:->1:+m) -> r (Val x') (x:->1:+m)) ->
-         (forall e m,
-               s.2 (Exn e) (y:->2) m -> def (x:->1:+m) -> r (Exn e) (x:->1:+m)) ->
-         verify s (x:->1 :+ y:->2) r.
-move=>H1 H2 H3.
-apply: (val_doR _ (i:=y:->2))=>//=.
-- by move=>x'' m''; rewrite unh0 unC; apply: H2.
-by move=>x'' m''; rewrite unh0 unC; apply: H3.
-Qed.
- -
-Example ex_bwd i x1 x2 (e : unit -> spec nat) q:
-          verify (e tt) (i :+ (x1 :-> 1 :+ x2 :-> 4)) q ->
-          verify (bind_s (write_s x2 4) e) (i :+ (x1 :-> 1 :+ x2 :-> 2)) q.
-move=>H.
-by apply: bnd_writeR.
-Abort.
- -
-Example ex_fwd i x1 x2 (e : unit -> spec nat) q:
-          verify (e tt) (i :+ (x1 :-> 1 :+ x2 :-> 4)) q ->
-          verify (bind_s (write_s x2 4) e) (i :+ (x1 :-> 1 :+ x2 :-> 2)) q.
-move=>H.
-by apply: (bnd_writeR _ H).
-Abort.
- -
-Example ex_dealloc_bwd i x1 x2 (e : unit -> spec nat) q:
-          verify (e tt) (i :+ (x1 :-> 1)) q ->
-          verify (bind_s (dealloc_s x2) e) (i :+ (x1 :-> 1 :+ x2 :-> 2)) q.
-move=>H.
-by apply: bnd_deallocR; rewrite unh0.
-Abort.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.stlogR.html b/docs/LemmaOverloading.stlogR.html deleted file mode 100644 index 326a301..0000000 --- a/docs/LemmaOverloading.stlogR.html +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.stlogR

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool ssrfun.
-From LemmaOverloading
-Require Import heaps rels stmod stsep stlog.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(******************************************************************************)
-(* This file contains several lemmas automated with canonical structures to   *)
-(* verify programs with HTT                                                   *)
-(******************************************************************************)
- -
-(*************************************************************************)
-(* First, the mechanism for search-and-replace for the overloaded lemas, *)
-(* pattern-matching on heap expressions.                                 *)
-(*************************************************************************)
- -
-Structure tagged_heap := Tag {untag :> heap}.
- -
-Definition right_tag := Tag.
-Definition left_tag := right_tag.
-Canonical Structure found_tag i := left_tag i.
- -
-Definition update_axiom k r (h : tagged_heap) := untag h = k :+ r.
- -
-Structure update (k r : heap) :=
-  Update {heap_of :> tagged_heap;
-        _ : update_axiom k r heap_of}.
- -
-Lemma updateE r k (f : update k r) : untag f = k :+ r.
-Proof. by case: f=>[[j]] /=; rewrite /update_axiom /= => ->. Qed.
- -
-Lemma found_pf k : update_axiom k empty (found_tag k).
-Proof. by rewrite /update_axiom unh0. Qed.
- -
-Canonical Structure found_struct k := Update (found_pf k).
- -
-Lemma left_pf h r (f : forall k, update k r) k :
-        update_axiom k (r :+ h) (left_tag (f k :+ h)).
-Proof. by rewrite updateE /update_axiom /= unA. Qed.
- -
-Canonical Structure left_struct h r (f : forall k, update k r) k :=
-  Update (left_pf h f k).
- -
-Lemma right_pf h r (f : forall k, update k r) k :
-        update_axiom k (h :+ r) (right_tag (h :+ f k)).
-Proof. by rewrite updateE /update_axiom /= unCA. Qed.
- -
-Canonical Structure right_struct h r (f : forall k, update k r) k :=
-  Update (right_pf h f k).
- -
-(*********************)
-(* Overloaded lemmas *)
-(*********************)
- -
-Notation cont A := (ans A -> heap -> Prop).
- -
-Section EvalDoR.
-Variables (A B : Type).
- -
-Lemma val_doR (s : spec A) i j (f : forall k, update k j) (r : cont A) :
-         s.1 i ->
-         (forall x m, s.2 (Val x) i m -> def (f m) -> r (Val x) (f m)) ->
-         (forall e m, s.2 (Exn e) i m -> def (f m) -> r (Exn e) (f m)) ->
-         verify s (f i) r.
-Proof.
-move=>H1 H2 H3; rewrite updateE; apply: (val_do H1).
-- by move=>x m; move: (H2 x m); rewrite updateE.
-by move=>x m; move: (H3 x m); rewrite updateE.
-Qed.
- -
-Lemma try_doR (s : spec A) s1 s2 i j (f : forall k, update k j) (r : cont B) :
-        s.1 i ->
-        (forall x m, s.2 (Val x) i m -> verify (s1 x) (f m) r) ->
-        (forall e m, s.2 (Exn e) i m -> verify (s2 e) (f m) r) ->
-        verify (try_s s s1 s2) (f i) r.
-Proof.
-move=>H1 H2 H3; rewrite updateE; apply: (try_do H1).
-- by move=>x m; move: (H2 x m); rewrite updateE.
-by move=>x m; move: (H3 x m); rewrite updateE.
-Qed.
- -
-Lemma bnd_doR (s : spec A) s2 i j (f : forall k, update k j) (r : cont B) :
-        s.1 i ->
-        (forall x m, s.2 (Val x) i m -> verify (s2 x) (f m) r) ->
-        (forall e m, s.2 (Exn e) i m -> def (f m) -> r (Exn e) (f m)) ->
-        verify (bind_s s s2) (f i) r.
-Proof.
-move=>H1 H2 H3; rewrite updateE; apply: (bnd_do H1).
-- by move=>x m; move: (H2 x m); rewrite updateE.
-by move=>x m; move: (H3 x m); rewrite updateE.
-Qed.
- -
-End EvalDoR.
- -
-(* ret lemmas need no reflection, as they operate on any heap; still *)
-(* rename them for uniformity *)
- -
-Definition val_retR := val_ret.
-Definition try_retR := try_ret.
-Definition bnd_retR := bnd_ret.
- -
-Section EvalReadR.
-Variables (A B : Type).
- -
-Lemma val_readR v x i (f : update (x :-> v) i) (r : cont A) :
-        (def f -> r (Val v) f) ->
-        verify (read_s A x) f r.
-Proof. by rewrite updateE; apply: val_read. Qed.
- -
-Lemma try_readR s1 s2 v x i (f : update (x :-> v) i) (r : cont B) :
-        verify (s1 v) f r ->
-        verify (try_s (read_s A x) s1 s2) f r.
-Proof. by rewrite updateE; apply: try_read. Qed.
- -
-Lemma bnd_readR s v x i (f : update (x :-> v) i) (r : cont B) :
-        verify (s v) f r ->
-        verify (bind_s (read_s A x) s) f r.
-Proof. by rewrite updateE; apply: bnd_read. Qed.
- -
-End EvalReadR.
- -
-Section EvalWriteR.
-Variables (A B C : Type).
- -
-Lemma val_writeR (v : A) (w : B) x i (f : forall k, update k i) (r : cont unit) :
-        (def (f (x :-> v)) -> r (Val tt) (f (x :-> v))) ->
-        verify (write_s x v) (f (x :-> w)) r.
-Proof. by rewrite !updateE; apply: val_write. Qed.
- -
-Lemma try_writeR s1 s2 (v : A) (w : C) x i
-                 (f : forall k, update k i) (r : cont B) :
-        verify (s1 tt) (f (x :-> v)) r ->
-        verify (try_s (write_s x v) s1 s2) (f (x :-> w)) r.
-Proof. rewrite !updateE; apply: try_write. Qed.
- -
-Lemma bnd_writeR s (v : A) (w : C) x i (f : forall k, update k i) (r : cont B) :
-        verify (s tt) (f (x :-> v)) r ->
-        verify (bind_s (write_s x v) s) (f (x :-> w)) r.
-Proof. by rewrite !updateE; apply: bnd_write. Qed.
- -
-End EvalWriteR.
- -
-Definition val_allocR := val_alloc.
-Definition try_allocR := try_alloc.
-Definition bnd_allocR := bnd_alloc.
-Definition val_allocbR := val_allocb.
-Definition try_allocbR := try_allocb.
-Definition bnd_allocbR := bnd_allocb.
- -
-Section EvalDeallocR.
-Variables (A B : Type).
- -
-Lemma val_deallocR (v : A) x i (f : forall k, update k i) (r : cont unit) :
-        (def (f empty) -> r (Val tt) (f empty)) ->
-        verify (dealloc_s x) (f (x :-> v)) r.
-Proof. by rewrite !updateE un0h; apply: val_dealloc. Qed.
- -
-Lemma try_deallocR s1 s2 (v : B) x i (f : forall k, update k i) (r : cont A) :
-        verify (s1 tt) (f empty) r ->
-        verify (try_s (dealloc_s x) s1 s2) (f (x :-> v)) r.
-Proof. by rewrite !updateE un0h; apply: try_dealloc. Qed.
- -
-Lemma bnd_deallocR s (v : B) x i (f : forall k, update k i) (r : cont A) :
-        verify (s tt) (f empty) r ->
-        verify (bind_s (dealloc_s x) s) (f (x :-> v)) r.
-Proof. by rewrite !updateE un0h; apply: bnd_dealloc. Qed.
- -
-End EvalDeallocR.
- -
-Definition val_throwR := val_throw.
-Definition try_throwR := try_throw.
-Definition bnd_throwR := bnd_throw.
- -
-(* specialized versions of do lemmas, to handle ghost variables. *)
- -
-Section EvalGhostR.
-Variables (A B C : Type) (t : C) (p : C -> Pred heap) (q : C -> post A).
-Variables (s1 : A -> spec B) (s2 : exn -> spec B) (i j : heap).
-Variables (f : forall k, update k j) (P : Pred heap).
- -
-Lemma val_ghR (r : cont A) :
-        let: s := (fun i => exists x, i \In p x,
-                   fun y i m => forall x, i \In p x -> q x y i m) in
-        (forall x m, q t (Val x) i m -> def (f m) -> r (Val x) (f m)) ->
-        (forall e m, q t (Exn e) i m -> def (f m) -> r (Exn e) (f m)) ->
-        i \In p t ->
-        verify s (f i) r.
-Proof.
-move=>H1 H2; rewrite updateE; apply: val_gh.
-- by move=>x m; move: (H1 x m); rewrite updateE.
-by move=>x m; move: (H2 x m); rewrite updateE.
-Qed.
- -
-Lemma val_gh1R (r : cont A) :
-        let: Q := fun y i m => forall x, i \In p x -> q x y i m in
-        (i \In p t -> P i) ->
-        (forall x m, q t (Val x) i m -> def (f m) -> r (Val x) (f m)) ->
-        (forall e m, q t (Exn e) i m -> def (f m) -> r (Exn e) (f m)) ->
-        i \In p t ->
-        verify (P, Q) (f i) r.
-Proof.
-move=>H1 H2 H3; rewrite updateE; apply: (val_gh1 H1).
-- by move=>x m; move: (H2 x m); rewrite updateE.
-by move=>x m; move: (H3 x m); rewrite updateE.
-Qed.
- -
-Lemma try_ghR (r : cont B) :
-        let: s := (fun i => exists x, i \In p x,
-                   fun y i m => forall x, i \In p x -> q x y i m) in
-        (forall x m, q t (Val x) i m -> verify (s1 x) (f m) r) ->
-        (forall e m, q t (Exn e) i m -> verify (s2 e) (f m) r) ->
-        i \In p t ->
-        verify (try_s s s1 s2) (f i) r.
-Proof.
-move=>H1 H2; rewrite updateE; apply: try_gh.
-- by move=>x m; move: (H1 x m); rewrite updateE.
-by move=>x m; move: (H2 x m); rewrite updateE.
-Qed.
- -
-Lemma try_gh1R (r : cont B) :
-        let: Q := fun y i m => forall x, i \In p x -> q x y i m in
-        (i \In p t -> P i) ->
-        (forall x m, q t (Val x) i m -> verify (s1 x) (f m) r) ->
-        (forall e m, q t (Exn e) i m -> verify (s2 e) (f m) r) ->
-        i \In p t ->
-        verify (try_s (P, Q) s1 s2) (f i) r.
-Proof.
-move=>H1 H2 H3; rewrite updateE; apply: (try_gh1 H1).
-- by move=>x m; move: (H2 x m); rewrite updateE.
-by move=>x m; move: (H3 x m); rewrite updateE.
-Qed.
- -
-Lemma bnd_ghR (r : cont B) :
-        let: s := (fun i => exists x, i \In p x,
-                   fun y i m => forall x, i \In p x -> q x y i m) in
-        (forall x m, q t (Val x) i m -> verify (s1 x) (f m) r) ->
-        (forall e m, q t (Exn e) i m -> def (f m) -> r (Exn e) (f m)) ->
-        i \In p t ->
-        verify (bind_s s s1) (f i) r.
-Proof.
-move=>H1 H2; rewrite updateE; apply: bnd_gh.
-- by move=>x m; move: (H1 x m); rewrite updateE.
-by move=>x m; move: (H2 x m); rewrite updateE.
-Qed.
- -
-Lemma bnd_gh1R (r : cont B) :
-        let: Q := fun y i m => forall x, i \In p x -> q x y i m in
-        (i \In p t -> P i) ->
-        (forall x m, q t (Val x) i m -> verify (s1 x) (f m) r) ->
-        (forall e m, q t (Exn e) i m -> def (f m) -> r (Exn e) (f m)) ->
-        i \In p t ->
-        verify (bind_s (P, Q) s1) (f i) r.
-Proof.
-move=>H1 H2 H3; rewrite updateE; apply: (bnd_gh1 H1).
-- by move=>x m; move: (H2 x m); rewrite updateE.
-by move=>x m; move: (H3 x m); rewrite updateE.
-Qed.
- -
-End EvalGhostR.
- -
-(****************************************************)
-(* Automating the selection of which lemma to apply *)
-(* (the hstep tactic made as an overloaded lemma    *)
-(****************************************************)
- -
-(* Need to case-split on bnd_, try_, or a val_ lemma. *)
-(* Hence, three classes of canonical structures.      *)
- -
-Structure val_form A i r (p : Prop):=
-  ValForm {val_pivot :> spec A;
-           _ : p -> verify val_pivot i r}.
- -
-Structure bnd_form A B i (s : A -> spec B) r (p : Prop) :=
-  BndForm {bnd_pivot :> spec A;
-           _ : p -> verify (bind_s bnd_pivot s) i r}.
- -
-Structure try_form A B i (s1 : A -> spec B)
-                         (s2 : exn -> spec B) r (p : Prop) :=
-  TryForm {try_pivot :> spec A;
-           _ : p -> verify (try_s try_pivot s1 s2) i r}.
- -
-(* The main lemma which triggers the selection. *)
-Definition hstep A i (r : cont A) p (e : val_form i r p) : p -> verify e i r :=
-  let: ValForm _ pf := e in pf.
- -
-(* First check if matching on bnd_ or try_. If so, switch to searching *)
-(* for bnd_ or try_form, respectively. Otherwise, fall through, and    *)
-(* continue searching for a val_form. *)
-Definition hstep_bnd A B i (s : A -> spec B) r p (e : bnd_form i s r p)
-  : p -> verify (bind_s e s) i r
-  := let: BndForm _ pf := e in pf.
- -
-Canonical Structure
-  bnd_case_form A B i (s : A -> spec B) r p (e : bnd_form i s r p) :=
-  ValForm (hstep_bnd e).
- -
-Lemma try_case_pf A B i (s1 : A -> spec B) (s2 : exn -> spec B) r p
-                        (e : try_form i s1 s2 r p) :
-        p -> verify (try_s e s1 s2) i r.
-Proof. by case:e=>[?]; apply. Qed.
- -
-(* After that, find the form in the following list.  Notice that the list *)
-(* can be extended arbitrarily in the future. There is no centralized     *)
-(* tactic to maintain. *)
- -
-Canonical Structure val_ret_form A v i r :=
-  ValForm (@val_retR A v i r).
-Canonical Structure bnd_ret_form A B s v i r :=
-  BndForm (@bnd_retR A B s v i r).
-Canonical Structure try_ret_form A B s1 s2 v i r :=
-  TryForm (@try_retR A B s1 s2 v i r).
- -
-Canonical Structure val_read_form A v x r j f :=
-  ValForm (@val_readR A v x j f r).
-Canonical Structure bnd_read_form A B s v x r j f :=
-  BndForm (@bnd_readR A B s v x j f r).
-Canonical Structure try_read_form A B s1 s2 v x r j f :=
-  TryForm (@try_readR A B s1 s2 v x j f r).
- -
-Canonical Structure val_write_form A B v w x r j f :=
-  ValForm (@val_writeR A B v w x j f r).
-Canonical Structure bnd_write_form A B C s v w x r j f :=
-  BndForm (@bnd_writeR A B C s v w x j f r).
- -
-Canonical Structure try_write_form A B C s1 s2 v w x r j f :=
-  TryForm (@try_writeR A B C s1 s2 v w x j f r).
- -
-Canonical Structure val_alloc_form A v i r :=
-  ValForm (@val_allocR A v i r).
-Canonical Structure bnd_alloc_form A B s v i r :=
-  BndForm (@bnd_allocR A B s v i r).
-Canonical Structure try_alloc_form A B s1 s2 v i r :=
-  TryForm (@try_allocR A B s1 s2 v i r).
- -
-Canonical Structure val_allocb_form A v n i r :=
-  ValForm (@val_allocbR A v n i r).
-Canonical Structure bnd_allocb_form A B s v n i r :=
-  BndForm (@bnd_allocbR A B s v n i r).
-Canonical Structure try_allocb_form A B s1 s2 v n i r :=
-  TryForm (@try_allocbR A B s1 s2 v n i r).
- -
-Canonical Structure val_dealloc_form A v x r j f :=
-  ValForm (@val_deallocR A v x j f r).
-Canonical Structure bnd_dealloc_form A B s v x r j f :=
-  BndForm (@bnd_deallocR A B s v x j f r).
-Canonical Structure try_dealloc_form A B s1 s2 v x r j f :=
-  TryForm (@try_deallocR A B s1 s2 v x j f r).
- -
-(* we still keep one tactic to kill final goals, which *)
-(* are usually full of existentials *)
-Ltac vauto := (do ?econstructor=>//).
- -
-Example ex_read x :
-  verify (bind_s (write_s x 4) (fun _=> read_s _ x))
-         (x :-> 0) (fun r _ => r = Val 4).
-by do 2! [apply: hstep].
-Abort.
- -
-Example ex_val_do (s : spec nat) (r : cont nat) (x y : ptr) :
-         s.1 (y:->2) ->
-         (forall x' m,
-               s.2 (Val x') (y:->2) m -> def (x:->1:+m) -> r (Val x') (x:->1:+m)) ->
-         (forall e m,
-               s.2 (Exn e) (y:->2) m -> def (x:->1:+m) -> r (Exn e) (x:->1:+m)) ->
-         verify s (x:->1 :+ y:->2) r.
-move=>H1 H2 H3.
-apply: (val_doR _ (i:=y:->2))=>//=.
-Abort.
- -
-Example ex_bwd i x1 x2 (e : unit -> spec nat) q:
-          verify (e tt) (i :+ (x1 :-> 1 :+ x2 :-> 4)) q ->
-          verify (bind_s (write_s x2 4) e) (i :+ (x1 :-> 1 :+ x2 :-> 2)) q.
-by move=>H; apply: bnd_writeR.
-Abort.
- -
-Example ex_fwd i x1 x2 (e : unit -> spec nat) q:
-          verify (e tt) (i :+ (x1 :-> 1 :+ x2 :-> 4)) q ->
-          verify (bind_s (write_s x2 4) e) (i :+ (x1 :-> 1 :+ x2 :-> 2)) q.
-move=>H.
-apply: (bnd_writeR (x:=x2) H).
-Abort.
- -
-
-
- -
- - - diff --git a/docs/LemmaOverloading.stmod.html b/docs/LemmaOverloading.stmod.html deleted file mode 100644 index cb01d09..0000000 --- a/docs/LemmaOverloading.stmod.html +++ /dev/null @@ -1,790 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.stmod

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq.
-From LemmaOverloading
-Require Import prelude heaps rels hprop domains.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(* Exceptions are an equality type *)
-Inductive exn : Type := exn_from_nat : nat -> exn.
- -
-Definition exn_to_nat (e : exn) : nat :=
-  let: exn_from_nat y := e in y.
- -
-Definition eqexn (e1 e2 : exn) : bool :=
-  match e1, e2 with exn_from_nat m, exn_from_nat n => m == n end.
- -
-Lemma eqexnP : Equality.axiom eqexn.
-Proof.
-move=>[x][y]//=; case: eqP=>[->|*];constructor=>//.
-by move=>[*].
-Qed.
- -
-Canonical Structure exn_eqMixin := EqMixin eqexnP.
-Canonical Structure exn_eqType := EqType exn exn_eqMixin.
- -
-(* Answer type *)
-Inductive ans (A : Type) : Type := Val of A | Exn of exn.
-Arguments Exn [A].
- -
-Notation pre := (Pred heap).
-Notation post A := (ans A -> heap -> heap -> Prop).
-Definition spec B := pre * post B : Type.
- -
-(********************************)
-(* Definition of the Hoare type *)
-(********************************)
- -
-Definition defed (P : Pred heap) : Pred heap :=
-  fun i => i \In P /\ def i.
- -
-Notation ideald P := (ideal (defed P)).
- -
-Section BasePrograms.
-Variables (A : Type) (P : Pred heap).
- -
-Lemma singleP i : i \In defed P -> this i <== defed P.
-Proof. by move=>[pf1 pf2] h <-; split. Qed.
- -
-Definition single i (pf : i \In defed P) := Ideal (singleP pf).
- -
-Lemma bound (p : ideald P) i : i \In id_val p -> i \In defed P.
-Proof. by case: p=>p H; case/H. Qed.
- -
-(* we carve out the model out of the following base type *)
-Definition prog := ideald P -> ans A -> Pred heap.
- -
-(* we take progs with only special properties *)
-(* which we defined next *)
- -
-(* coherence is continuity stated with *)
-(* directed sets instead of chains *)
-Definition coherent (e : prog) :=
-  forall p x m,
-    m \In e p x <-> exists i, exists pf : i \In id_val p,
-                    m \In e (single (bound pf)) x.
- -
-(* defined heaps map to defined heaps *)
-Definition def_strict (e : prog) := forall p x, Undef \Notin e p x.
- -
-(* set of program runs *)
-Definition runs_of (e : prog) : Pred (heap * ans A * heap) :=
-  fun r => exists pf : r.1.1 \In defed P, r.2 \In e (single pf) r.1.2.
- -
-End BasePrograms.
- -
-Definition has_spec A (s : spec A) :=
-  [Pred c : prog A s.1 |
-     forall i y m, (i, y, m) \In runs_of c -> s.2 y i m].
- -
-Section STDef.
-Variables (A : Type) (s : spec A).
- -
-Structure ST := STprog {
-  model : prog A s.1;
-  _ : coherent model;
-  _ : def_strict model;
-  _ : model \In has_spec s}.
- -
-Lemma modelE (e1 e2 : ST) : e1 = e2 <-> model e1 = model e2.
-Proof.
-move: e1 e2=>[e1 M1 S1 H1][e2 M2 S2 H2] /=; split=>[[//]|E].
-rewrite E in M1 S1 H1 *.
-by congr STprog; apply: proof_irrelevance.
-Qed.
- -
-(* poset structure on ST *)
- -
-Definition st_leq e1 e2 := model e1 <== model e2.
- -
-Lemma st_refl e : st_leq e e.
-Proof. by []. Qed.
- -
-Lemma st_asym e1 e2 : st_leq e1 e2 -> st_leq e2 e1 -> e1 = e2.
-Proof.
-move: e1 e2=>[e1 M1 S1 H1][e2 M2 S2 H2]; rewrite /st_leq /= => E1 E2.
-rewrite (poset_asym E1 E2) in M1 M2 S1 S2 H1 H2 *; congr STprog;
-by apply: proof_irrelevance.
-Qed.
- -
-Lemma st_trans e1 e2 e3 : st_leq e1 e2 -> st_leq e2 e3 -> st_leq e1 e3.
-Proof.
-move: e1 e2 e3=>[e1 M1 S1 H1][e2 M2 S2 H2][e3 M3 S3 H3].
-by apply: poset_trans.
-Qed.
- -
-Definition st_bot' := bot : [poset of prog A s.1].
- -
-Lemma st_bot_coherent : coherent st_bot'.
-Proof. by move=>r x m; split=>//; case=>i []. Qed.
- -
-Lemma st_bot_dstrict : def_strict st_bot'.
-Proof. by move=>r x. Qed.
- -
-Lemma st_bot_has_spec : st_bot' \In has_spec s.
-Proof. by move=>i y m [/= H][]. Qed.
- -
-Definition st_bot := STprog st_bot_coherent st_bot_dstrict st_bot_has_spec.
- -
-Lemma st_botP e : st_leq st_bot e.
-Proof. by case: e=>*; apply: botP. Qed.
- -
-Definition stPosetMixin := PosetMixin st_botP st_refl st_asym st_trans.
-Canonical stPoset := Eval hnf in Poset ST stPosetMixin.
- -
-(* lattice structure on ST *)
- -
-Definition st_sup' (u : Pred ST) :=
-  sup [Pred p | exists e, p = model e /\ e \In u].
- -
-Lemma st_sup_coherent u : coherent (st_sup' u).
-Proof.
-move=>r x m; split.
-- case=>_ [[_]][[_]][[_]][[]][p] M S H [->] P -> -> -> /=.
-  case/M=>i [pf] H1.
-  exists i; exists pf; exists (p (single (bound pf)) x m).
-  split=>//; do 3![eexists _; split=>//].
-  by exists (STprog M S H).
-case=>i [pf][_][[_]][[_]][[_]][[]][p] M D H [->] P -> -> -> /= E.
-have: exists i, exists pf : i \In id_val r, m \In p (single (bound pf)) x.
-- by exists i; exists pf.
-move/M=>H3; exists (p r x m); split=>//; do 3![eexists _; split=>//].
-by exists (STprog M D H).
-Qed.
- -
-Lemma st_sup_dstrict u : def_strict (st_sup' u).
-Proof.
-by move=>p x [_][[_]][[_]][[_]][[]][r] M D H [->] P -> -> -> /=; move/D.
-Qed.
- -
-Lemma st_sup_has_spec u : st_sup' u \In has_spec s.
-Proof.
-move=>i y m [/= D].
-case=>_ [[_]][[_]][[_]][[]][p] M S H [->] P -> -> -> /= R.
-by apply: (H); exists D.
-Qed.
- -
-Definition st_sup u :=
-  STprog (@st_sup_coherent u) (@st_sup_dstrict u) (@st_sup_has_spec u).
- -
-Lemma st_supP (u : Pred ST) e : e \In u -> st_leq e (st_sup u).
-Proof. by case: e=>p M S H R; apply: supP; exists (STprog M S H). Qed.
- -
-Lemma st_supM (u : Pred ST) e :
-        (forall e1, e1 \In u -> st_leq e1 e) -> st_leq (st_sup u) e.
-Proof. by case: e=>p M S H R; apply: supM=>y [q][->]; apply: R. Qed.
- -
-Definition stLatticeMixin := LatticeMixin st_supP st_supM.
-Canonical stLattice := Lattice ST stLatticeMixin.
- -
-(* In proofs, we keep goals in form (i, x, m) \In runs_of (model e). *)
-(* We need a couple of lemmas about this form. *)
- -
-Lemma bot_runs : runs_of (model st_bot) =p Pred0.
-Proof. by move=>r; split=>//; case. Qed.
- -
-Lemma model_runs p y m (e : ST) :
-        m \In model e p y <->
-        exists i, i \In id_val p /\ (i, y, m) \In runs_of (model e).
-Proof.
-case: e=>mod M S H; rewrite M; split; case=>i [H1] H2.
-- by exists i; split=>//; exists (bound H1).
-exists i; exists H1; case: H2 =>/= H2.
-by rewrite (proof_irrelevance H2 (bound H1)).
-Qed.
- -
-Lemma def_runs i y m (e : ST) :
-        (i, y, m) \In runs_of (model e) -> [/\ def i, i \In s.1 & def m].
-Proof.
-case=>[[/= P D]] R; split=>//.
-by case: e R=>p M S H; case: m=>//; move/S.
-Qed.
- -
-Lemma spec_runs i y m (e : ST) :
-        (i, y, m) \In runs_of (model e) -> s.2 y i m.
-Proof. by case: e=>p M S; apply. Qed.
- -
-End STDef.
- -
-Arguments spec_runs {A s i y m}.
-Prenex Implicits bot_runs model_runs def_runs.
- -
-(************************************)
-(* modeling the language primitives *)
-(************************************)
- -
-Module Model.
- -
-(* recursion *)
-Section Fix.
-Variables (A : Type) (B : A -> Type) (s : forall x, spec (B x)).
-Notation tp := (forall x, ST (s x)).
-Notation lat := (dfunLattice (fun x => [lattice of ST (s x)])).
-Variable (f : tp -> tp).
- -
-(* we take a fixpoint not of f, but of its monotone completion f' *)
-(* should eventually prove that f' is monotone *)
- -
-Definition f' (e : lat) :=
-  sup [Pred t : lat | exists e', e' <== e /\ t = f e'].
- -
-Definition ffix : tp := tarski_lfp f'.
- -
-End Fix.
- -
-Section Return.
-Variables (A : Type) (x : A).
- -
-Definition ret_s : spec A :=
-  (fun i => True, fun y i m => m = i /\ y = Val x).
- -
-Definition ret_sp (p : ideald ret_s.1) y m :=
-  m \In id_val p /\ y = Val x.
- -
-Lemma ret_coherent : coherent ret_sp.
-Proof.
-move=>p y m; split; first by case=>H ->{y}; exists m; exists H.
-by case=>i [H1] [<-{m}] ->{y}.
-Qed.
- -
-Lemma ret_dstrict : def_strict ret_sp.
-Proof. by case=>p H y /= []; case/H. Qed.
- -
-Lemma ret_has_spec : ret_sp \In has_spec ret_s.
-Proof. by move=>i y m; case=>/= T [-> ->]. Qed.
- -
-Definition ret := STprog ret_coherent ret_dstrict ret_has_spec.
- -
-End Return.
- -
-Section Throw.
-Variables (A : Type) (e : exn).
- -
-Definition throw_s : spec A :=
-  (fun i => True, fun y i m => m = i /\ y = Exn e).
- -
-Definition throw_sp (p : ideald throw_s.1) y m :=
-  m \In id_val p /\ y = @Exn A e.
- -
-Lemma throw_coherent : coherent throw_sp.
-Proof.
-move=>p y m; split; first by case=>H ->{y}; exists m; exists H.
-by case=>i [H1] [<-{m}] ->{y}.
-Qed.
- -
-Lemma throw_dstrict : def_strict throw_sp.
-Proof. by case=>p H y /= []; case/H. Qed.
- -
-Lemma throw_has_spec : throw_sp \In has_spec throw_s.
-Proof. by move=>i y m; case=>/= T [-> ->]. Qed.
- -
-Definition throw := STprog throw_coherent throw_dstrict throw_has_spec.
- -
-End Throw.
- -
-Section Bind.
-Variables (A B : Type).
-Variables (s1 : spec A) (s2 : A -> spec B).
-Variables (e1 : ST s1) (e2 : forall x, ST (s2 x)).
- -
-Definition bind_pre : pre :=
-  fun i => s1.1 i /\ forall x m, s1.2 (Val x) i m -> (s2 x).1 m.
-Definition bind_post : post B :=
-  fun y i m => (exists x, exists h, s1.2 (Val x) i h /\ (s2 x).2 y h m) \/
-               (exists e, y = Exn e /\ s1.2 (Exn e) i m).
-Definition bind_s := (bind_pre, bind_post).
- -
-Definition bind_sp (p : ideald bind_s.1) y m :=
-   exists i, exists x, exists h, i \In id_val p /\
-     (i, x, h) \In runs_of (model e1) /\
-     match x with
-       Val x' => (h, y, m) \In runs_of (model (e2 x'))
-     | Exn e => y = Exn e /\ m = h
-     end.
- -
-Lemma bind_coherent : coherent bind_sp.
-Proof.
-case=>p H y m; split.
-- case=>i [x][h][/= H1][H2] H3.
-  by exists i; exists H1; exists i; exists x; exists h.
-case=>i [/= H1][_][x][h][<-][T1 T2].
-by exists i; exists x; exists h.
-Qed.
- -
-Lemma bind_dstrict : def_strict bind_sp.
-Proof.
-move=>p y [i][x][h][H1][].
-case: x=>[x'|e] H2; first by case/def_runs.
-by case=>_ E; case/def_runs: H2; rewrite -E.
-Qed.
- -
-Lemma bind_has_spec : bind_sp \In has_spec bind_s.
-Proof.
-move=>i y m.
-case=>[[[/= S1 S2]]] D [h][x][j][<-][].
-case: x=>[x|e] T1; last first.
-- case=>->->; right; exists e; split=>//.
-  by apply: spec_runs T1.
-move=>T2; left; exists x; exists j.
-by split; [apply: spec_runs T1 | apply: spec_runs T2].
-Qed.
- -
-Definition bind := STprog bind_coherent bind_dstrict bind_has_spec.
- -
-End Bind.
- -
-Section Try.
-Variables (A B : Type) (s : spec A) (s1 : A -> spec B) (s2 : exn -> spec B).
-Variables (e : ST s) (e1 : forall x, ST (s1 x)) (e2 : forall x, ST (s2 x)).
- -
-Definition try_pre : pre :=
-  fun i => s.1 i /\ (forall y m, s.2 (Val y) i m -> (s1 y).1 m) /\
-                     forall e m, s.2 (Exn e) i m -> (s2 e).1 m.
-Definition try_post : post B :=
-  fun y i m => (exists x, exists h, s.2 (Val x) i h /\ (s1 x).2 y h m) \/
-               (exists e, exists h, s.2 (Exn e) i h /\ (s2 e).2 y h m).
-Definition try_s := (try_pre, try_post).
- -
-Definition try_sp (p : ideald try_s.1) y m :=
-   exists i, exists x, exists h, i \In id_val p /\
-     (i, x, h) \In runs_of (model e) /\
-     match x with
-       Val x' => (h, y, m) \In runs_of (model (e1 x'))
-     | Exn e => (h, y, m) \In runs_of (model (e2 e))
-     end.
- -
-Lemma try_coherent : coherent try_sp.
-Proof.
-case=>p H y m; split.
-- case=>i [x][h][/= H1][H2] H3.
-  by exists i; exists H1; exists i; exists x; exists h.
-case=>i [/= H1][_][x][h][<-][T1 T2].
-by exists i; exists x; exists h.
-Qed.
- -
-Lemma try_dstrict : def_strict try_sp.
-Proof.
-move=>p y [i][x][h][H1][].
-by case: x=>[x'|e'] H2; case/def_runs.
-Qed.
- -
-Lemma try_has_spec : try_sp \In has_spec try_s.
-Proof.
-move=>i y m; case=>[[[/= S1 [S2 S3]]]] D [h][x][j][<-][].
-case: x=>[x'|e'] T1 T2; [left; exists x' | right; exists e'];
-exists j; by split; [apply: spec_runs T1 | apply: spec_runs T2].
-Qed.
- -
-Definition try := STprog try_coherent try_dstrict try_has_spec.
- -
-End Try.
- -
-Definition conseq A (s1 s2 : spec A) :=
-  forall i, s2.1 i -> def i ->
-    s1.1 i /\ forall y m, s1.2 y i m -> def m -> s2.2 y i m.
- -
-Lemma conseq_refl (A : Type) (s : spec A) : conseq s s.
-Proof. by []. Qed.
- -
-Hint Resolve conseq_refl : core.
- -
-Section Consequence.
-Variables (A : Type) (s1 s2 : spec A) (e : ST s1) (pf : conseq s1 s2).
- -
-Definition do_sp (p : ideald s2.1) y m :=
-  exists i, i \In id_val p /\ (i, y, m) \In runs_of (model e).
- -
-Lemma do_coherent : coherent do_sp.
-Proof.
-case=>q H y m; split.
-- by case=>i [/= H1 T1]; exists i; exists H1; exists i.
-by case=>i [/= H1][_][<-] T1; exists i.
-Qed.
- -
-Lemma do_dstrict : def_strict do_sp.
-Proof. by move=>q y [h][/= H]; case/def_runs. Qed.
- -
-Lemma do_has_spec : do_sp \In has_spec s2.
-Proof.
-move=>i y m [[/= S1 D1]][_][<-] T; case/def_runs: (T)=>_ S2 D2.
-by apply: (proj2 (pf S1 D1)) D2; apply: spec_runs T.
-Qed.
- -
-Definition Do := STprog do_coherent do_dstrict do_has_spec.
- -
-End Consequence.
- -
-Section Read.
-Variable (A : Type) (x : ptr).
- -
-Definition read_s : spec A :=
-  (fun i => x \in dom i /\ exists v:A, look x i = dyn v,
-   fun y i m => m = i /\ forall v, look x i = dyn v -> y = Val v).
- -
-Definition read_sp (p : ideald read_s.1) (v : ans A) m :=
-  m \In id_val p /\ exists w, v = Val w /\ look x m = dyn w.
- -
-Lemma read_coherent : coherent read_sp.
-Proof.
-move=>p v m; split; last first.
-- by case=>i [H1][<-][w][->]; split=>//; exists w.
-case=>H1 [w][->] H2.
-by exists m; exists H1; split=>//; exists w.
-Qed.
- -
-Lemma read_dstrict : def_strict read_sp.
-Proof. by case=>p H y []; case/H. Qed.
- -
-Lemma read_has_spec : read_sp \In has_spec read_s.
-Proof.
-move=>i y m [[[/= H1]]][v] H2 D [<-][w][->] H3.
-by split=>// b1; rewrite H3=>H; move:(dyn_inj H)=>->.
-Qed.
- -
-Definition read := STprog read_coherent read_dstrict read_has_spec.
- -
-End Read.
- -
-Section Write.
-Variable (A : Type) (x : ptr) (v : A).
- -
-Definition write_s : spec unit :=
-  (fun i => x \in dom i : Prop,
-   fun y i m => y = Val tt /\ upd i x (dyn v) = m).
- -
-Definition write_sp (p : ideald write_s.1) (y : ans unit) m :=
-  exists i, i \In id_val p /\ x \in dom i /\
-            y = Val tt /\ m = upd i x (dyn v).
- -
-Lemma write_coherent : coherent write_sp.
-Proof.
-move=>p y m; split; case=>i [H1].
-- by case=>H2 [->->]; exists i; exists H1; exists i.
-by case=>_ [<-][H2][->] ->; exists i.
-Qed.
- -
-Lemma write_dstrict : def_strict write_sp.
-Proof.
-case=>p H y [i] /= [H1][H2][H3].
-suff L: def (upd i x (dyn v)) by move=>H4; rewrite -H4 in L.
-by rewrite defU (dom_null H2) (dom_def H2).
-Qed.
- -
-Lemma write_has_spec : write_sp \In has_spec write_s.
-Proof. by move=>i y m [[/= H1 D1]][_][<-][H2][->] ->. Qed.
- -
-Definition write := STprog write_coherent write_dstrict write_has_spec.
- -
-End Write.
- -
-Section Allocation.
-Variables (A : Type) (v : A).
- -
-Definition alloc_s : spec ptr :=
-  (fun i => def i : Prop,
-   fun y i m => exists x, x != null /\ y = Val x /\ x \notin dom i /\
-                          upd i x (dyn v) = m).
- -
-Definition alloc_sp (p : ideald alloc_s.1) y m :=
-  exists i, i \In id_val p /\ exists l : ptr, y = Val l /\
-    m = i :+ l :-> v /\ l != null /\ l \notin dom i.
- -
-Lemma alloc_coherent : coherent alloc_sp.
-Proof.
-move=>p x m; split.
-- case=>i [H1][l][->][->][H2] H3.
-  by exists i; exists H1; exists i; split=>//; exists l.
-case=>i [H1][_][<-][l][->][->][H2] H3.
-by exists i; split=>//; exists l.
-Qed.
- -
-Lemma alloc_dstrict : def_strict alloc_sp.
-Proof.
-case=>p H y [m][/= H1][l][H2][H3][H4] H5; case/H: H1=>_ D.
-suff {H3}: def (m :+ l :-> v) by rewrite -H3.
-by rewrite unC defPtUn H4 D H5.
-Qed.
- -
-Lemma alloc_has_spec : alloc_sp \In has_spec alloc_s.
-Proof.
-move=>i y m [[/= H D]][_][<-][l][->][->][H1] H2.
-exists l; do !split=>//.
-rewrite (_ : i = i :+ empty); last by rewrite unh0.
-by rewrite updUnl (negbTE H2) unh0.
-Qed.
- -
-Definition alloc := STprog alloc_coherent alloc_dstrict alloc_has_spec.
- -
-End Allocation.
- -
-Section BlockAllocation.
-Variables (A : Type) (v : A) (n : nat).
- -
-Definition allocb_s : spec ptr :=
-  (fun i => def i : Prop,
-   fun y i m => exists r, y = Val r /\ m = i :+ updi r (nseq n v)).
- -
-Definition allocb_sp (p : ideald allocb_s.1) y m :=
-  exists i, i \In id_val p /\ y = Val (fresh i) /\
-            m = i :+ updi (fresh i) (nseq n v).
- -
-Lemma allocb_coherent : coherent allocb_sp.
-Proof.
-move=>p x m; split.
-- by case=>i [H1][->] ->; exists i; exists H1; exists i.
-by case=>i [H1][_][<-][->] ->; exists i.
-Qed.
- -
-Lemma allocb_dstrict : def_strict allocb_sp.
-Proof.
-case=>p H y [m][/= H1][_] H2; case/H: H1=>_ D.
-suff {H2}: def (m :+ updi (fresh m) (nseq n v)) by rewrite -H2.
-elim: n =>[|k IH]; first by rewrite /= unh0.
-rewrite (_ : nseq k.+1 v = rcons (nseq k v) v); last first.
-- by elim: {IH} k=>[|k IH] //=; rewrite -IH.
-rewrite updi_last unA unC defPtUn IH /=.
-rewrite ptr_null negb_and fresh_null /=.
-rewrite domUn !inE /= negb_and IH negb_or /=.
-by rewrite dom_fresh updimV negb_and fresh_null ltnn.
-Qed.
- -
-Lemma allocb_has_spec : allocb_sp \In has_spec allocb_s.
-Proof. by move=>i y m [[/= H D]][_][<-][->] ->; exists (fresh i). Qed.
- -
-Definition allocb := STprog allocb_coherent allocb_dstrict allocb_has_spec.
- -
-End BlockAllocation.
- -
-Section Deallocation.
-Variable x : ptr.
- -
-Definition dealloc_s : spec unit :=
-  (fun i => x \in dom i : Prop,
-   fun y i m => y = Val tt /\ free x i = m).
- -
-Definition dealloc_sp (p : ideald dealloc_s.1) (y : ans unit) m :=
-  exists i, i \In id_val p /\ y = Val tt /\ x \in dom i /\ m = free x i.
- -
-Lemma dealloc_coherent : coherent dealloc_sp.
-Proof.
-move=>p y m; split.
-- by case=>i [H1][->][H2] ->; exists i; exists H1; exists i.
-by case=>i [H1][_][<-][->][H2] ->; exists i.
-Qed.
- -
-Lemma dealloc_dstrict : def_strict dealloc_sp.
-Proof.
-case=>p H y [h][/=]; case/H=>_ H1 [H2][H3] H4.
-suff: def (free x h) by rewrite -H4.
-by rewrite defF.
-Qed.
- -
-Lemma dealloc_has_spec : dealloc_sp \In has_spec dealloc_s.
-Proof. by move=>i y m [[/= H1 D1]][_][<-][->][H2] ->. Qed.
- -
-Definition dealloc :=
-  STprog dealloc_coherent dealloc_dstrict dealloc_has_spec.
- -
-End Deallocation.
- -
-End Model.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.stsep.html b/docs/LemmaOverloading.stsep.html deleted file mode 100644 index 48df1b1..0000000 --- a/docs/LemmaOverloading.stsep.html +++ /dev/null @@ -1,584 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.stsep

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool ssrnat ssrfun seq eqtype.
-From LemmaOverloading
-Require Import heaps rels hprop stmod.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-Delimit Scope stsep_scope with stsep.
-Open Scope stsep_scope.
- -
-Definition lolli (p : _ -> Prop) q i m :=
-  forall i1 h, i = i1 :+ h -> def i -> p i1 ->
-    exists m1, m = m1 :+ h /\ def m /\ q i1 m1.
- -
-Notation "p '--o' q" := (lolli p q) (at level 75) : stsep_scope.
- -
-Lemma antiframe p q i m h :
-        def (i :+ h) -> (p --o q) (i :+ h) (m :+ h) -> (p --o q) i m.
-Proof.
-move=>D1 H i2 m2 E D2 H1; rewrite {i}E in H D1 D2 *.
-move: (H i2 (m2 :+ h)); rewrite unA; case/(_ (erefl _) D1 H1)=>h2 [E][D3].
-rewrite unA in E; exists h2; rewrite (unKhl D3 E).
-by rewrite E in D3; rewrite (defUnl D3).
-Qed.
- -
-(* p --o q is local *)
-Lemma locality p q i1 m h :
-        def (i1 :+ h) -> (p # top) i1 -> (p --o q) (i1 :+ h) m ->
-          exists m1, m = m1 :+ h /\ def m /\ (p --o q) i1 m1.
-Proof.
-move=>D [h1][h2][E][H1] _ H2; rewrite {i1}E in D H2 *.
-move: (H2 h1 (h2 :+ h)); rewrite unA; case/(_ (erefl _) D H1)=>m1 [E][D2].
-rewrite {m}E unA in H2 D2 *; exists (m1 :+ h2); do !split=>//.
-by apply: antiframe D H2.
-Qed.
- -
-Lemma fr_pre p i j : (p # top) i -> (p # top) (i :+ j).
-Proof.
-by case=>i1 [i2][->][H] _; rewrite -unA; exists i1; exists (i2 :+ j).
-Qed.
- -
-(********************)
-(* Separation monad *)
-(********************)
- -
-Definition fr A (s : spec A) : spec A :=
-  (s.1 # top, fun x => s.1 --o s.2 x).
- -
-Prenex Implicits fr.
- -
-Notation "[ s ]" := (fr s).
- -
-Definition STsep A (s : spec A) := ST [s].
- -
-Section SepReturn.
-Variable (A : Type) (x : A).
- -
-Definition ret_s : spec A := (emp, fun y i m => m = i /\ y = Val x).
- -
-Lemma retP : Model.conseq (Model.ret_s x) [ret_s].
-Proof.
-move=>i /= H1 D1; split=>// y m [->] -> _ i1 i2 -> D ->.
-by exists empty; rewrite un0h (defUnr D).
-Qed.
- -
-Definition ret := Model.Do (Model.ret x) retP.
- -
-End SepReturn.
- -
-Section SepBind.
-Variables (A B : Type) (s1 : spec A) (s2 : A -> spec B).
-Variables (e1 : STsep s1) (e2 : forall x, STsep (s2 x)).
- -
-Definition bind_s : spec B :=
-  (Model.bind_pre [s1] (fr \o s2), Model.bind_post [s1] (fr \o s2)).
- -
-Lemma bindP : Model.conseq (Model.bind_s [s1] (fr \o s2)) [bind_s].
-Proof.
-move=>i H D; split=>[|{H D}].
-- case: H D=>i1 [i2][->][[H S]] _ D.
-  split=>[|y m]; first by apply: fr_pre.
-  by case/(locality D H)=>m1 [->][_]; move/S; apply: fr_pre.
-move=>y m H _ i1 i2 E D1 [H1 S1]; rewrite {i}E in H D1 *.
-case: H=>[[x][h][]|[e][->]]; case/(locality D1 H1)=>h1 [->][D2] T2.
-- move/S1: (T2)=>H2; case/(locality D2 H2)=>m1 [->][D3] T3.
-  by exists m1; do !split=>//; left; exists x; exists h1.
-by exists h1; do !split=>//; right; exists e.
-Qed.
- -
-Definition bind : STsep bind_s := Model.Do (Model.bind e1 e2) bindP.
- -
-End SepBind.
- -
-Definition verify' A (s : spec A) i (r : ans A -> heap -> Prop) :=
-  def i -> s.1 i /\ forall y m, s.2 y i m -> def m -> r y m.
- -
-Notation verify s i r := (@verify' _ [s] i r).
- -
-Section SepFrame.
-Variables (A : Type) (s : spec A).
- -
-Lemma frame i j (r : ans A -> heap -> Prop) :
-        verify s i (fun y m => def (m :+ j) -> r y (m :+ j)) ->
-        verify s (i :+ j) r.
-Proof.
-move=>H D; case: (H (defUnl D))=>H1 H2.
-split=>[|y m]; first by apply: fr_pre.
-case/(locality D H1)=>m1 [->][D1]; move/H2.
-by apply; apply: defUnl D1.
-Qed.
- -
-Lemma frame0 i r : verify' s i r -> verify s i r.
-Proof.
-move=>H D; case: (H D)=>H1 H2.
-split=>[|y m]; first by exists i; exists empty; rewrite unh0.
-move/(_ i empty); rewrite unh0; case/(_ (erefl _) D H1)=>m1.
-by rewrite unh0=>[[<-]][_]; apply: H2.
-Qed.
- -
-Lemma frame1 i (r : ans A -> heap -> Prop) :
-        verify' s empty (fun y m => def (m :+ i) -> r y (m :+ i)) ->
-        verify s i r.
-Proof. by move=>H; rewrite -[i]un0h; apply: frame; apply: frame0. Qed.
- -
-End SepFrame.
- -
-Definition conseq A (s : spec A) (p : pre) (q : post A) :=
-  forall i, p i -> verify s i (fun y m => q y i m).
- -
-Local Notation conseq1 :=
-  (fun A (s1 s2 : spec A) =>
-     conseq s1 (let 'pair x _ := s2 in x)
-               (let 'pair _ x := s2 in x)).
- -
-Lemma conseq_refl A (s : spec A) : conseq1 A s s.
-Proof. by case: s=>s1 s2 i H; apply: frame0. Qed.
- -
-Hint Resolve conseq_refl : core.
- -
-Section SepConseq.
-Variables (A : Type) (s1 s2 : spec A) (e : STsep s1).
-Variables (pf : conseq1 A s1 s2).
- -
-Lemma doP : Model.conseq [s1] [s2].
-Proof.
-move=>i H D; split=>[|y m {H D} /=].
-- case: H D=>i1 [i2][->][H] _ D.
-  by case: (@pf i1 H (defUnl D))=>H1 _; apply: fr_pre.
-move=>S D i1 i2 E D2 H2; rewrite {i}E in D S D2 H2.
-case: (@pf i1 H2 (defUnl D2))=>H1 T1.
-case: (locality D2 H1 S)=>m1 [->][D3] {S}.
-by move/T1; move/(_ (defUnl D3))=>T2; exists m1.
-Qed.
- -
-Definition do' : STsep s2 := Model.Do e doP.
- -
-End SepConseq.
- -
-Notation "'Do' e" := (do' e _) (at level 80).
- -
-Section SepRead.
-Variables (A : Type) (x : ptr).
- -
-Definition read_s : spec A :=
-  (fun i => exists v : A, i = x :-> v,
-   fun y i m => i = m /\ forall v, i = x :-> v -> y = Val v).
- -
-Lemma readP : Model.conseq (Model.read_s A x) [read_s].
-Proof.
-move=>i H D; split=>[|{H D} y _ [->] H _ i1 h E1 D E2].
-- case: H D=>i1 [i2][->][[v]] -> _ D /=.
-  rewrite domPtUn inE /= D eq_refl; split=>//.
-  by exists v; rewrite lookPtUn.
-move: E1 E2 H D=>-> [v ->] H D; exists (x :-> v); do 3!split=>//.
-move=>w; move/(pts_inj (defUnl D))=><-; apply: H.
-by rewrite lookPtUn.
-Qed.
- -
-Definition read : STsep read_s := Model.Do (Model.read A x) readP.
- -
-End SepRead.
- -
-Section SepWrite.
-Variables (A : Type) (x : ptr) (v : A).
- -
-Definition write_s : spec unit :=
-  (fun i => exists B : Type, exists y : B, i = x :-> y,
-   fun y i m => y = Val tt /\ m = x :-> v).
- -
-Lemma writeP : Model.conseq (Model.write_s x v) [write_s].
-Proof.
-move=>i H D; split=>[|{H D} y m [->] <- D1 i1 h E1 D2 [B][w] E2].
-- case: H D=>i1 [i2][->][[B]][y] -> _ D /=.
-  by rewrite domPtUn inE /= D eq_refl.
-move: E1 E2 D1 D2=>->->-> D; exists (x :-> v).
-by rewrite updUnl domPt inE /= eq_refl (defPt_null D) /= updU eq_refl.
-Qed.
- -
-Definition write : STsep write_s := Model.Do (Model.write x v) writeP.
- -
-End SepWrite.
- -
-Section SepAlloc.
-Variables (A : Type) (v : A).
- -
-Definition alloc_s : spec ptr :=
-  (emp, fun y i m => exists x, y = Val x /\ m = x :-> v).
- -
-Lemma allocP : Model.conseq (Model.alloc_s v) [alloc_s].
-Proof.
-move=>i H D; split=>[|{H D} y m [x][H1][->][H2] <- D1 i1 h E1 D E2].
-- by case: H D=>i1 [i2][->][->].
-move: E1 E2 H2 D D1=>-> ->; rewrite {1 2}un0h=>H2 D D1.
-exists (x :-> v); rewrite updUnr (negbTE H2) defPtUn H1 H2 D.
-by do !split=>//; exists x.
-Qed.
- -
-Definition alloc : STsep alloc_s := Model.Do (Model.alloc v) allocP.
- -
-End SepAlloc.
- -
-Section SepBlockAlloc.
-Variables (A : Type) (v : A) (n : nat).
- -
-Definition allocb_s : spec ptr :=
-  (emp, fun y i m => exists x:ptr, y = Val x /\ m = updi x (nseq n v)).
- -
-Lemma allocbP : Model.conseq (Model.allocb_s v n) [allocb_s].
-Proof.
-move=>i H D; split=>[|y m].
-  by case: H D=>i1 [i2][->][->][]; rewrite unC.
-case=>x [->] -> D1 i1 h E1 D2 E2.
-move: E1 E2 D1 D2=>->->; rewrite un0h {2}unC=>D1 D2.
-by exists (updi x (nseq n v)); do !split=>//; exists x.
-Qed.
- -
-Definition allocb : STsep allocb_s := Model.Do (Model.allocb v n) allocbP.
- -
-End SepBlockAlloc.
- -
-Section SepDealloc.
-Variable x : ptr.
- -
-Definition dealloc_s : spec unit :=
-  (fun i => exists A : Type, exists v:A, i = x :-> v,
-   fun y i m => y = Val tt /\ m = empty).
- -
-Lemma deallocP : Model.conseq (Model.dealloc_s x) [dealloc_s].
-Proof.
-move=>i H D; split=>[|{H D} y m [->] <- D1 i1 h E1 D2 [A][v] E2].
-- case: H D=>i1 [i2][->][[A]][v]-> _ D /=.
-  by rewrite domPtUn inE /= D eq_refl.
-move: E1 E2 D1 D2=>->->->; rewrite defPtUn; case/and3P=>H1 _ H2.
-by exists empty; rewrite freeUnr // freeU eq_refl (negbTE H1) free0.
-Qed.
- -
-Definition dealloc : STsep dealloc_s := Model.Do (Model.dealloc x) deallocP.
- -
-End SepDealloc.
- -
-Section SepThrow.
-Variables (A : Type) (e : exn).
- -
-Definition throw_s : spec A :=
-  (emp, fun y i m => m = i /\ y = Exn e).
- -
-Lemma throwP : Model.conseq (Model.throw_s A e) [throw_s].
-Proof.
-move=>i H D; split=>{H D} // y m [->] -> _ i1 h -> D ->.
-by exists empty; rewrite un0h; do !split=>//; apply: defUnr D.
-Qed.
- -
-Definition throw : STsep throw_s := Model.Do (Model.throw A e) throwP.
- -
-End SepThrow.
- -
-Section SepTry.
-Variables (A B : Type) (s : spec A) (s1 : A -> spec B) (s2 : exn -> spec B).
-Variables (e : STsep s) (e1 : forall x, STsep (s1 x)).
-Variables (e2 : forall e, STsep (s2 e)).
- -
-Definition try_s : spec B :=
-  (Model.try_pre [s] (fr \o s1) (fr \o s2),
-   Model.try_post [s] (fr \o s1) (fr \o s2)).
- -
-Lemma tryP : Model.conseq (Model.try_s [s] (fr \o s1) (fr \o s2)) [try_s].
-Proof.
-move=>i H D; split=>[|{H D} y m H1 D1 i1 h E1 D2 /= [H2][H3] H4].
-- case: H D=>i1 [i2][->][[H [S1 S2]]] _ D.
-  split; first by apply: fr_pre.
-  split=>y m; case/(locality D H)=>m1 [->][_]; [move/S1 | move/S2];
-  by apply: fr_pre.
-rewrite {i}E1 /= in H1 D2.
-case: H1=>[[x]|[x]][h1][];
-case/(locality D2 H2)=>m1 [->][D3] T1; move: (T1);
-[move/H3 | move/H4]=>T'; case/(locality D3 T')=>m2 [->][D4] T2;
-exists m2; do 2!split=>//; [left | right];
-by exists x; exists m1.
-Qed.
- -
-Definition try : STsep try_s := Model.Do (Model.try e e1 e2) tryP.
- -
-End SepTry.
- -
-Section SepFix.
-Variables (A : Type) (B : A -> Type) (s : forall x, spec (B x)).
-Notation tp := (forall x, STsep (s x)).
- -
-Definition Fix (f : tp -> tp) : tp := Model.ffix f.
- -
-End SepFix.
- -
-(* Conditionals for various types *)
- -
-Section CondBool.
-Variables (A : Type) (b : bool) (s1 s2 : spec A).
- -
-Program
-Definition If (e1 : STsep s1) (e2 : STsep s2) : STsep (if b then s1 else s2) :=
-  match b with true => Do e1 | false => Do e2 end.
- -
-End CondBool.
- -
-Section CondOption.
-Variable (A B : Type) (x : option A) (s1 : spec B) (s2 : A -> spec B).
- -
-Program
-Definition Match_opt (e1 : STsep s1) (e2 : forall v, STsep (s2 v)) :
-             STsep (match x with Some v => s2 v | None => s1 end) :=
-  match x with Some v => Do (e2 v) | None => Do e1 end.
- -
-End CondOption.
- -
-Section CondDecide.
-Variable (A : Type) (p1 p2 : Prop) (b : {p1} + {p2})
-         (s1 : p1 -> spec A) (s2 : p2 -> spec A).
- -
-Program
-Definition Match_dec (e1 : forall x, STsep (s1 x))
-                     (e2 : forall x, STsep (s2 x)) :
-             STsep (match b with left x => s1 x | right x => s2 x end) :=
-  match b with left x => Do (e1 x) | right x => Do (e2 x) end.
- -
-End CondDecide.
- -
-Section CondNat.
-Variable (A : Type) (n : nat) (s1 : spec A) (s2 : nat -> spec A).
- -
-Program
-Definition Match_nat (e1 : STsep s1) (e2 : forall n, STsep (s2 n)) :
-             STsep (match n with 0 => s1 | m.+1 => s2 m end) :=
-  match n with 0 => Do e1 | m.+1 => Do (e2 m) end.
- -
-End CondNat.
- -
-Section CondSeq.
-Variable (A B : Type) (s : seq A) (s1 : spec B) (s2 : A -> seq A -> spec B).
- -
-Program
-Definition Match_seq (e1 : STsep s1) (e2 : forall hd tl, STsep (s2 hd tl)) :
-             STsep (match s with [::] => s1 | hd::tl => s2 hd tl end) :=
-  match s with [::] => Do e1 | hd::tl => Do (e2 hd tl) end.
- -
-End CondSeq.
- -
-(******************************************)
-(* Lemmas for pulling out ghost variables *)
-(******************************************)
- -
-Section Ghosts.
-Variables (A : Type) (s : spec A) (p : pre).
- -
-Lemma allC (B1 B2 : Type) (q : B1 -> B2 -> post A) :
-       conseq s p (fun y i m => forall x1 x2, q x1 x2 y i m) <->
-       conseq s p (fun y i m => forall x, q x.1 x.2 y i m).
-Proof.
-split=>H1 i H2 D1; case: (H1 i H2 D1)=>S1 S2.
-- by split=>// y m H D [x1 x2]; apply: S2.
-by split=>// y m H D x1 x2; apply: (S2 y m H D (x1, x2)).
-Qed.
- -
-Lemma impC (B : Type) (q1 q2 : heap -> B -> Prop) (r : B -> post A) :
-        conseq s p (fun y i m => forall x, q1 i x -> q2 i x -> r x y i m) <->
-        conseq s p (fun y i m => forall x, q1 i x /\ q2 i x -> r x y i m).
-Proof.
-split=>H1 i H2 D1; case: (H1 i H2 D1)=>S1 S2.
-- by split=>// y m H D x []; apply: S2.
-by split=>// *; apply: S2.
-Qed.
- -
-Lemma ghE (B : Type) (q : heap -> B -> Prop) (r : B -> post A) :
-        (forall i, p i -> def i -> exists x, q i x) ->
-        (forall i x, q i x -> p i -> def i ->
-           verify s i (fun y m => r x y i m)) ->
-        conseq s p (fun y i m => forall x, q i x -> r x y i m).
-Proof.
-move=>H1 H2 i H3 D1; case: (H1 i H3 D1)=>x H4.
-case: (H2 i x H4 H3 D1 D1)=>H5 _; split=>// y m H6 D2 z H7.
-by case: (H2 i z H7 H3 D1 D1)=>_; apply.
-Qed.
- -
-End Ghosts.
- -
-Definition gh := (allC, impC).
- -
-Notation "x '<--' c1 ';' c2" := (bind c1 (fun x => c2))
-  (at level 78, right associativity) : stsep_scope.
-Notation "c1 ';;' c2" := (bind c1 (fun _ => c2))
-  (at level 78, right associativity) : stsep_scope.
-Notation "'!' x" := (read _ x) (at level 50) : stsep_scope.
-Notation "e1 '::=' e2" := (write e1 e2) (at level 60) : stsep_scope.
-Notation "'throw' [ t ] E" := (throw t E)
-  (at level 70, no associativity) : stsep_scope.
-Notation "'ttry' E 'then' [ r ] E1 'else' [ x ] E2" :=
-  (try E (fun r => E1) (fun x => E2)) (at level 80) : stsep_scope.
-Notation "'ttry' E 'then' [ r ] E1 'else' E2" :=
-  (try E (fun r => E1) (fun _ => E2)) (at level 80) : stsep_scope.
-Notation "'ttry' E 'then' E1 'else' [ x ] E2" :=
-  (try E (fun _ => E1) (fun x => E2)) (at level 80) : stsep_scope.
-Notation "'ttry' E 'then' E1 'else' E2" :=
-  (try E (fun _ => E1) (fun _ => E2)) (at level 80) : stsep_scope.
-Notation "'match_opt' E 'then' E1 'else' [ x ] E2" :=
-  (Match_opt E E1 (fun x => E2)) (at level 80) : stsep_scope.
-Notation "'match_opt' E 'then' E1 'else' [ x ] E2" :=
-  (Match_opt E E1 (fun x => E2)) (at level 80) : stsep_scope.
-Notation "'If' E 'then' E1 'else' E2" :=
-  (If E E1 E2) (at level 80) : stsep_scope.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.terms.html b/docs/LemmaOverloading.terms.html deleted file mode 100644 index 00fa27a..0000000 --- a/docs/LemmaOverloading.terms.html +++ /dev/null @@ -1,627 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.terms

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrbool ssrnat ssrfun eqtype seq.
-From LemmaOverloading
-Require Import prelude prefix perms heaps.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(**************************************************************************)
-(*                  Syntactic cancelation of heaps                        *)
-(**************************************************************************)
- -
-(* Differences w.r.t. the paper:
-
-In the paper we described the cancellation algorithm as producing a
-proposition. Instead, it will produce a sequence of "facts" which are
-later on evaluated into a proposition. We did this in order to further
-simplify the proposition. Each fact is of the form t1 = t2, where t1
-and t2 are heaps, pointers, or values.
-
-Another simplification we made in the paper is that the values contained
-in a heap are actually instances of a generic type 'dynamic'. This type
-is defined in the file heaps.v, and is just a structure containing a
-value and its type. So, instead of equating values, we are equating dynamics,
-therefore we need some extra step to prove the values are equal
-(see the examples at the bottom of the file). This can be avoided
-with extra canonical structures machinery.
-*)

- -
-(***************************)
-(* interpretation contexts *)
-(***************************)
- -
-Structure ctx := Context {heap_ctx : seq heap; ptr_ctx : seq ptr}.
- -
-Definition empc := Context [::] [::].
- -
-Definition subctx i j :=
-  prefix (heap_ctx i) (heap_ctx j) /\ prefix (ptr_ctx i) (ptr_ctx j).
- -
-Lemma subctx_refl i: subctx i i.
-Proof. by []. Qed.
- -
-Lemma subctx_trans j i k :
-        subctx i j -> subctx j k -> subctx i k.
-Proof.
-move=>[H1 P1][H2 P2].
-by split; [move: H2|move: P2]; apply: prefix_trans.
-Qed.
- -
-(**************************************************************************)
-(*                            Syntactic heaps                             *)
-(* Pointers and heap variables are syntactified as indices in the context *)
-(* Disjoint union is syntactified as concatenation of lists               *)
-(**************************************************************************)
- -
-Inductive elem := Pts of nat & dynamic | Var of nat.
-Definition synheap := seq elem.
- -
-(*****************************************************************************)
-(* Validity of indices:                                                      *)
-(*   valid i t  iif all the indices in t are in bounds of the contexts lists *)
-(*****************************************************************************)
- -
-Fixpoint valid_ptrs i t :=
-  match t with
-    Pts sx _ :: s => (sx < size (ptr_ctx i)) && valid_ptrs i s
-  | Var _ :: s => valid_ptrs i s
-  | _ => true
-  end.
- -
-Fixpoint valid_heaps i t :=
-  match t with
-    Pts _ _ :: s => valid_heaps i s
-  | Var v :: s => (v < size (heap_ctx i)) && valid_heaps i s
-  | _ => true
-  end.
- -
-Definition valid i t := valid_ptrs i t && valid_heaps i t.
- -
-Lemma valid_cons i e t : valid i (e :: t) = valid i [:: e] && valid i t.
-Proof.
-case: e=>[x d|v] /=; rewrite /valid /=;
-by [rewrite !andbT andbA | rewrite andbT andbCA].
-Qed.
- -
-Lemma valid_ptrs_cat j t1 t2 :
-        valid_ptrs j (t1 ++ t2) = valid_ptrs j t1 && valid_ptrs j t2.
-Proof.
-elim: t1 t2=>[//|v t1 IH /=] t2.
-by case: v=>[x d | v]; rewrite IH // andbA.
-Qed.
- -
-Lemma valid_heaps_cat j t1 t2 :
-        valid_heaps j (t1 ++ t2) = valid_heaps j t1 && valid_heaps j t2.
-Proof.
-elim: t1 t2=>[//|v t1 IH /=] t2.
-by case: v=>[x d | v]; rewrite IH // andbA.
-Qed.
- -
-Lemma valid_cat j t1 t2 : valid j (t1 ++ t2) = valid j t1 && valid j t2.
-Proof.
-rewrite /valid valid_ptrs_cat valid_heaps_cat.
-by rewrite -!andbA -!(andbCA (valid_ptrs j t2)).
-Qed.
- -
-Lemma valid_subctx i j t : subctx i j -> valid i t -> valid j t.
-Proof.
-case: i j=>hs1 xs1 [hs2 xs2][/= P1 P2].
-elim: t=>[//|e t IH]; rewrite -cat1s 2!valid_cat.
-case/andP=>H; move/IH=>->.
-case: e H=>[x d| v]; rewrite /valid /= !andbT => H; apply: leq_trans H _;
-by [apply: (prefix_size P2) | apply: (prefix_size P1)].
-Qed.
- -
-(*************************************)
-(* interpretation of syntactic heaps *)
-(*************************************)
- -
-(* lookup functions for heaps and pointers *)
-Definition hlook := [fun i => onth (heap_ctx i)].
-Definition plook := [fun i => onth (ptr_ctx i)].
- -
-(* notation for lookups with default *)
-Notation plook' i x := (odflt null (plook i x)).
- -
-(* interpretation function for elements *)
-Definition einterp i e :=
-  match e with
-    Pts x d =>
-      if plook i x is Some x'
-        then x' :-> Dyn.val d
-      else Undef
-  | Var h => if hlook i h is Some h' then h' else Undef
-  end.
- -
-(* main interpretation function *)
-Fixpoint interp i t :=
-  if t is e :: t' then
-    if t' is [::] then einterp i e else einterp i e :+ interp i t'
-  else empty.
- -
-Lemma interp_cons i e t : interp i (e :: t) = einterp i e :+ interp i t.
-Proof. by case:t=>//; rewrite unh0. Qed.
- -
-Lemma interp_cat i t1 t2 : interp i (t1 ++ t2) = interp i t1 :+ interp i t2.
-Proof.
-elim:t1 t2=>[/=|e t1 IH] t2; first by rewrite un0h.
-by rewrite cat_cons !interp_cons IH unA.
-Qed.
- -
-Lemma interp_perm i : forall t1 t2, perm t1 t2 -> interp i t1 = interp i t2.
-Proof.
-apply: perm_ind=>[s1 s2 ->-> //|t1 t2 x t1' t2' ->->|x y t1' t2' t ->->|x y t].
-- by rewrite 2!interp_cons=>_ ->.
-- by rewrite !interp_cons unCA.
-by move=>_ -> _ ->.
-Qed.
- -
-Lemma interp_subctx j k t: valid j t -> subctx j k -> interp j t = interp k t.
-Proof.
-move=>I [S1 S2]; elim:t I=>[//|e t IH].
-rewrite 2!interp_cons valid_cons; case/andP=>H1.
-move/IH=>->; case: e H1=>[x d|v] /=;
-rewrite /valid /= !andbT; move/prefix_onth;
-by [move/(_ _ S2)=>-> | move/(_ _ S1)=>->].
-Qed.
- -
-Inductive fact :=
-  eqH of synheap & synheap | eqD of dynamic & dynamic | eqX of nat & nat.
- -
-(* returns the proposition generated by a fact *)
-Definition eval_fact i f :=
-  match f with
-  | eqH h1 h2 => interp i h1 = interp i h2
-  | eqD d1 d2 => d1 = d2
-  | eqX x1 x2 => plook i x1 = plook i x2
-  end.
- -
-(* returns the logic concatenation of all the facts in the list *)
-Fixpoint eval i s :=
-  match s with
-  | [:: f] => eval_fact i f
-  | (f :: fs) => eval_fact i f /\ eval i fs
-  | [::] => True
-  end.
- -
-(* functions to collect pointers and heap variables indices out of a synheap *)
-Fixpoint ptrs t : seq nat :=
-  if t is e :: t' then
-    if e is Pts x _ then x :: (ptrs t')
-    else ptrs t'
-  else [::].
- -
-Fixpoint vars t : seq nat :=
-  if t is e :: t' then
-    if e is Var h then h :: (vars t')
-    else vars t'
-  else [::].
- -
-Definition ptreq (x : nat) e := if e is Pts y _ then x == y else false.
-Definition vareq (h : nat) e := if e is Var k then h == k else false.
- -
-Fixpoint pread x t :=
-  match t with
-    Pts y d :: s => if x == y then some d else pread x s
-  | e :: s => pread x s
-  | _ => None
-  end.
- -
-Notation pread' x t := (odflt (dyn tt) (pread x t)).
- -
-Definition pfree x t := filter (predC (ptreq x)) t.
-Definition hfree h t := filter (predC (vareq h)) t.
- -
-(* Main function to perform the cancelation of heaps. One difference to point
-   out from the description in the paper, appart from the fact that it is
-   returning a list of facts, is that in the base case we consider the special
-   case x1 :-> v1 = x2 :-> v2 -> x1 = x2 /\ v1 = v2  *)

-Fixpoint cancel' (i : ctx) (t1 t2 r : synheap) (f : seq fact) : seq fact :=
-  match t1 with
-  | [::] => match r, t2 with
-            | [::], [::] => f
-            | [:: Pts x d], [:: Pts x' d'] =>
-                [:: eqX x x', eqD d d' & f]
-            | _ , _ => [:: eqH r t2 & f]
-            end
-  | Pts x d :: t1' =>
-      if x \in ptrs t2
-        then cancel' i t1' (pfree x t2) r [:: eqD d (pread' x t2) & f]
-      else cancel' i t1' t2 [:: Pts x d & r] f
-  | Var h :: t1' =>
-      if h \in vars t2 then cancel' i t1' (hfree h t2) r f
-      else cancel' i t1' t2 [:: Var h & r] f
-  end.
- -
-Definition cancel i t1 t2 := cancel' i t1 t2 [::] [::].
- -
-(* several auxiliary lemmas about the definitions given above *)
- -
-Lemma eval_cons i f s : eval i (f :: s) <-> eval_fact i f /\ eval i s.
-Proof. by case:s=>//; split=>//; case. Qed.
- -
-Lemma eval_cat i s1 s2 : eval i (s1 ++ s2) <-> eval i s1 /\ eval i s2.
-Proof.
-elim: s1=>[/=|f s1 IH]; first tauto.
-by rewrite cat_cons !eval_cons IH; tauto.
-Qed.
- -
-Lemma eval_rcons i f s : eval i (rcons s f) <-> eval i s /\ eval_fact i f.
-Proof. by rewrite -cats1 eval_cat. Qed.
- -
-Lemma pfreeE x t :
-        pfree x t =
-          if t is e :: t' then
-            if e is Pts y d then
-              if x == y then pfree x t' else e :: pfree x t'
-            else e :: pfree x t'
-          else [::].
-Proof. by elim:t=>[|e t IH] //; case: e=>[y d|] //=; case: eqP. Qed.
- -
-Lemma hfreeE h t :
-        hfree h t =
-          if t is e :: t' then
-            if e is Var k then
-              if h == k then hfree h t' else e :: hfree h t'
-            else e :: hfree h t'
-          else [::].
-Proof. by elim:t=>[|e t IH] //; case: e=>[| n] //=; case: eqP. Qed.
- -
-Lemma ptr_has x t : has (ptreq x) t = (x \in ptrs t).
-Proof.
-by elim:t=>[//|e t IH]; case: e=>[y d|//]; rewrite /= inE IH.
-Qed.
- -
-Lemma var_has h t : has (vareq h) t = (h \in vars t).
-Proof. by elim:t=>[//|e t IH]; case: e=>[//|n]; rewrite /= inE IH. Qed.
- -
-Lemma pfreeN x t : x \notin ptrs t -> pfree x t = t.
-Proof.
-rewrite -ptr_has; elim: t=>[|e t IH] //=; rewrite negb_or.
-by case/andP=>->; move/IH=>->.
-Qed.
- -
-Lemma pfree_subdom i x t :
-        def (interp i t) -> subdom (interp i (pfree x t)) (interp i t).
-Proof.
-elim:t=>[//|e t IH]; rewrite interp_cons /= => D.
-case: ifP=>_; last first.
-- rewrite -(un0h (interp _ _)); apply: subdomUE=>//.
-  - by apply: subdom_emp; rewrite (defUnl D).
-  by apply: IH; rewrite (defUnr D).
-rewrite interp_cons; apply: subdomUE=>//.
-- by apply: subdom_refl; rewrite (defUnl D).
-by apply: IH; rewrite (defUnr D).
-Qed.
- -
-Lemma pfree_def i x t: def (interp i t) -> def (interp i (pfree x t)).
-Proof. by move/(pfree_subdom x); move/subdom_def; move/andP=>[-> _]. Qed.
- -
-Lemma hfreeN h t : h \notin vars t -> hfree h t = t.
-Proof.
-rewrite -var_has; elim: t=>[|e t IH] //=; rewrite negb_or.
-by case/andP=>->; move/IH=>->.
-Qed.
- -
-Lemma vars_hfree (h1 h2 : nat) t :
-        has (vareq h1) (hfree h2 t) = (h1 != h2) && (has (vareq h1) t).
-Proof.
-elim:t=>[|e t IH]; first by rewrite andbF.
-case: e=>[//|n /=].
-by case: ifP=>/= E; rewrite IH; case: (h1 =P n)=>// ->; rewrite eq_sym E.
-Qed.
- -
-Lemma hfree_subdom i h t :
-        def (interp i t) ->
-          {subset dom (interp i (hfree h t)) <= dom (interp i t)}.
-Proof.
-elim:t=>[_ x //|e t IH]; rewrite interp_cons /= => D.
-case: ifP=>_; last first.
-- move=>x; move/(IH (defUnr D)).
-  by rewrite domUn !inE D orbC => ->.
-rewrite interp_cons => x; rewrite !domUn !inE D /=.
-case/andP=>D2; case/orP; rewrite ?inE; first by move->.
-by move/(IH (defUnr D) x)=>->; rewrite orbT.
-Qed.
- -
-Lemma hfree_subdom' i h t :
-        def (interp i t) ->
-          subdom (interp i (hfree h t)) (interp i t).
-Proof.
-elim:t=>[//|e t IH]; rewrite interp_cons /= => D.
-case: ifP=>_; last first.
-- rewrite -(un0h (interp _ _)).
-  apply: subdomUE=>//.
-  - by apply: subdom_emp; rewrite (defUnl D).
-  by apply: IH; rewrite (defUnr D).
-rewrite interp_cons.
-apply: subdomUE=>//.
-- by apply: subdom_refl; rewrite (defUnl D).
-by apply: IH; rewrite (defUnr D).
-Qed.
- -
-Lemma hfree_def i h t : def (interp i t) -> def (interp i (hfree h t)).
-Proof. by move/(hfree_subdom' h); move/subdom_def; move/andP=>[-> _]. Qed.
- -
-Lemma count0_hfree v t: count (pred1 v) (vars t) = 0 -> hfree v t = t.
-Proof. by move/eqP; rewrite eqn0Ngt -has_count has_pred1; apply: hfreeN. Qed.
- -
-Lemma count1_hfree v t :
-        count (pred1 v) (vars t) = 1 -> perm (Var v :: hfree v t) t.
-Proof.
-elim: t=>[//|w t IH]; case: w=>[x d H|v'] /=.
-- rewrite perm_sym -(cat1s (Var v) _).
-  apply: perm_cons_cat_consL.
-  by rewrite perm_sym; apply: IH.
-rewrite eq_sym; case: eqP=>[->|_] /=.
-  rewrite -{2}[1]addn0; move/eqP; rewrite eqn_add2l; move/eqP.
-  by move/count0_hfree=>->.
-rewrite add0n; move/IH=>H; rewrite perm_sym -(cat1s (Var v)).
-by apply: perm_cons_cat_consL; rewrite perm_sym.
-Qed.
- -
-Lemma countN_varfree i v t :
-        count (pred1 v) (vars t) > 1 -> def (interp i t) ->
-        hlook i v = Some empty.
-Proof.
-elim: t v=>[//|[x d|h] s IH] v H; rewrite interp_cons=>D.
-- by apply: IH=>//; apply defUnr in D.
-rewrite /= in H.
-case: (h =P v) H=>[<-|_]; last by move/IH; apply; apply: defUnr D.
-case H2: (count _ _)=>[//|[|n]] _; last first.
-- by apply: IH; [rewrite H2 | apply: defUnr D].
-move/count1_hfree: H2=>H2.
-rewrite -(interp_perm i H2) interp_cons unA in D.
-move: (defUnl D); rewrite defUnhh /=.
-by case: (onth _ _)=>// a; move/empP=>->.
-Qed.
- -
-Lemma empty_hfree i v t :
-        hlook i v = Some empty -> interp i (hfree v t) = interp i t.
-Proof.
-elim: t=>[//|[x d|v'] t IH] H1; rewrite [hfree _ _]/=.
-- by rewrite 2!interp_cons IH.
-case: ifP=>H2; first by rewrite 2!interp_cons IH.
-rewrite /= in H1; rewrite -(eqP (negbFE H2)) {}IH //= H1.
-by case: t=>[//|e s]; rewrite un0h.
-Qed.
- -
-(***********************************************)
-(* Reflection lemmas                           *)
-(* The following series of lemmas establish a  *)
-(* bridge between syntax and semantics         *)
-(***********************************************)
- -
-Lemma domR i (x : nat) t :
-        def (interp i t) -> has (ptreq x) t ->
-        plook' i x \in dom (interp i t).
-Proof.
-elim: t x=>[//|e1 t IH] x; rewrite interp_cons /= => D.
-case/orP=>E; last by rewrite domUn !inE D (IH _ (defUnr D) E) orbT.
-rewrite domUn !inE D.
-case: e1 E D=>//= y d; move/eqP=><-; move/defUnl.
-case: (onth _ _)=>[a|] //=.
-by rewrite defPt domPt !inE eqxx => ->.
-Qed.
- -
-Lemma lookR i t x :
-        def (interp i t) -> has (ptreq x) t ->
-        look (plook' i x) (interp i t) = pread' x t.
-Proof.
-elim: t x=>[//|e1 t IH] x; rewrite interp_cons /=.
-case F: (ptreq x e1)=>/= D E; last first.
-- rewrite (lookUnr _ D) (domR (defUnr D) E) (IH _ (defUnr D) E).
-  by case: e1 F {D}=>//= y d ->.
-case: e1 {E} F D=>// y d; move/eqP=><-{y} D.
-rewrite (_ : einterp i _ = interp i [:: Pts x d]) // in D *.
-rewrite (lookUnl _ D) (domR (defUnl D)) /= ?eqxx //.
-move/defUnl: D=>/=; case: (onth _ x)=>[a|] //.
-rewrite defPt lookU /= eqxx => ->.
-by rewrite -dyn_eta.
-Qed.
- -
-Lemma defR i t : def (interp i t) -> uniq (ptrs t).
-Proof.
-elim: t=>[//|e t IH]; rewrite interp_cons /=.
-case: e=>[y d|n] /=; case E: (onth _ _)=>[a|//]; last by move/defUnr.
-case: defUn=>// D1 D2 L _.
-rewrite (IH D2) andbT -ptr_has.
-apply: contra (L a _); first by move/(domR D2); rewrite /= E.
-by rewrite defPt domPt !inE eqxx in D1 *.
-Qed.
- -
-Lemma freeR i t x :
-        def (interp i t) -> has (ptreq x) t ->
-        free (plook' i x) (interp i t) = interp i (pfree x t).
-Proof.
-elim: t=>[//|e t IH]; rewrite interp_cons=>D /=.
-case E: (ptreq x e)=>/=; last first.
-- move=>H; rewrite freeUnl; first by rewrite (IH (defUnr D) H) -{1}interp_cons.
-  case: defUn D=>// D1 D2 L _.
-  apply: (contra (L (plook' i x))); rewrite negbK.
-  by apply: domR.
-case: e E D=>//= y d; move/eqP=><-{y}.
-case F: (onth _ x)=>[a|//] D _.
-rewrite freePtUn //= pfreeN // -ptr_has.
-apply: contra (defPt_dom D); move/(domR (defPt_def D)).
-by rewrite /= F.
-Qed.
- -
-Lemma cancel_sound' i sh1 sh2 unm fs :
-        interp i sh2 = interp i (sh1 ++ unm) ->
-        def (interp i sh2) -> eval i fs ->
-        eval i (cancel' i sh1 sh2 unm fs).
-Proof.
-elim: sh1 sh2 unm fs=>[|[sx sd|sv] sh1 IH] sh2 unm fs.
-- case: unm=>[|[sxu sdu|svu] [|[sxu' sud'|svu'] unm']];
-  case: sh2=>[|[sx2 sd2|sv2] sh2'] /=; try by case: fs.
-  case A: (onth _ sx2)=>[a|]; last by case sh2'.
-  case D: (onth _ sxu)=>[d|]; last by move->.
-  case: sh2'=>[/= H2 Def|e sh2']; last by rewrite /= A D =>->; case: fs.
-  case: (pts_injP Def H2)=>[H3 H4].
-  rewrite A D H3; split=>//.
-  case: sdu sd2 H4 H2 Def=>b1 b2 [c1 c2] /= H4; move: b2.
-  rewrite -H4 H3=> b2 H2 Def.
-  by move/(pts_inj Def): H2=>->; case: fs H.
-- rewrite [eval _ (cancel' _ _ _ _ _)]/=.
-  case: ifP=>H1 H2 D E; last first.
-  - apply: (IH _ _ _ _ D E).
-    by rewrite H2 2!interp_cat 2!interp_cons unCA unA.
-  apply: IH; last 2 first.
-  - by apply: pfree_def.
-  - rewrite -ptr_has in H1; rewrite /= -(lookR D H1).
-    rewrite H2 interp_cons /= in D *.
-    case A: (onth _ sx)=>[a|//] in D *.
-    by rewrite (lookPtUn D) -dyn_eta; case: fs E.
-  rewrite -ptr_has in H1; rewrite -(freeR D H1).
-  rewrite H2 cat_cons /= in D *.
-  case A: (onth _ sx)=>[a /=|] in D *; last by case: (sh1 ++ unm) D.
-  case: (sh1 ++ unm) D=>[|c s D]; last by rewrite (freePtUn D).
-  by rewrite freeU defU eq_refl; case/andP; move/negbTE=>-> _; rewrite free0.
-rewrite [eval _ (cancel' _ _ _ _ _)]/=.
-case: ifP=>H1 H2 D E; last first.
-- apply: (IH _ _ _ _ D E).
-  by rewrite H2 2!interp_cat 2!interp_cons unCA unA.
-apply: IH=>//; last by apply: hfree_def.
-rewrite -has_pred1 has_count in H1.
-case H1: (count _ _) H1=>[//|[|n]] _; last first.
-- have H3: count (pred1 sv) (vars sh2) > 1 by rewrite H1.
-  move: (countN_varfree H3 D)=>/= H4.
-  by rewrite (empty_hfree sh2 H4) H2 interp_cons /= H4 un0h.
-move/(interp_perm i): (count1_hfree H1)=>H6.
-rewrite -H6 cat_cons 2!interp_cons in H2.
-rewrite -H6 interp_cons H2 in D.
-by apply: (unhKr D H2).
-Qed.
- -
-(* Main lemma: the cancel algorithm is correct *)
-Lemma cancel_sound i t1 t2 :
-        def (interp i t1) -> interp i t1 = interp i t2 ->
-        eval i (cancel i t1 t2).
-Proof. by move=>D H; apply: cancel_sound'=>//; rewrite -H // cats0. Qed.
- -
-
-
- -
- - - diff --git a/docs/LemmaOverloading.xfind.html b/docs/LemmaOverloading.xfind.html deleted file mode 100644 index b6af160..0000000 --- a/docs/LemmaOverloading.xfind.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.xfind

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrnat seq.
-From LemmaOverloading
-Require Import prefix.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(******************************************************************************)
-(*       Module for searching and inserting elements in a list                *)
-(******************************************************************************)
- -
-Section XFind.
- -
-Variable A : Type.
- -
-Definition invariant s r i (e : A) := onth r i = Some e /\ prefix s r.
- -
-(* Tagging for controlling the search of instances *)
-Structure xtagged := XTag {xuntag :> A}.
- -
-Definition extend_tag := XTag.
-Definition recurse_tag := extend_tag.
-Canonical Structure found_tag x := recurse_tag x.
- -
-(* Main structure
-   s : input sequence
-   r : output sequence. If elem_of is in the sequence, then it's equal to s,
-       otherwise it's equal to (elem_of :: s)
-   i : output index of elem_of in r *)

-Structure xfind (s r : seq A) (i : nat) := XFind {
-  elem_of :> xtagged;
-  _ : invariant s r i elem_of}.
- -
-Arguments XFind : clear implicits.
- -
-Lemma found_pf x t : invariant (x :: t) (x :: t) 0 x.
-Proof. by split; [|apply: prefix_refl]. Qed.
- -
-Canonical Structure found_struct x t :=
-  XFind (x :: t) (x :: t) 0 (found_tag x) (found_pf x t).
- -
-Lemma recurse_pf (i : nat) (y : A) (s r : seq A) (f : xfind s r i) :
-        invariant (y :: s) (y :: r) i.+1 f.
-Proof. by case:f=>[q [H1 H2]]; split; [|apply/prefix_cons]. Qed.
- -
-Canonical Structure recurse_struct i y t r (f : xfind t r i) :=
-  XFind (y :: t) (y :: r) i.+1 (recurse_tag f) (recurse_pf y f).
- -
-Lemma extend_pf x : invariant [::] [:: x] 0 x.
-Proof. by []. Qed.
- -
-Canonical Structure extend_struct x :=
-  XFind [::] [:: x] 0 (extend_tag x) (extend_pf x).
- -
-End XFind.
- -
-Lemma findme A (r s : seq A) i (f : xfind r s i) : onth s i = Some (xuntag (elem_of f)).
-by case: f=>e [/= ->].
-Qed.
- -
-Example test A (x1 x2 x3 : A) : onth [:: x1; x2; x3] 2 = Some x3.
-apply: findme.
-Defined.
- -
-Set Printing Implicit.
-Print test.
- -
-Example unit_test : forall A (x1 x2 x3 x y : A),
-   (forall s r i (f : xfind s r i), nth x1 r i = xuntag f -> xuntag f = x) ->
-  x = x.
-Proof.
-move=>A x1 x2 x3 x y test_form.
-apply: (test_form [::]). simpl.
-apply: (test_form [:: x1; x]). simpl.
-apply: (test_form [:: x1; x2; x; x3]). simpl.
-apply: (test_form [:: x1; x2; x3]). simpl.
-Abort.
-
-
- -
- - - diff --git a/docs/LemmaOverloading.xfindCTC.html b/docs/LemmaOverloading.xfindCTC.html deleted file mode 100644 index 714b439..0000000 --- a/docs/LemmaOverloading.xfindCTC.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - -
-
-

LemmaOverloading.xfindCTC

- -
-(*
-    Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*)

- -
-From mathcomp
-Require Import ssreflect ssrnat seq.
-From LemmaOverloading
-Require Import prefix.
-Set Implicit Arguments.
-Unset Strict Implicit.
-Unset Printing Implicit Defensive.
- -
-(******************************************************************************)
-(*       Module for searching and inserting elements in a list                *)
-(******************************************************************************)
- -
-Definition invariant A s r i (e : A) := onth r i = Some e /\ prefix s r.
- -
-Class XFind A (s : seq A) (e : A) := {
-  seq_of : seq A;
-  index_of : nat;
-  xfind : invariant s seq_of index_of e}.
- -
-Arguments XFind [A].
- -
-Program Instance found_struct A (x:A) t : XFind (x :: t) x := {| seq_of := (x :: t); index_of := 0|}.
-Next Obligation. by split; [|apply: prefix_refl]. Qed.
- -
-Program Instance recurse_struct A (y:A) t e (f : XFind t e) :
-  XFind (y :: t) e | 2 := {| seq_of := (y :: seq_of); index_of := index_of.+1|}.
-Next Obligation.
-by case:f=>r i /= [H1 H2]; split; [|apply/prefix_cons].
-Qed.
- -
-Program Instance extend_struct A (x:A) : XFind [::] x := {| seq_of := [:: x]; index_of := 0|}.
-Next Obligation. by []. Qed.
- -
-(* Hint Extern 1 (XFind _ _) => progress simpl : typeclass_instances. *)
- -
-Example unit_test A (x1 x2 x3 x y : A):
-   (forall s e (f : XFind s e), nth x1 seq_of index_of = e -> e = x) ->
-  x = x.
-Proof.
-move=>test_form.
-apply: (test_form [::]). simpl.
-apply: (test_form [:: x1; x]). simpl.
-apply: (test_form [:: x1; x2; x; x3]). simpl.
-apply: (test_form [:: x1; x2; x3]). rewrite [seq_of]/=. rewrite [index_of]/=. simpl.
-Abort.
- -
-Lemma bla A (x : A) s (C : XFind s x) : onth seq_of index_of = Some x.
-Proof.
-by case: xfind.
-Qed.
- -
-Example ex1 : onth [::1;2;3;4;5] 2 = Some 3.
-apply: bla.
-Qed.
-
-
- -
- - - diff --git a/docs/config.js b/docs/config.js deleted file mode 100644 index aed1ac3..0000000 --- a/docs/config.js +++ /dev/null @@ -1,78 +0,0 @@ -var coqdocjs = coqdocjs || {}; - -coqdocjs.repl = { - "forall": "∀", - "exists": "∃", - "~": "¬", - "/\\": "∧", - "\\/": "∨", - "->": "→", - "<-": "←", - "<->": "↔", - "=>": "⇒", - "<>": "≠", - "<=": "≤", - ">=": "≥", - "el": "∈", - "nel": "∉", - "<<=": "⊆", - "|-": "⊢", - ">>": "»", - "<<": "⊆", - "++": "⧺", - "===": "≡", - "=/=": "≢", - "=~=": "≅", - "==>": "⟹", - "<==": "⟸", - "False": "⊥", - "True": "⊤", - ":=": "≔", - "-|": "⊣", - "*": "×", - "lhd": "⊲", - "rhd": "⊳", - "nat": "ℕ", - "alpha": "α", - "beta": "β", - "gamma": "γ", - "delta": "δ", - "epsilon": "ε", - "eta": "η", - "iota": "ι", - "kappa": "κ", - "lambda": "λ", - "mu": "μ", - "nu": "ν", - "omega": "ω", - "phi": "ϕ", - "pi": "π", - "psi": "ψ", - "rho": "ρ", - "sigma": "σ", - "tau": "τ", - "theta": "θ", - "xi": "ξ", - "zeta": "ζ", - "Delta": "Δ", - "Gamma": "Γ", - "Pi": "Π", - "Sigma": "Σ", - "Omega": "Ω", - "Xi": "Ξ" -}; - -coqdocjs.subscr = { - "0" : "₀", - "1" : "₁", - "2" : "₂", - "3" : "₃", - "4" : "₄", - "5" : "₅", - "6" : "₆", - "7" : "₇", - "8" : "₈", - "9" : "₉", -}; - -coqdocjs.replInText = ["==>","<=>", "=>", "->", "<-", ":="]; diff --git a/docs/coqdoc.css b/docs/coqdoc.css deleted file mode 100644 index 18dad89..0000000 --- a/docs/coqdoc.css +++ /dev/null @@ -1,197 +0,0 @@ -@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700); - -body{ - font-family: 'Open Sans', sans-serif; - font-size: 14px; - color: #2D2D2D -} - -a { - text-decoration: none; - border-radius: 3px; - padding-left: 3px; - padding-right: 3px; - margin-left: -3px; - margin-right: -3px; - color: inherit; - font-weight: bold; -} - -#main .code a, #main .inlinecode a, #toc a { - font-weight: inherit; -} - -a[href]:hover, [clickable]:hover{ - background-color: rgba(0,0,0,0.1); - cursor: pointer; -} - -h, h1, h2, h3, h4, h5 { - line-height: 1; - color: black; - text-rendering: optimizeLegibility; - font-weight: normal; - letter-spacing: 0.1em; - text-align: left; -} - -div + br { - display: none; -} - -div:empty{ display: none;} - -#main h1 { - font-size: 2em; -} - -#main h2 { - font-size: 1.667rem; -} - -#main h3 { - font-size: 1.333em; -} - -#main h4, #main h5, #main h6 { - font-size: 1em; -} - -#toc h2 { - padding-bottom: 0; -} - -#main .doc { - margin: 0; - text-align: justify; -} - -.inlinecode, .code, #main pre { - font-family: monospace; -} - -.code > br:first-child { - display: none; -} - -.doc + .code{ - margin-top:0.5em; -} - -.block{ - display: block; - margin-top: 5px; - margin-bottom: 5px; - padding: 10px; - text-align: center; -} - -.block img{ - margin: 15px; -} - -table.infrule { - border: 0px; - margin-left: 50px; - margin-top: 10px; - margin-bottom: 10px; -} - -td.infrule { - font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; - text-align: center; - padding: 0; - line-height: 1; -} - -tr.infrulemiddle hr { - margin: 1px 0 1px 0; -} - -.infrulenamecol { - color: rgb(60%,60%,60%); - padding-left: 1em; - padding-bottom: 0.1em -} - -.id[type="constructor"], .id[type="projection"], .id[type="method"], -.id[title="constructor"], .id[title="projection"], .id[title="method"] { - color: #A30E16; -} - -.id[type="var"], .id[type="variable"], -.id[title="var"], .id[title="variable"] { - color: inherit; -} - -.id[type="definition"], .id[type="record"], .id[type="class"], .id[type="instance"], .id[type="inductive"], .id[type="library"], -.id[title="definition"], .id[title="record"], .id[title="class"], .id[title="instance"], .id[title="inductive"], .id[title="library"] { - color: #A6650F; -} - -.id[type="lemma"], -.id[title="lemma"]{ - color: #188B0C; -} - -.id[type="keyword"], .id[type="notation"], .id[type="abbreviation"], -.id[title="keyword"], .id[title="notation"], .id[title="abbreviation"]{ - color : #2874AE; -} - -.comment { - color: #808080; -} - -/* TOC */ - -#toc h2{ - letter-spacing: 0; - font-size: 1.333em; -} - -/* Index */ - -#index { - margin: 0; - padding: 0; - width: 100%; -} - -#index #frontispiece { - margin: 1em auto; - padding: 1em; - width: 60%; -} - -.booktitle { font-size : 140% } -.authors { font-size : 90%; - line-height: 115%; } -.moreauthors { font-size : 60% } - -#index #entrance { - text-align: center; -} - -#index #entrance .spacer { - margin: 0 30px 0 30px; -} - -ul.doclist { - margin-top: 0em; - margin-bottom: 0em; -} - -#toc > * { - clear: both; -} - -#toc > a { - display: block; - float: left; - margin-top: 1em; -} - -#toc a h2{ - display: inline; -} diff --git a/docs/coqdocjs.css b/docs/coqdocjs.css deleted file mode 100644 index 046ca8d..0000000 --- a/docs/coqdocjs.css +++ /dev/null @@ -1,239 +0,0 @@ -/* replace unicode */ - -.id[repl] .hidden { - font-size: 0; -} - -.id[repl]:before{ - content: attr(repl); -} - -/* folding proofs */ - -@keyframes show-proof { - 0% { - max-height: 1.2em; - opacity: 1; - } - 99% { - max-height: 1000em; - } - 100%{ - } -} - -@keyframes hide-proof { - from { - visibility: visible; - max-height: 10em; - opacity: 1; - } - to { - max-height: 1.2em; - } -} - -.proof { - cursor: pointer; -} -.proof * { - cursor: pointer; -} - -.proof { - overflow: hidden; - position: relative; - transition: opacity 1s; - display: inline-block; -} - -.proof[show="false"] { - max-height: 1.2em; - visibility: visible; - opacity: 0.3; -} - -.proof[show="false"][animate] { - animation-name: hide-proof; - animation-duration: 0.25s; -} - -.proof[show="true"] { - animation-name: show-proof; - animation-duration: 10s; -} - -.proof[show="true"]:before { - content: "\2BC6"; /* arrow down */ -} -.proof[show="false"]:before { - content: "\2BC8"; /* arrow right */ -} - -.proof[show="false"]:hover { - visibility: visible; - opacity: 0.5; -} - -#toggle-proofs[proof-status="no-proofs"] { - display: none; -} - -#toggle-proofs[proof-status="some-hidden"]:before { - content: "Show Proofs"; -} - -#toggle-proofs[proof-status="all-shown"]:before { - content: "Hide Proofs"; -} - - -/* page layout */ - -html, body { - height: 100%; - margin:0; - padding:0; -} - -@media only screen { /* no div with internal scrolling to allow printing of whole content */ - body { - display: flex; - flex-direction: column - } - - #content { - flex: 1; - overflow: auto; - display: flex; - flex-direction: column; - } -} - -#content:focus { - outline: none; /* prevent glow in OS X */ -} - -#main { - display: block; - padding: 16px; - padding-top: 1em; - padding-bottom: 2em; - margin-left: auto; - margin-right: auto; - max-width: 60em; - flex: 1 0 auto; -} - -.libtitle { - display: none; -} - -/* header */ -#header { - width:100%; - padding: 0; - margin: 0; - display: flex; - align-items: center; - background-color: rgb(21,57,105); - color: white; - font-weight: bold; - overflow: hidden; -} - - -.button { - cursor: pointer; -} - -#header * { - text-decoration: none; - vertical-align: middle; - margin-left: 15px; - margin-right: 15px; -} - -#header > .right, #header > .left { - display: flex; - flex: 1; - align-items: center; -} -#header > .left { - text-align: left; -} -#header > .right { - flex-direction: row-reverse; -} - -#header a, #header .button { - color: white; - box-sizing: border-box; -} - -#header a { - border-radius: 0; - padding: 0.2em; -} - -#header .button { - background-color: rgb(63, 103, 156); - border-radius: 1em; - padding-left: 0.5em; - padding-right: 0.5em; - margin: 0.2em; -} - -#header a:hover, #header .button:hover { - background-color: rgb(181, 213, 255); - color: black; -} - -#header h1 { padding: 0; - margin: 0;} - -/* footer */ -#footer { - text-align: center; - opacity: 0.5; - font-size: 75%; -} - -/* hyperlinks */ - -@keyframes highlight { - 50%{ - background-color: black; - } -} - -:target * { - animation-name: highlight; - animation-duration: 1s; -} - -a[name]:empty { - float: right; -} - -/* Proviola */ - -div.code { - width: auto; - float: none; -} - -div.goal { - position: fixed; - left: 75%; - width: 25%; - top: 3em; -} - -div.doc { - clear: both; -} - -span.command:hover { - background-color: inherit; -} diff --git a/docs/coqdocjs.js b/docs/coqdocjs.js deleted file mode 100644 index 727da8c..0000000 --- a/docs/coqdocjs.js +++ /dev/null @@ -1,197 +0,0 @@ -var coqdocjs = coqdocjs || {}; -(function(){ - -function replace(s){ - var m; - if (m = s.match(/^(.+)'/)) { - return replace(m[1])+"'"; - } else if (m = s.match(/^([A-Za-z]+)_?(\d+)$/)) { - return replace(m[1])+m[2].replace(/\d/g, function(d){ - if (coqdocjs.subscr.hasOwnProperty(d)) { - return coqdocjs.subscr[d]; - } else { - return d; - } - }); - } else if (coqdocjs.repl.hasOwnProperty(s)){ - return coqdocjs.repl[s] - } else { - return s; - } -} - -function toArray(nl){ - return Array.prototype.slice.call(nl); -} - -function replInTextNodes() { - // Get all the nodes up front. - var nodes = Array.from(document.querySelectorAll(".code, .inlinecode")) - .flatMap(elem => Array.from(elem.childNodes) - .filter(e => e.nodeType == Node.TEXT_NODE) - ); - - // Create a replacement template node to clone from. - var replacementTemplate = document.createElement("span"); - replacementTemplate.setAttribute("class", "id"); - replacementTemplate.setAttribute("type", "keyword"); - - // Do the replacements. - coqdocjs.replInText.forEach(function(toReplace){ - var replacement = replacementTemplate.cloneNode(true); - replacement.appendChild(document.createTextNode(toReplace)); - - nodes.forEach(node => { - var fragments = node.textContent.split(toReplace); - node.textContent = fragments[fragments.length-1]; - for (var k = 0; k < fragments.length - 1; ++k) { - fragments[k] && node.parentNode.insertBefore(document.createTextNode(fragments[k]),node); - node.parentNode.insertBefore(replacement.cloneNode(true), node); - } - }); - }); -} - -function replNodes() { - toArray(document.getElementsByClassName("id")).forEach(function(node){ - if (["var", "variable", "keyword", "notation", "definition", "inductive"].indexOf(node.getAttribute("type"))>=0){ - var text = node.textContent; - var replText = replace(text); - if(text != replText) { - node.setAttribute("repl", replText); - node.setAttribute("title", text); - var hidden = document.createElement("span"); - hidden.setAttribute("class", "hidden"); - while (node.firstChild) { - hidden.appendChild(node.firstChild); - } - node.appendChild(hidden); - } - } - }); -} - -function isVernacStart(l, t){ - t = t.trim(); - for(var s of l){ - if (t == s || t.startsWith(s+" ") || t.startsWith(s+".")){ - return true; - } - } - return false; -} - -function isProofStart(n){ - return isVernacStart(["Proof"], n.textContent) || - (isVernacStart(["Next"], n.textContent) && isVernacStart(["Obligation"], n.nextSibling.nextSibling.textContent)); -} - -function isProofEnd(s){ - return isVernacStart(["Qed", "Admitted", "Defined", "Abort"], s); -} - -function proofStatus(){ - var proofs = toArray(document.getElementsByClassName("proof")); - if(proofs.length) { - for(var proof of proofs) { - if (proof.getAttribute("show") === "false") { - return "some-hidden"; - } - } - return "all-shown"; - } - else { - return "no-proofs"; - } -} - -function updateView(){ - document.getElementById("toggle-proofs").setAttribute("proof-status", proofStatus()); -} - -function foldProofs() { - var hasCommands = true; - var nodes = document.getElementsByClassName("command"); - if(nodes.length == 0) { - hasCommands = false; - console.log("no command tags found") - nodes = document.getElementsByClassName("id"); - } - toArray(nodes).forEach(function(node){ - if(isProofStart(node)) { - var proof = document.createElement("span"); - proof.setAttribute("class", "proof"); - - node.parentNode.insertBefore(proof, node); - if(proof.previousSibling.nodeType === Node.TEXT_NODE) - proof.appendChild(proof.previousSibling); - while(node && !isProofEnd(node.textContent)) { - proof.appendChild(node); - node = proof.nextSibling; - } - if (proof.nextSibling) proof.appendChild(proof.nextSibling); // the Qed - if (!hasCommands && proof.nextSibling) proof.appendChild(proof.nextSibling); // the dot after the Qed - - proof.addEventListener("click", function(proof){return function(e){ - if (e.target.parentNode.tagName.toLowerCase() === "a") - return; - proof.setAttribute("show", proof.getAttribute("show") === "true" ? "false" : "true"); - proof.setAttribute("animate", ""); - updateView(); - };}(proof)); - proof.setAttribute("show", "false"); - } - }); -} - -function toggleProofs(){ - var someProofsHidden = proofStatus() === "some-hidden"; - toArray(document.getElementsByClassName("proof")).forEach(function(proof){ - proof.setAttribute("show", someProofsHidden); - proof.setAttribute("animate", ""); - }); - updateView(); -} - -function repairDom(){ - // pull whitespace out of command - toArray(document.getElementsByClassName("command")).forEach(function(node){ - while(node.firstChild && node.firstChild.textContent.trim() == ""){ - console.log("try move"); - node.parentNode.insertBefore(node.firstChild, node); - } - }); - toArray(document.getElementsByClassName("id")).forEach(function(node){ - node.setAttribute("type", node.getAttribute("title")); - }); - toArray(document.getElementsByClassName("idref")).forEach(function(ref){ - toArray(ref.childNodes).forEach(function(child){ - if (["var", "variable"].indexOf(child.getAttribute("type")) > -1) - ref.removeAttribute("href"); - }); - }); - -} - -function fixTitle(){ - var url = "/" + window.location.pathname; - var basename = url.substring(url.lastIndexOf('/')+1, url.lastIndexOf('.')); - if (basename === "toc") {document.title = "Table of Contents";} - else if (basename === "indexpage") {document.title = "Index";} - else {document.title = basename;} -} - -function postprocess(){ - repairDom(); - replInTextNodes() - replNodes(); - foldProofs(); - document.getElementById("toggle-proofs").addEventListener("click", toggleProofs); - updateView(); -} - -fixTitle(); -document.addEventListener('DOMContentLoaded', postprocess); - -coqdocjs.toggleProofs = toggleProofs; -})(); diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index eff50c0..0000000 --- a/docs/index.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - Lemma Overloading - - - - - - - - - -
- View the project on GitHub -
-

About

-

Welcome to the Lemma Overloading project website! This project is part of coq-community.

-

This project contains Hoare Type Theory libraries which demonstrate a series of design patterns for programming with canonical structures that enable one to carefully and predictably coax Coq's type inference engine into triggering the execution of user-supplied algorithms during unification, and illustrates these patterns through several realistic examples drawn from Hoare Type Theory. The project also contains typeclass-based re-implementations for comparison.

-

This is an open source project, licensed under the GNU General Public License v3.0 or later.

-

Get the code

-

The current stable release of Lemma Overloading can be downloaded from GitHub.

-

Documentation

-

The coqdoc presentation of the source files from the latest release can be browsed online.

-

Other related publications, if any, are listed below.

- -

Help and contact

- -

Authors and contributors

- - - diff --git a/docs/indexpage.html b/docs/indexpage.html deleted file mode 100644 index c41a410..0000000 --- a/docs/indexpage.html +++ /dev/null @@ -1,5390 +0,0 @@ - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Global IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(2070 entries)
Notation IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(72 entries)
Module IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(22 entries)
Variable IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(312 entries)
Library IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(28 entries)
Lemma IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(711 entries)
Constructor IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(97 entries)
Axiom IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(2 entries)
Projection IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(80 entries)
Inductive IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(16 entries)
Section IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(137 entries)
Instance IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(24 entries)
Abbreviation IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(69 entries)
Definition IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(436 entries)
Record IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(64 entries)
-
-

Global Index

-

A

-AbsHeap [constructor, in LemmaOverloading.cancel2]
-AbsPts [constructor, in LemmaOverloading.cancel2]
-abs_heap [record, in LemmaOverloading.cancel2]
-abs_pts [record, in LemmaOverloading.cancel2]
-AdmissibleClosure [section, in LemmaOverloading.domains]
-AdmissibleClosure.T [variable, in LemmaOverloading.domains]
-allC [lemma, in LemmaOverloading.stsep]
-alloc [definition, in LemmaOverloading.stsep]
-allocb [definition, in LemmaOverloading.stsep]
-allocbP [lemma, in LemmaOverloading.stsep]
-allocb_s [definition, in LemmaOverloading.stsep]
-allocP [lemma, in LemmaOverloading.stsep]
-alloc_s [definition, in LemmaOverloading.stsep]
-all_tag [definition, in LemmaOverloading.auto]
-andFp [lemma, in LemmaOverloading.rels]
-andpF [lemma, in LemmaOverloading.rels]
-andpT [lemma, in LemmaOverloading.rels]
-andTp [lemma, in LemmaOverloading.rels]
-And6 [constructor, in LemmaOverloading.prelude]
-and6 [inductive, in LemmaOverloading.prelude]
-and6P [lemma, in LemmaOverloading.prelude]
-ans [inductive, in LemmaOverloading.stmod]
-antiframe [lemma, in LemmaOverloading.stsep]
-AppChain [section, in LemmaOverloading.domains]
-AppChain.A [variable, in LemmaOverloading.domains]
-AppChain.s [variable, in LemmaOverloading.domains]
-AppChain.T [variable, in LemmaOverloading.domains]
-Append [section, in LemmaOverloading.finmap]
-Append.K [variable, in LemmaOverloading.finmap]
-Append.V [variable, in LemmaOverloading.finmap]
-app_cont [lemma, in LemmaOverloading.domains]
-app_chain [definition, in LemmaOverloading.domains]
-app_mono [lemma, in LemmaOverloading.domains]
-assign [projection, in LemmaOverloading.auto]
-ast [record, in LemmaOverloading.cancel]
-Ast [constructor, in LemmaOverloading.cancel]
-ast [projection, in LemmaOverloading.cancelCTC]
-Ast [record, in LemmaOverloading.cancelCTC]
-auto [lemma, in LemmaOverloading.auto]
-auto [library]
-

B

-BasePrograms [section, in LemmaOverloading.stmod]
-BasePrograms.A [variable, in LemmaOverloading.stmod]
-BasePrograms.P [variable, in LemmaOverloading.stmod]
-BasicProperties [section, in LemmaOverloading.domains]
-BasicProperties [section, in LemmaOverloading.hprop]
-BasicProperties.T [variable, in LemmaOverloading.domains]
-bind [definition, in LemmaOverloading.stsep]
-bindP [lemma, in LemmaOverloading.stsep]
-bind_s [definition, in LemmaOverloading.stsep]
-bla [lemma, in LemmaOverloading.xfindCTC]
-blah [lemma, in LemmaOverloading.stlog]
-blah2 [lemma, in LemmaOverloading.stlog]
-BlockUpdate [section, in LemmaOverloading.heaps]
-BlockUpdate.A [variable, in LemmaOverloading.heaps]
-BndForm [constructor, in LemmaOverloading.stlogR]
-bnd_gh1 [lemma, in LemmaOverloading.stlog]
-bnd_gh [lemma, in LemmaOverloading.stlog]
-bnd_throw [lemma, in LemmaOverloading.stlog]
-bnd_dealloc [lemma, in LemmaOverloading.stlog]
-bnd_allocb [lemma, in LemmaOverloading.stlog]
-bnd_alloc [lemma, in LemmaOverloading.stlog]
-bnd_write [lemma, in LemmaOverloading.stlog]
-bnd_read [lemma, in LemmaOverloading.stlog]
-bnd_ret [lemma, in LemmaOverloading.stlog]
-bnd_do [lemma, in LemmaOverloading.stlog]
-bnd_is_try [lemma, in LemmaOverloading.stlog]
-bnd_deallocR [lemma, in LemmaOverloading.stlogCTC]
-bnd_writeR [lemma, in LemmaOverloading.stlogCTC]
-bnd_pivot [projection, in LemmaOverloading.stlogR]
-bnd_form [record, in LemmaOverloading.stlogR]
-bnd_gh1R [lemma, in LemmaOverloading.stlogR]
-bnd_ghR [lemma, in LemmaOverloading.stlogR]
-bnd_throwR [definition, in LemmaOverloading.stlogR]
-bnd_deallocR [lemma, in LemmaOverloading.stlogR]
-bnd_allocbR [definition, in LemmaOverloading.stlogR]
-bnd_allocR [definition, in LemmaOverloading.stlogR]
-bnd_writeR [lemma, in LemmaOverloading.stlogR]
-bnd_readR [lemma, in LemmaOverloading.stlogR]
-bnd_retR [definition, in LemmaOverloading.stlogR]
-bnd_doR [lemma, in LemmaOverloading.stlogR]
-bot_runs [lemma, in LemmaOverloading.stmod]
-bound [lemma, in LemmaOverloading.stmod]
-

C

-cancel [definition, in LemmaOverloading.terms]
-cancel [lemma, in LemmaOverloading.cancel2]
-cancel [lemma, in LemmaOverloading.heaps]
-cancel [library]
-cancelCTC [library]
-cancelD [abbreviation, in LemmaOverloading.cancelD]
-cancelD [library]
-cancelR [lemma, in LemmaOverloading.cancel]
-cancelR [lemma, in LemmaOverloading.cancelCTC]
-cancelT [lemma, in LemmaOverloading.heaps]
-cancel_sound [lemma, in LemmaOverloading.terms]
-cancel_sound' [lemma, in LemmaOverloading.terms]
-cancel_ins [lemma, in LemmaOverloading.finmap]
-cancel' [definition, in LemmaOverloading.terms]
-cancel1 [lemma, in LemmaOverloading.cancel2]
-cancel2 [lemma, in LemmaOverloading.cancel2]
-cancel2 [library]
-cexit1 [lemma, in LemmaOverloading.heaps]
-cexit2 [lemma, in LemmaOverloading.heaps]
-cexit3 [lemma, in LemmaOverloading.heaps]
-chain [record, in LemmaOverloading.domains]
-Chain [constructor, in LemmaOverloading.domains]
-ChainCompose [section, in LemmaOverloading.domains]
-ChainCompose.f1 [variable, in LemmaOverloading.domains]
-ChainCompose.f2 [variable, in LemmaOverloading.domains]
-ChainCompose.M1 [variable, in LemmaOverloading.domains]
-ChainCompose.M2 [variable, in LemmaOverloading.domains]
-ChainCompose.s [variable, in LemmaOverloading.domains]
-ChainCompose.T1 [variable, in LemmaOverloading.domains]
-ChainCompose.T2 [variable, in LemmaOverloading.domains]
-ChainCompose.T3 [variable, in LemmaOverloading.domains]
-ChainConst [section, in LemmaOverloading.domains]
-ChainConst.T1 [variable, in LemmaOverloading.domains]
-ChainConst.T2 [variable, in LemmaOverloading.domains]
-ChainConst.y [variable, in LemmaOverloading.domains]
-chainE [lemma, in LemmaOverloading.domains]
-ChainId [section, in LemmaOverloading.domains]
-ChainId.s [variable, in LemmaOverloading.domains]
-ChainId.T [variable, in LemmaOverloading.domains]
-Chains [section, in LemmaOverloading.domains]
-Chains.T [variable, in LemmaOverloading.domains]
-chain_clos_diag [lemma, in LemmaOverloading.domains]
-chain_closI [lemma, in LemmaOverloading.domains]
-chain_clos_mono [lemma, in LemmaOverloading.domains]
-chain_clos_idemp [lemma, in LemmaOverloading.domains]
-chain_closP [lemma, in LemmaOverloading.domains]
-chain_clos_min [lemma, in LemmaOverloading.domains]
-chain_clos_sub [lemma, in LemmaOverloading.domains]
-chain_closure [definition, in LemmaOverloading.domains]
-chain_closed [definition, in LemmaOverloading.domains]
-chain_axiom [definition, in LemmaOverloading.domains]
-check [record, in LemmaOverloading.noalias]
-Check [constructor, in LemmaOverloading.noalias]
-check [record, in LemmaOverloading.auto]
-Check [constructor, in LemmaOverloading.auto]
-check' [record, in LemmaOverloading.noalias]
-Check' [constructor, in LemmaOverloading.noalias]
-coerce [definition, in LemmaOverloading.prelude]
-coerce2 [definition, in LemmaOverloading.prelude]
-Coercions [section, in LemmaOverloading.prelude]
-Coercions.T [variable, in LemmaOverloading.prelude]
-Coercions2 [section, in LemmaOverloading.prelude]
-Coercions2.T [variable, in LemmaOverloading.prelude]
-coherent [definition, in LemmaOverloading.stmod]
-compA [lemma, in LemmaOverloading.prelude]
-compf1 [lemma, in LemmaOverloading.prelude]
-comp_cont [lemma, in LemmaOverloading.domains]
-comp_chainE [lemma, in LemmaOverloading.domains]
-comp_mono [lemma, in LemmaOverloading.domains]
-comp1f [lemma, in LemmaOverloading.prelude]
-CondBool [section, in LemmaOverloading.stsep]
-CondBool.A [variable, in LemmaOverloading.stsep]
-CondBool.b [variable, in LemmaOverloading.stsep]
-CondBool.s1 [variable, in LemmaOverloading.stsep]
-CondBool.s2 [variable, in LemmaOverloading.stsep]
-CondDecide [section, in LemmaOverloading.stsep]
-CondDecide.A [variable, in LemmaOverloading.stsep]
-CondDecide.b [variable, in LemmaOverloading.stsep]
-CondDecide.p1 [variable, in LemmaOverloading.stsep]
-CondDecide.p2 [variable, in LemmaOverloading.stsep]
-CondDecide.s1 [variable, in LemmaOverloading.stsep]
-CondDecide.s2 [variable, in LemmaOverloading.stsep]
-CondNat [section, in LemmaOverloading.stsep]
-CondNat.A [variable, in LemmaOverloading.stsep]
-CondNat.n [variable, in LemmaOverloading.stsep]
-CondNat.s1 [variable, in LemmaOverloading.stsep]
-CondNat.s2 [variable, in LemmaOverloading.stsep]
-CondOption [section, in LemmaOverloading.stsep]
-CondOption.A [variable, in LemmaOverloading.stsep]
-CondOption.B [variable, in LemmaOverloading.stsep]
-CondOption.s1 [variable, in LemmaOverloading.stsep]
-CondOption.s2 [variable, in LemmaOverloading.stsep]
-CondOption.x [variable, in LemmaOverloading.stsep]
-CondSeq [section, in LemmaOverloading.stsep]
-CondSeq.A [variable, in LemmaOverloading.stsep]
-CondSeq.B [variable, in LemmaOverloading.stsep]
-CondSeq.s [variable, in LemmaOverloading.stsep]
-CondSeq.s1 [variable, in LemmaOverloading.stsep]
-CondSeq.s2 [variable, in LemmaOverloading.stsep]
-congeqUh [lemma, in LemmaOverloading.heaps]
-congUh [lemma, in LemmaOverloading.heaps]
-conseq [definition, in LemmaOverloading.stsep]
-conseq_refl [lemma, in LemmaOverloading.stsep]
-conseq1 [abbreviation, in LemmaOverloading.stsep]
-const_cont [lemma, in LemmaOverloading.domains]
-const_chainE [lemma, in LemmaOverloading.domains]
-const_chain [definition, in LemmaOverloading.domains]
-const_chainP [lemma, in LemmaOverloading.domains]
-const_mono [lemma, in LemmaOverloading.domains]
-cont [abbreviation, in LemmaOverloading.stlog]
-cont [abbreviation, in LemmaOverloading.stlogCTC]
-cont [abbreviation, in LemmaOverloading.stlogR]
-contE [lemma, in LemmaOverloading.domains]
-Context [constructor, in LemmaOverloading.terms]
-Continuity [section, in LemmaOverloading.domains]
-Continuity.D1 [variable, in LemmaOverloading.domains]
-Continuity.D2 [variable, in LemmaOverloading.domains]
-Continuity.f [variable, in LemmaOverloading.domains]
-continuous [definition, in LemmaOverloading.domains]
-contV [lemma, in LemmaOverloading.prelude]
-contVT [lemma, in LemmaOverloading.prelude]
-cont_mono [lemma, in LemmaOverloading.domains]
-countN_varfree [lemma, in LemmaOverloading.terms]
-count0_hfree [lemma, in LemmaOverloading.terms]
-count1_hfree [lemma, in LemmaOverloading.terms]
-CPO [module, in LemmaOverloading.domains]
-CPO.base [projection, in LemmaOverloading.domains]
-CPO.class [definition, in LemmaOverloading.domains]
-CPO.Class [constructor, in LemmaOverloading.domains]
-CPO.ClassDef [section, in LemmaOverloading.domains]
-CPO.ClassDef.cT [variable, in LemmaOverloading.domains]
-CPO.ClassDef.T [variable, in LemmaOverloading.domains]
-CPO.class_of [record, in LemmaOverloading.domains]
-CPO.clone [definition, in LemmaOverloading.domains]
-CPO.Exports [module, in LemmaOverloading.domains]
-CPO.Exports.CPO [abbreviation, in LemmaOverloading.domains]
-CPO.Exports.cpo [abbreviation, in LemmaOverloading.domains]
-CPO.Exports.CPOMixin [abbreviation, in LemmaOverloading.domains]
-CPO.Exports.Laws [section, in LemmaOverloading.domains]
-CPO.Exports.Laws.D [variable, in LemmaOverloading.domains]
-CPO.Exports.lim [abbreviation, in LemmaOverloading.domains]
-CPO.Exports.limM [lemma, in LemmaOverloading.domains]
-CPO.Exports.limP [lemma, in LemmaOverloading.domains]
-[ cpo of _ ] (form_scope) [notation, in LemmaOverloading.domains]
-[ cpo of _ for _ ] (form_scope) [notation, in LemmaOverloading.domains]
-CPO.lim [definition, in LemmaOverloading.domains]
-CPO.mixin [projection, in LemmaOverloading.domains]
-CPO.Mixin [constructor, in LemmaOverloading.domains]
-CPO.mixin_of [record, in LemmaOverloading.domains]
-CPO.mx_lim [projection, in LemmaOverloading.domains]
-CPO.pack [definition, in LemmaOverloading.domains]
-CPO.Pack [constructor, in LemmaOverloading.domains]
-CPO.poset [definition, in LemmaOverloading.domains]
-CPO.RawMixin [section, in LemmaOverloading.domains]
-CPO.sort [projection, in LemmaOverloading.domains]
-CPO.type [record, in LemmaOverloading.domains]
-ctx [record, in LemmaOverloading.terms]
-

D

-DAppChain [section, in LemmaOverloading.domains]
-DAppChain.A [variable, in LemmaOverloading.domains]
-DAppChain.s [variable, in LemmaOverloading.domains]
-DAppChain.T [variable, in LemmaOverloading.domains]
-dapp_cont [lemma, in LemmaOverloading.domains]
-dapp_chain [definition, in LemmaOverloading.domains]
-dapp_mono [lemma, in LemmaOverloading.domains]
-dealloc [definition, in LemmaOverloading.stsep]
-deallocP [lemma, in LemmaOverloading.stsep]
-dealloc_s [definition, in LemmaOverloading.stsep]
-Def [section, in LemmaOverloading.finmap]
-def [definition, in LemmaOverloading.heaps]
-Def [constructor, in LemmaOverloading.heaps]
-default_tag [definition, in LemmaOverloading.cancelD]
-defE [lemma, in LemmaOverloading.heaps]
-defed [definition, in LemmaOverloading.stmod]
-defF [lemma, in LemmaOverloading.heaps]
-defFUn [lemma, in LemmaOverloading.heaps]
-defPt [lemma, in LemmaOverloading.heaps]
-defPtUn [lemma, in LemmaOverloading.heaps]
-defPt_dom [lemma, in LemmaOverloading.heaps]
-defPt_def [lemma, in LemmaOverloading.heaps]
-defPt_null [lemma, in LemmaOverloading.heaps]
-defR [lemma, in LemmaOverloading.terms]
-defU [lemma, in LemmaOverloading.heaps]
-defUn [lemma, in LemmaOverloading.heaps]
-defUnF [lemma, in LemmaOverloading.heaps]
-defUnhh [lemma, in LemmaOverloading.heaps]
-defUnl [lemma, in LemmaOverloading.heaps]
-defUnr [lemma, in LemmaOverloading.heaps]
-defUn_spec [inductive, in LemmaOverloading.heaps]
-def_runs [lemma, in LemmaOverloading.stmod]
-def_strict [definition, in LemmaOverloading.stmod]
-def_true [constructor, in LemmaOverloading.heaps]
-def_false3 [constructor, in LemmaOverloading.heaps]
-def_false2 [constructor, in LemmaOverloading.heaps]
-def_false1 [constructor, in LemmaOverloading.heaps]
-Def.K [variable, in LemmaOverloading.finmap]
-Def.V [variable, in LemmaOverloading.finmap]
-def0 [lemma, in LemmaOverloading.heaps]
-def2 [definition, in LemmaOverloading.heaps]
-dfunCPO [definition, in LemmaOverloading.domains]
-DFunCPO [section, in LemmaOverloading.domains]
-dfunCPOMixin [definition, in LemmaOverloading.domains]
-DFunCPO.A [variable, in LemmaOverloading.domains]
-DFunCPO.B [variable, in LemmaOverloading.domains]
-dfunLattice [definition, in LemmaOverloading.domains]
-DFunLattice [section, in LemmaOverloading.domains]
-dfunLatticeMixin [definition, in LemmaOverloading.domains]
-DFunLattice.A [variable, in LemmaOverloading.domains]
-DFunLattice.B [variable, in LemmaOverloading.domains]
-dfunPoset [definition, in LemmaOverloading.domains]
-DFunPoset [section, in LemmaOverloading.domains]
-dfunPosetMixin [definition, in LemmaOverloading.domains]
-DFunPoset.A [variable, in LemmaOverloading.domains]
-DFunPoset.B [variable, in LemmaOverloading.domains]
-dfun_limM [lemma, in LemmaOverloading.domains]
-dfun_limP [lemma, in LemmaOverloading.domains]
-dfun_lim [definition, in LemmaOverloading.domains]
-dfun_supM [lemma, in LemmaOverloading.domains]
-dfun_supP [lemma, in LemmaOverloading.domains]
-dfun_sup [definition, in LemmaOverloading.domains]
-dfun_trans [lemma, in LemmaOverloading.domains]
-dfun_asym [lemma, in LemmaOverloading.domains]
-dfun_refl [lemma, in LemmaOverloading.domains]
-dfun_botP [lemma, in LemmaOverloading.domains]
-dfun_leq [definition, in LemmaOverloading.domains]
-dfun_bot [definition, in LemmaOverloading.domains]
-DiagChain [section, in LemmaOverloading.domains]
-DiagChain.s [variable, in LemmaOverloading.domains]
-DiagChain.T [variable, in LemmaOverloading.domains]
-diag_cont [lemma, in LemmaOverloading.domains]
-diag_chain [definition, in LemmaOverloading.domains]
-diag_mono [lemma, in LemmaOverloading.domains]
-disj [definition, in LemmaOverloading.finmap]
-disjC [lemma, in LemmaOverloading.finmap]
-DisjointUnion [section, in LemmaOverloading.finmap]
-DisjointUnion.K [variable, in LemmaOverloading.finmap]
-DisjointUnion.V [variable, in LemmaOverloading.finmap]
-disjP [lemma, in LemmaOverloading.finmap]
-disj_fcat [lemma, in LemmaOverloading.finmap]
-disj_remE [lemma, in LemmaOverloading.finmap]
-disj_rem [lemma, in LemmaOverloading.finmap]
-disj_ins [lemma, in LemmaOverloading.finmap]
-disj_nil [lemma, in LemmaOverloading.finmap]
-disj_false [constructor, in LemmaOverloading.finmap]
-disj_true [constructor, in LemmaOverloading.finmap]
-disj_spec [inductive, in LemmaOverloading.finmap]
-dom [definition, in LemmaOverloading.heaps]
-domains [library]
-domF [lemma, in LemmaOverloading.heaps]
-domPt [lemma, in LemmaOverloading.heaps]
-domPtUn [lemma, in LemmaOverloading.heaps]
-domPtUnX [lemma, in LemmaOverloading.heaps]
-domPtX [lemma, in LemmaOverloading.heaps]
-domR [lemma, in LemmaOverloading.terms]
-domU [lemma, in LemmaOverloading.heaps]
-domUn [lemma, in LemmaOverloading.heaps]
-dom_hfresh [lemma, in LemmaOverloading.heaps]
-dom_lfresh [lemma, in LemmaOverloading.heaps]
-dom_in_notin [lemma, in LemmaOverloading.heaps]
-dom_notin_notin [lemma, in LemmaOverloading.heaps]
-dom_fresh [lemma, in LemmaOverloading.heaps]
-dom_look [lemma, in LemmaOverloading.heaps]
-dom_free [lemma, in LemmaOverloading.heaps]
-dom_def [lemma, in LemmaOverloading.heaps]
-dom_null [lemma, in LemmaOverloading.heaps]
-dom0 [lemma, in LemmaOverloading.heaps]
-doP [lemma, in LemmaOverloading.stsep]
-do' [definition, in LemmaOverloading.stsep]
-dummy [projection, in LemmaOverloading.cancel2]
-dyn [abbreviation, in LemmaOverloading.prelude]
-Dyn [module, in LemmaOverloading.prelude]
-dynamic [abbreviation, in LemmaOverloading.prelude]
-dyneq_tag [definition, in LemmaOverloading.cancelD]
-dyn_injT [lemma, in LemmaOverloading.prelude]
-dyn_eta [lemma, in LemmaOverloading.prelude]
-dyn_inj [lemma, in LemmaOverloading.prelude]
-Dyn.dyn [constructor, in LemmaOverloading.prelude]
-Dyn.dynamic [record, in LemmaOverloading.prelude]
-Dyn.typ [projection, in LemmaOverloading.prelude]
-Dyn.val [projection, in LemmaOverloading.prelude]
-

E

-einterp [definition, in LemmaOverloading.terms]
-elem [inductive, in LemmaOverloading.terms]
-elem_of [projection, in LemmaOverloading.xfind]
-emp [definition, in LemmaOverloading.hprop]
-empb [definition, in LemmaOverloading.heaps]
-empbE [lemma, in LemmaOverloading.heaps]
-empc [definition, in LemmaOverloading.terms]
-empP [lemma, in LemmaOverloading.heaps]
-empPt [lemma, in LemmaOverloading.heaps]
-empty [definition, in LemmaOverloading.heaps]
-empty_pf [lemma, in LemmaOverloading.cancel]
-empty_tag [definition, in LemmaOverloading.cancel]
-empty_hfree [lemma, in LemmaOverloading.terms]
-empty_struct [instance, in LemmaOverloading.cancelCTC]
-empU [lemma, in LemmaOverloading.heaps]
-empUn [lemma, in LemmaOverloading.heaps]
-emp_pick [lemma, in LemmaOverloading.heaps]
-eqc [lemma, in LemmaOverloading.prelude]
-eqc2 [lemma, in LemmaOverloading.prelude]
-eqD [constructor, in LemmaOverloading.terms]
-eqexn [definition, in LemmaOverloading.stmod]
-eqexnP [lemma, in LemmaOverloading.stmod]
-eqfun_trans [lemma, in LemmaOverloading.rels]
-eqfun_sym [lemma, in LemmaOverloading.rels]
-eqfun_refl [lemma, in LemmaOverloading.rels]
-eqH [constructor, in LemmaOverloading.terms]
-EqMem [definition, in LemmaOverloading.rels]
-EqPred [definition, in LemmaOverloading.rels]
-EqPredFun [definition, in LemmaOverloading.rels]
-EqPredType [definition, in LemmaOverloading.rels]
-EqPredType_trans [definition, in LemmaOverloading.rels]
-EqPredType_trans' [lemma, in LemmaOverloading.rels]
-EqPredType_sym [lemma, in LemmaOverloading.rels]
-EqPredType_refl [lemma, in LemmaOverloading.rels]
-EqSeq_Class [definition, in LemmaOverloading.rels]
-EqSimplPred [definition, in LemmaOverloading.rels]
-EqType [section, in LemmaOverloading.finmap]
-EqType.K [variable, in LemmaOverloading.finmap]
-EqType.V [variable, in LemmaOverloading.finmap]
-Equate [constructor, in LemmaOverloading.auto]
-equate_to [record, in LemmaOverloading.auto]
-eqUh [lemma, in LemmaOverloading.heaps]
-eqX [constructor, in LemmaOverloading.terms]
-eq_ptrP [lemma, in LemmaOverloading.heaps]
-eq_ptr [definition, in LemmaOverloading.heaps]
-eta [lemma, in LemmaOverloading.prelude]
-eval [definition, in LemmaOverloading.terms]
-EvalAlloc [section, in LemmaOverloading.stlog]
-EvalAlloc.A [variable, in LemmaOverloading.stlog]
-EvalAlloc.B [variable, in LemmaOverloading.stlog]
-EvalBlockAlloc [section, in LemmaOverloading.stlog]
-EvalBlockAlloc.A [variable, in LemmaOverloading.stlog]
-EvalBlockAlloc.B [variable, in LemmaOverloading.stlog]
-EvalDealloc [section, in LemmaOverloading.stlog]
-EvalDeallocR [section, in LemmaOverloading.stlogCTC]
-EvalDeallocR [section, in LemmaOverloading.stlogR]
-EvalDeallocR.A [variable, in LemmaOverloading.stlogCTC]
-EvalDeallocR.A [variable, in LemmaOverloading.stlogR]
-EvalDeallocR.B [variable, in LemmaOverloading.stlogCTC]
-EvalDeallocR.B [variable, in LemmaOverloading.stlogR]
-EvalDealloc.A [variable, in LemmaOverloading.stlog]
-EvalDealloc.B [variable, in LemmaOverloading.stlog]
-EvalDo [section, in LemmaOverloading.stlog]
-EvalDoR [section, in LemmaOverloading.stlogCTC]
-EvalDoR [section, in LemmaOverloading.stlogR]
-EvalDoR.A [variable, in LemmaOverloading.stlogCTC]
-EvalDoR.A [variable, in LemmaOverloading.stlogR]
-EvalDoR.B [variable, in LemmaOverloading.stlogCTC]
-EvalDoR.B [variable, in LemmaOverloading.stlogR]
-EvalDo.A [variable, in LemmaOverloading.stlog]
-EvalDo.B [variable, in LemmaOverloading.stlog]
-EvalGhost [section, in LemmaOverloading.stlog]
-EvalGhostR [section, in LemmaOverloading.stlogR]
-EvalGhostR.A [variable, in LemmaOverloading.stlogR]
-EvalGhostR.B [variable, in LemmaOverloading.stlogR]
-EvalGhostR.C [variable, in LemmaOverloading.stlogR]
-EvalGhostR.f [variable, in LemmaOverloading.stlogR]
-EvalGhostR.i [variable, in LemmaOverloading.stlogR]
-EvalGhostR.j [variable, in LemmaOverloading.stlogR]
-EvalGhostR.P [variable, in LemmaOverloading.stlogR]
-EvalGhostR.p [variable, in LemmaOverloading.stlogR]
-EvalGhostR.q [variable, in LemmaOverloading.stlogR]
-EvalGhostR.s1 [variable, in LemmaOverloading.stlogR]
-EvalGhostR.s2 [variable, in LemmaOverloading.stlogR]
-EvalGhostR.t [variable, in LemmaOverloading.stlogR]
-EvalGhost.A [variable, in LemmaOverloading.stlog]
-EvalGhost.B [variable, in LemmaOverloading.stlog]
-EvalGhost.C [variable, in LemmaOverloading.stlog]
-EvalGhost.i [variable, in LemmaOverloading.stlog]
-EvalGhost.j [variable, in LemmaOverloading.stlog]
-EvalGhost.P [variable, in LemmaOverloading.stlog]
-EvalGhost.p [variable, in LemmaOverloading.stlog]
-EvalGhost.q [variable, in LemmaOverloading.stlog]
-EvalGhost.s1 [variable, in LemmaOverloading.stlog]
-EvalGhost.s2 [variable, in LemmaOverloading.stlog]
-EvalGhost.t [variable, in LemmaOverloading.stlog]
-EvalRead [section, in LemmaOverloading.stlog]
-EvalReadR [section, in LemmaOverloading.stlogR]
-EvalReadR.A [variable, in LemmaOverloading.stlogR]
-EvalReadR.B [variable, in LemmaOverloading.stlogR]
-EvalRead.A [variable, in LemmaOverloading.stlog]
-EvalRead.B [variable, in LemmaOverloading.stlog]
-EvalReturn [section, in LemmaOverloading.stlog]
-EvalReturn.A [variable, in LemmaOverloading.stlog]
-EvalReturn.B [variable, in LemmaOverloading.stlog]
-EvalThrow [section, in LemmaOverloading.stlog]
-EvalThrow.A [variable, in LemmaOverloading.stlog]
-EvalThrow.B [variable, in LemmaOverloading.stlog]
-EvalWrite [section, in LemmaOverloading.stlog]
-EvalWriteR [section, in LemmaOverloading.stlogCTC]
-EvalWriteR [section, in LemmaOverloading.stlogR]
-EvalWriteR.A [variable, in LemmaOverloading.stlogCTC]
-EvalWriteR.A [variable, in LemmaOverloading.stlogR]
-EvalWriteR.B [variable, in LemmaOverloading.stlogCTC]
-EvalWriteR.B [variable, in LemmaOverloading.stlogR]
-EvalWriteR.C [variable, in LemmaOverloading.stlogCTC]
-EvalWriteR.C [variable, in LemmaOverloading.stlogR]
-EvalWrite.A [variable, in LemmaOverloading.stlog]
-EvalWrite.B [variable, in LemmaOverloading.stlog]
-EvalWrite.C [variable, in LemmaOverloading.stlog]
-eval_rcons [lemma, in LemmaOverloading.terms]
-eval_cat [lemma, in LemmaOverloading.terms]
-eval_cons [lemma, in LemmaOverloading.terms]
-eval_fact [definition, in LemmaOverloading.terms]
-exit1 [lemma, in LemmaOverloading.heaps]
-exit2 [lemma, in LemmaOverloading.heaps]
-exit3 [lemma, in LemmaOverloading.heaps]
-exit4 [lemma, in LemmaOverloading.heaps]
-Exn [constructor, in LemmaOverloading.stmod]
-exn [inductive, in LemmaOverloading.stmod]
-exnc [definition, in LemmaOverloading.noaliasCTC]
-exnc [definition, in LemmaOverloading.noalias]
-exnc [definition, in LemmaOverloading.noalias]
-exnc [definition, in LemmaOverloading.noalias]
-exnc [definition, in LemmaOverloading.noaliasBT]
-exnc [definition, in LemmaOverloading.noaliasBT]
-exn_to_nat [definition, in LemmaOverloading.stmod]
-exn_from_nat [constructor, in LemmaOverloading.stmod]
-ext [lemma, in LemmaOverloading.prelude]
-extend_pf [lemma, in LemmaOverloading.xfind]
-extend_tag [definition, in LemmaOverloading.xfind]
-extend_struct [instance, in LemmaOverloading.xfindCTC]
-ex_noalias2 [definition, in LemmaOverloading.noaliasCTC]
-ex_noalias [definition, in LemmaOverloading.noaliasCTC]
-ex_find2 [definition, in LemmaOverloading.noaliasCTC]
-ex_find [definition, in LemmaOverloading.noaliasCTC]
-ex_scan [definition, in LemmaOverloading.noaliasCTC]
-ex_find2 [definition, in LemmaOverloading.noalias]
-ex_find [definition, in LemmaOverloading.noalias]
-ex_scan [definition, in LemmaOverloading.noalias]
-ex_dealloc_bwd [definition, in LemmaOverloading.stlogCTC]
-ex_fwd [definition, in LemmaOverloading.stlogCTC]
-ex_bwd [definition, in LemmaOverloading.stlogCTC]
-ex_val_do [definition, in LemmaOverloading.stlogCTC]
-ex_fwd [definition, in LemmaOverloading.stlogR]
-ex_bwd [definition, in LemmaOverloading.stlogR]
-ex_val_do [definition, in LemmaOverloading.stlogR]
-ex_read [definition, in LemmaOverloading.stlogR]
-ex0 [definition, in LemmaOverloading.cancel]
-ex1 [definition, in LemmaOverloading.cancel]
-ex1 [definition, in LemmaOverloading.xfindCTC]
-ex1 [definition, in LemmaOverloading.indom]
-ex1 [definition, in LemmaOverloading.auto]
-ex1 [definition, in LemmaOverloading.cancelCTC]
-ex1 [definition, in LemmaOverloading.indomCTC]
-ex1' [definition, in LemmaOverloading.cancel]
-ex2 [definition, in LemmaOverloading.cancel]
-ex2 [definition, in LemmaOverloading.indom]
-ex2 [definition, in LemmaOverloading.auto]
-ex2 [definition, in LemmaOverloading.cancelCTC]
-ex2 [definition, in LemmaOverloading.indomCTC]
-ex3 [definition, in LemmaOverloading.auto]
-ex3 [definition, in LemmaOverloading.cancel2]
-ex3 [definition, in LemmaOverloading.cancelD]
-ex4 [definition, in LemmaOverloading.auto]
-ex5 [definition, in LemmaOverloading.auto]
-ex6 [definition, in LemmaOverloading.auto]
-ex7 [definition, in LemmaOverloading.auto]
-ex8 [definition, in LemmaOverloading.auto]
-ex9 [definition, in LemmaOverloading.auto]
-

F

-fact [inductive, in LemmaOverloading.terms]
-fcat [definition, in LemmaOverloading.finmap]
-fcatA [lemma, in LemmaOverloading.finmap]
-fcatAC [lemma, in LemmaOverloading.finmap]
-fcatC [lemma, in LemmaOverloading.finmap]
-fcatCA [lemma, in LemmaOverloading.finmap]
-fcatKs [lemma, in LemmaOverloading.finmap]
-fcatsK [lemma, in LemmaOverloading.finmap]
-fcats0 [lemma, in LemmaOverloading.finmap]
-fcat_srem [lemma, in LemmaOverloading.finmap]
-fcat_rems [lemma, in LemmaOverloading.finmap]
-fcat_sins [lemma, in LemmaOverloading.finmap]
-fcat_inss [lemma, in LemmaOverloading.finmap]
-fcat_nil' [lemma, in LemmaOverloading.finmap]
-fcat_ins' [lemma, in LemmaOverloading.finmap]
-fcat' [definition, in LemmaOverloading.finmap]
-fcat0s [lemma, in LemmaOverloading.finmap]
-feq [definition, in LemmaOverloading.finmap]
-feqP [lemma, in LemmaOverloading.finmap]
-fext [axiom, in LemmaOverloading.prelude]
-ffound_struct1 [instance, in LemmaOverloading.stlogCTC]
-find [record, in LemmaOverloading.indom]
-find [record, in LemmaOverloading.auto]
-Find [constructor, in LemmaOverloading.auto]
-findme [lemma, in LemmaOverloading.xfind]
-Find1 [record, in LemmaOverloading.stlogCTC]
-find2E [lemma, in LemmaOverloading.noaliasCTC]
-finMap [record, in LemmaOverloading.finmap]
-FinMap [constructor, in LemmaOverloading.finmap]
-finmap [library]
-finMap_for [definition, in LemmaOverloading.finmap]
-FinTypeOrd [section, in LemmaOverloading.ordtype]
-FinTypeOrd.T [variable, in LemmaOverloading.ordtype]
-fin_ordMixin [definition, in LemmaOverloading.ordtype]
-Fix [definition, in LemmaOverloading.stsep]
-fleft_struct1 [instance, in LemmaOverloading.stlogCTC]
-fmap [abbreviation, in LemmaOverloading.finmap]
-fmap [abbreviation, in LemmaOverloading.finmap]
-fmap [abbreviation, in LemmaOverloading.finmap]
-fmap [abbreviation, in LemmaOverloading.finmap]
-fmap [abbreviation, in LemmaOverloading.finmap]
-fmapE [lemma, in LemmaOverloading.finmap]
-FMapInd [section, in LemmaOverloading.finmap]
-FMapInd.K [variable, in LemmaOverloading.finmap]
-FMapInd.V [variable, in LemmaOverloading.finmap]
-fmapP [lemma, in LemmaOverloading.finmap]
-fmap_ind2 [lemma, in LemmaOverloading.finmap]
-fmap_ind' [lemma, in LemmaOverloading.finmap]
-fnd [definition, in LemmaOverloading.finmap]
-fnd_fcat [lemma, in LemmaOverloading.finmap]
-fnd_supp_in [lemma, in LemmaOverloading.finmap]
-fnd_supp [lemma, in LemmaOverloading.finmap]
-fnd_ins [lemma, in LemmaOverloading.finmap]
-fnd_rem [lemma, in LemmaOverloading.finmap]
-fnd_empty [lemma, in LemmaOverloading.finmap]
-Form [constructor, in LemmaOverloading.indom]
-form [record, in LemmaOverloading.auto]
-Form [constructor, in LemmaOverloading.auto]
-form [record, in LemmaOverloading.cancelD]
-Form [constructor, in LemmaOverloading.cancelD]
-found [instance, in LemmaOverloading.indomCTC]
-found_pf [lemma, in LemmaOverloading.xfind]
-found_struct [instance, in LemmaOverloading.xfindCTC]
-found_pf [lemma, in LemmaOverloading.indom]
-found_right [instance, in LemmaOverloading.indomCTC]
-found_left [instance, in LemmaOverloading.indomCTC]
-found_struct [instance, in LemmaOverloading.stlogCTC]
-found_pf [lemma, in LemmaOverloading.stlogR]
-fprod [definition, in LemmaOverloading.prelude]
-fr [definition, in LemmaOverloading.stsep]
-frame [lemma, in LemmaOverloading.stsep]
-frame0 [lemma, in LemmaOverloading.stsep]
-frame1 [lemma, in LemmaOverloading.stsep]
-free [definition, in LemmaOverloading.heaps]
-freeF [lemma, in LemmaOverloading.heaps]
-freePtUn [lemma, in LemmaOverloading.heaps]
-freeR [lemma, in LemmaOverloading.terms]
-freeU [lemma, in LemmaOverloading.heaps]
-freeUn [lemma, in LemmaOverloading.heaps]
-freeUnD [lemma, in LemmaOverloading.heaps]
-freeUnl [lemma, in LemmaOverloading.heaps]
-freeUnr [lemma, in LemmaOverloading.heaps]
-free_nullP [lemma, in LemmaOverloading.heaps]
-free0 [lemma, in LemmaOverloading.heaps]
-fresh [definition, in LemmaOverloading.heaps]
-fresh_null [lemma, in LemmaOverloading.heaps]
-fright_struct1 [instance, in LemmaOverloading.stlogCTC]
-fr_pre [lemma, in LemmaOverloading.stsep]
-FunCPO [section, in LemmaOverloading.domains]
-funCPOMixin [definition, in LemmaOverloading.domains]
-FunCPO.A [variable, in LemmaOverloading.domains]
-FunCPO.B [variable, in LemmaOverloading.domains]
-FunLattice [section, in LemmaOverloading.domains]
-funLatticeMixin [definition, in LemmaOverloading.domains]
-FunLattice.A [variable, in LemmaOverloading.domains]
-FunLattice.B [variable, in LemmaOverloading.domains]
-FunPoset [section, in LemmaOverloading.domains]
-funPosetMixin [definition, in LemmaOverloading.domains]
-FunPoset.A [variable, in LemmaOverloading.domains]
-FunPoset.B [variable, in LemmaOverloading.domains]
-fun_limM [lemma, in LemmaOverloading.domains]
-fun_limP [lemma, in LemmaOverloading.domains]
-fun_lim [definition, in LemmaOverloading.domains]
-fun_supM [lemma, in LemmaOverloading.domains]
-fun_supP [lemma, in LemmaOverloading.domains]
-fun_sup [definition, in LemmaOverloading.domains]
-fun_trans [lemma, in LemmaOverloading.domains]
-fun_asym [lemma, in LemmaOverloading.domains]
-fun_refl [lemma, in LemmaOverloading.domains]
-fun_botP [lemma, in LemmaOverloading.domains]
-fun_leq [definition, in LemmaOverloading.domains]
-fun_bot [definition, in LemmaOverloading.domains]
-

G

-get_highs [definition, in LemmaOverloading.heaps]
-get_lows [definition, in LemmaOverloading.heaps]
-gh [definition, in LemmaOverloading.stsep]
-ghE [lemma, in LemmaOverloading.stsep]
-Ghosts [section, in LemmaOverloading.stsep]
-Ghosts.A [variable, in LemmaOverloading.stsep]
-Ghosts.p [variable, in LemmaOverloading.stsep]
-Ghosts.s [variable, in LemmaOverloading.stsep]
-

H

-hasPx [lemma, in LemmaOverloading.prelude]
-HasSelect [section, in LemmaOverloading.prelude]
-HasSelect.A [variable, in LemmaOverloading.prelude]
-HasSelect.p [variable, in LemmaOverloading.prelude]
-has_spec [definition, in LemmaOverloading.stmod]
-has_false [constructor, in LemmaOverloading.prelude]
-has_true [constructor, in LemmaOverloading.prelude]
-has_spec [inductive, in LemmaOverloading.prelude]
-hdom [definition, in LemmaOverloading.heaps]
-hdomP [lemma, in LemmaOverloading.heaps]
-heap [inductive, in LemmaOverloading.heaps]
-heapE [lemma, in LemmaOverloading.heaps]
-heapeq [record, in LemmaOverloading.cancel2]
-HeapEq [constructor, in LemmaOverloading.cancel2]
-HeapReflection [section, in LemmaOverloading.cancel]
-heaps [library]
-heap_of [projection, in LemmaOverloading.cancel]
-heap_ctx [projection, in LemmaOverloading.terms]
-heap_of [projection, in LemmaOverloading.indom]
-heap_inv [definition, in LemmaOverloading.cancel2]
-heap_h [projection, in LemmaOverloading.cancel2]
-heap_etaP [lemma, in LemmaOverloading.heaps]
-heap_eta [lemma, in LemmaOverloading.heaps]
-heap_of [projection, in LemmaOverloading.stlogR]
-heq1 [projection, in LemmaOverloading.stlogCTC]
-hfree [definition, in LemmaOverloading.terms]
-hfreeE [lemma, in LemmaOverloading.terms]
-hfreeN [lemma, in LemmaOverloading.terms]
-hfree_def [lemma, in LemmaOverloading.terms]
-hfree_subdom' [lemma, in LemmaOverloading.terms]
-hfree_subdom [lemma, in LemmaOverloading.terms]
-hfresh [definition, in LemmaOverloading.heaps]
-hfresh_null [lemma, in LemmaOverloading.heaps]
-hfresh_high [lemma, in LemmaOverloading.heaps]
-high [definition, in LemmaOverloading.heaps]
-highPn [lemma, in LemmaOverloading.heaps]
-highPtUn [lemma, in LemmaOverloading.heaps]
-highPtUn2 [lemma, in LemmaOverloading.heaps]
-high_lowD [lemma, in LemmaOverloading.heaps]
-hlE [lemma, in LemmaOverloading.heaps]
-hlook [definition, in LemmaOverloading.terms]
-hprop [library]
-hstep [definition, in LemmaOverloading.stlogR]
-hstep_bnd [definition, in LemmaOverloading.stlogR]
-

I

-iA [definition, in LemmaOverloading.prelude]
-ideal [record, in LemmaOverloading.domains]
-Ideal [constructor, in LemmaOverloading.domains]
-ideald [abbreviation, in LemmaOverloading.stmod]
-IdealDef [section, in LemmaOverloading.domains]
-IdealDef.T [variable, in LemmaOverloading.domains]
-IdealLattice [section, in LemmaOverloading.domains]
-idealLatticeMixin [definition, in LemmaOverloading.domains]
-IdealLattice.P [variable, in LemmaOverloading.domains]
-IdealLattice.T [variable, in LemmaOverloading.domains]
-IdealPoset [section, in LemmaOverloading.domains]
-idealPosetMixin [definition, in LemmaOverloading.domains]
-IdealPoset.P [variable, in LemmaOverloading.domains]
-IdealPoset.T [variable, in LemmaOverloading.domains]
-ideal_supM [lemma, in LemmaOverloading.domains]
-ideal_supP [lemma, in LemmaOverloading.domains]
-ideal_sup [definition, in LemmaOverloading.domains]
-ideal_supP' [lemma, in LemmaOverloading.domains]
-ideal_sup' [definition, in LemmaOverloading.domains]
-ideal_trans [lemma, in LemmaOverloading.domains]
-ideal_asym [lemma, in LemmaOverloading.domains]
-ideal_refl [lemma, in LemmaOverloading.domains]
-ideal_botP [lemma, in LemmaOverloading.domains]
-ideal_leq [definition, in LemmaOverloading.domains]
-ideal_bot [definition, in LemmaOverloading.domains]
-id_cont [lemma, in LemmaOverloading.domains]
-id_chainE [lemma, in LemmaOverloading.domains]
-id_mono [lemma, in LemmaOverloading.domains]
-id_pf [projection, in LemmaOverloading.domains]
-id_val [projection, in LemmaOverloading.domains]
-If [definition, in LemmaOverloading.stsep]
-ImageChain [section, in LemmaOverloading.domains]
-ImageChain.f [variable, in LemmaOverloading.domains]
-ImageChain.M [variable, in LemmaOverloading.domains]
-ImageChain.s [variable, in LemmaOverloading.domains]
-ImageChain.T1 [variable, in LemmaOverloading.domains]
-ImageChain.T2 [variable, in LemmaOverloading.domains]
-image_chain [definition, in LemmaOverloading.domains]
-image_chainP [lemma, in LemmaOverloading.domains]
-impC [lemma, in LemmaOverloading.stsep]
-imp_tag [definition, in LemmaOverloading.auto]
-index_of [projection, in LemmaOverloading.xfindCTC]
-indom [lemma, in LemmaOverloading.indom]
-indom [projection, in LemmaOverloading.indomCTC]
-Indom [record, in LemmaOverloading.indomCTC]
-indom [library]
-indomCTC [library]
-InE [definition, in LemmaOverloading.rels]
-inf [definition, in LemmaOverloading.domains]
-Infimum [section, in LemmaOverloading.domains]
-Infimum.T [variable, in LemmaOverloading.domains]
-infM [lemma, in LemmaOverloading.domains]
-infP [lemma, in LemmaOverloading.domains]
-injUh [lemma, in LemmaOverloading.heaps]
-inj_sval [lemma, in LemmaOverloading.prelude]
-inj_pair2 [definition, in LemmaOverloading.prelude]
-InMem [definition, in LemmaOverloading.rels]
-ins [definition, in LemmaOverloading.finmap]
-insert [definition, in LemmaOverloading.llistR]
-ins_ins [lemma, in LemmaOverloading.finmap]
-ins_rem [lemma, in LemmaOverloading.finmap]
-ins' [definition, in LemmaOverloading.finmap]
-interp [definition, in LemmaOverloading.terms]
-interp_subctx [lemma, in LemmaOverloading.terms]
-interp_perm [lemma, in LemmaOverloading.terms]
-interp_cat [lemma, in LemmaOverloading.terms]
-interp_cons [lemma, in LemmaOverloading.terms]
-invariant [definition, in LemmaOverloading.xfind]
-invariant [definition, in LemmaOverloading.cancel]
-invariant [definition, in LemmaOverloading.xfindCTC]
-invariant [definition, in LemmaOverloading.indom]
-invariant [definition, in LemmaOverloading.cancelCTC]
-In_nil [lemma, in LemmaOverloading.rels]
-In_cons [lemma, in LemmaOverloading.rels]
-In_Simpl [lemma, in LemmaOverloading.rels]
-in_split [lemma, in LemmaOverloading.perms]
-irA [lemma, in LemmaOverloading.prelude]
-irr [lemma, in LemmaOverloading.ordtype]
-irr_ordf [lemma, in LemmaOverloading.ordtype]
-irr_lex [lemma, in LemmaOverloading.ordtype]
-irr_ltn_nat [lemma, in LemmaOverloading.ordtype]
-isMem [definition, in LemmaOverloading.rels]
-

J

-jmE [lemma, in LemmaOverloading.prelude]
-jmeq [definition, in LemmaOverloading.prelude]
-jmeq_refl [lemma, in LemmaOverloading.prelude]
-jmeq2 [definition, in LemmaOverloading.prelude]
-jm2E [lemma, in LemmaOverloading.prelude]
-

K

-key [abbreviation, in LemmaOverloading.finmap]
-key [definition, in LemmaOverloading.finmap]
-Kleene [section, in LemmaOverloading.domains]
-kleene_lfp_least [lemma, in LemmaOverloading.domains]
-kleene_lfp_fixed [lemma, in LemmaOverloading.domains]
-kleene_lfp [definition, in LemmaOverloading.domains]
-Kleene.C [variable, in LemmaOverloading.domains]
-Kleene.D [variable, in LemmaOverloading.domains]
-Kleene.f [variable, in LemmaOverloading.domains]
-

L

-last_ins' [lemma, in LemmaOverloading.finmap]
-last_inv [lemma, in LemmaOverloading.heaps]
-Lat [section, in LemmaOverloading.domains]
-latCPO [definition, in LemmaOverloading.domains]
-latCPOMixin [definition, in LemmaOverloading.domains]
-Lattice [module, in LemmaOverloading.domains]
-LatticeCPO [section, in LemmaOverloading.domains]
-LatticeCPO.A [variable, in LemmaOverloading.domains]
-Lattice.base [projection, in LemmaOverloading.domains]
-Lattice.class [definition, in LemmaOverloading.domains]
-Lattice.Class [constructor, in LemmaOverloading.domains]
-Lattice.ClassDef [section, in LemmaOverloading.domains]
-Lattice.ClassDef.cT [variable, in LemmaOverloading.domains]
-Lattice.ClassDef.T [variable, in LemmaOverloading.domains]
-Lattice.class_of [record, in LemmaOverloading.domains]
-Lattice.clone [definition, in LemmaOverloading.domains]
-Lattice.Exports [module, in LemmaOverloading.domains]
-Lattice.Exports.Lattice [abbreviation, in LemmaOverloading.domains]
-Lattice.Exports.lattice [abbreviation, in LemmaOverloading.domains]
-Lattice.Exports.LatticeMixin [abbreviation, in LemmaOverloading.domains]
-Lattice.Exports.Laws [section, in LemmaOverloading.domains]
-Lattice.Exports.Laws.T [variable, in LemmaOverloading.domains]
-Lattice.Exports.sup [abbreviation, in LemmaOverloading.domains]
-Lattice.Exports.supM [lemma, in LemmaOverloading.domains]
-Lattice.Exports.supP [lemma, in LemmaOverloading.domains]
-[ lattice of _ ] (form_scope) [notation, in LemmaOverloading.domains]
-[ lattice of _ for _ ] (form_scope) [notation, in LemmaOverloading.domains]
-Lattice.mixin [projection, in LemmaOverloading.domains]
-Lattice.Mixin [constructor, in LemmaOverloading.domains]
-Lattice.mixin_of [record, in LemmaOverloading.domains]
-Lattice.mx_sup [projection, in LemmaOverloading.domains]
-Lattice.pack [definition, in LemmaOverloading.domains]
-Lattice.Pack [constructor, in LemmaOverloading.domains]
-Lattice.poset [definition, in LemmaOverloading.domains]
-Lattice.RawMixin [section, in LemmaOverloading.domains]
-Lattice.RawMixin.T [variable, in LemmaOverloading.domains]
-Lattice.sort [projection, in LemmaOverloading.domains]
-Lattice.sup [definition, in LemmaOverloading.domains]
-Lattice.type [record, in LemmaOverloading.domains]
-lat_limM [lemma, in LemmaOverloading.domains]
-lat_limP [lemma, in LemmaOverloading.domains]
-lat_lim [definition, in LemmaOverloading.domains]
-Lat.T [variable, in LemmaOverloading.domains]
-Laws [section, in LemmaOverloading.finmap]
-Laws.K [variable, in LemmaOverloading.finmap]
-Laws.V [variable, in LemmaOverloading.finmap]
-ldom [definition, in LemmaOverloading.heaps]
-ldomK [lemma, in LemmaOverloading.heaps]
-ldomP [lemma, in LemmaOverloading.heaps]
-ldomUn [lemma, in LemmaOverloading.heaps]
-left_pf [lemma, in LemmaOverloading.indom]
-left_tag [definition, in LemmaOverloading.indom]
-left_struct [instance, in LemmaOverloading.stlogCTC]
-left_pf [lemma, in LemmaOverloading.stlogR]
-left_tag [definition, in LemmaOverloading.stlogR]
-Lemmas [section, in LemmaOverloading.ordtype]
-Lemmas.T [variable, in LemmaOverloading.ordtype]
-lex [definition, in LemmaOverloading.ordtype]
-lfresh [definition, in LemmaOverloading.heaps]
-lfresh_null [lemma, in LemmaOverloading.heaps]
-lfresh_low [lemma, in LemmaOverloading.heaps]
-lhE [lemma, in LemmaOverloading.heaps]
-LiftChain [section, in LemmaOverloading.domains]
-LiftChain.s [variable, in LemmaOverloading.domains]
-LiftChain.T [variable, in LemmaOverloading.domains]
-lift_chain [definition, in LemmaOverloading.domains]
-lift_chainP [lemma, in LemmaOverloading.domains]
-limE [lemma, in LemmaOverloading.domains]
-lim_dappE [lemma, in LemmaOverloading.domains]
-lim_appE [lemma, in LemmaOverloading.domains]
-lim_liftE [lemma, in LemmaOverloading.domains]
-lim_mono [lemma, in LemmaOverloading.domains]
-ListMembership [section, in LemmaOverloading.rels]
-ListMembership.T [variable, in LemmaOverloading.rels]
-llist [abbreviation, in LemmaOverloading.llistR]
-LList [section, in LemmaOverloading.llistR]
-llist [definition, in LemmaOverloading.llistR]
-llistR [library]
-LList.T [variable, in LemmaOverloading.llistR]
-locality [lemma, in LemmaOverloading.stsep]
-lolli [definition, in LemmaOverloading.stsep]
-look [definition, in LemmaOverloading.heaps]
-lookF [lemma, in LemmaOverloading.heaps]
-lookPtUn [lemma, in LemmaOverloading.heaps]
-lookR [lemma, in LemmaOverloading.terms]
-lookU [lemma, in LemmaOverloading.heaps]
-lookUnl [lemma, in LemmaOverloading.heaps]
-lookUnr [lemma, in LemmaOverloading.heaps]
-low [definition, in LemmaOverloading.heaps]
-loweq [definition, in LemmaOverloading.heaps]
-loweqE [lemma, in LemmaOverloading.heaps]
-loweqK [lemma, in LemmaOverloading.heaps]
-loweqP [lemma, in LemmaOverloading.heaps]
-lowPn [lemma, in LemmaOverloading.heaps]
-lowPtUn [lemma, in LemmaOverloading.heaps]
-lowUn [lemma, in LemmaOverloading.heaps]
-low_trans [lemma, in LemmaOverloading.heaps]
-low_sym [lemma, in LemmaOverloading.heaps]
-low_refl [lemma, in LemmaOverloading.heaps]
-lseg [definition, in LemmaOverloading.llistR]
-lseg_case [lemma, in LemmaOverloading.llistR]
-lseg_empty [lemma, in LemmaOverloading.llistR]
-lseg_neq [lemma, in LemmaOverloading.llistR]
-lseg_null [lemma, in LemmaOverloading.llistR]
-lseg_add_last [lemma, in LemmaOverloading.llistR]
-lseq [definition, in LemmaOverloading.llistR]
-lseq_pos [lemma, in LemmaOverloading.llistR]
-lseq_null [lemma, in LemmaOverloading.llistR]
-ltn_ptr_total [lemma, in LemmaOverloading.heaps]
-ltn_ptr_trans [lemma, in LemmaOverloading.heaps]
-ltn_ptr_irr [lemma, in LemmaOverloading.heaps]
-ltn_ptr [definition, in LemmaOverloading.heaps]
-

M

-Match_seq [definition, in LemmaOverloading.stsep]
-Match_nat [definition, in LemmaOverloading.stsep]
-Match_dec [definition, in LemmaOverloading.stsep]
-Match_opt [definition, in LemmaOverloading.stsep]
-Mem [definition, in LemmaOverloading.rels]
-MemE [definition, in LemmaOverloading.rels]
-MemProp [constructor, in LemmaOverloading.rels]
-Mem_Seq1 [lemma, in LemmaOverloading.rels]
-Mem_Seq [definition, in LemmaOverloading.rels]
-Mem_Mem [lemma, in LemmaOverloading.rels]
-Mem_Simpl [lemma, in LemmaOverloading.rels]
-Mem_toPred [lemma, in LemmaOverloading.rels]
-Mem_Pred [inductive, in LemmaOverloading.rels]
-mkPredType [definition, in LemmaOverloading.rels]
-Model [module, in LemmaOverloading.stmod]
-model [projection, in LemmaOverloading.stmod]
-modelE [lemma, in LemmaOverloading.stmod]
-model_runs [lemma, in LemmaOverloading.stmod]
-Model.alloc [definition, in LemmaOverloading.stmod]
-Model.Allocation [section, in LemmaOverloading.stmod]
-Model.Allocation.A [variable, in LemmaOverloading.stmod]
-Model.Allocation.v [variable, in LemmaOverloading.stmod]
-Model.allocb [definition, in LemmaOverloading.stmod]
-Model.allocb_has_spec [lemma, in LemmaOverloading.stmod]
-Model.allocb_dstrict [lemma, in LemmaOverloading.stmod]
-Model.allocb_coherent [lemma, in LemmaOverloading.stmod]
-Model.allocb_sp [definition, in LemmaOverloading.stmod]
-Model.allocb_s [definition, in LemmaOverloading.stmod]
-Model.alloc_has_spec [lemma, in LemmaOverloading.stmod]
-Model.alloc_dstrict [lemma, in LemmaOverloading.stmod]
-Model.alloc_coherent [lemma, in LemmaOverloading.stmod]
-Model.alloc_sp [definition, in LemmaOverloading.stmod]
-Model.alloc_s [definition, in LemmaOverloading.stmod]
-Model.bind [definition, in LemmaOverloading.stmod]
-Model.Bind [section, in LemmaOverloading.stmod]
-Model.bind_has_spec [lemma, in LemmaOverloading.stmod]
-Model.bind_dstrict [lemma, in LemmaOverloading.stmod]
-Model.bind_coherent [lemma, in LemmaOverloading.stmod]
-Model.bind_sp [definition, in LemmaOverloading.stmod]
-Model.bind_s [definition, in LemmaOverloading.stmod]
-Model.bind_post [definition, in LemmaOverloading.stmod]
-Model.bind_pre [definition, in LemmaOverloading.stmod]
-Model.Bind.A [variable, in LemmaOverloading.stmod]
-Model.Bind.B [variable, in LemmaOverloading.stmod]
-Model.Bind.e1 [variable, in LemmaOverloading.stmod]
-Model.Bind.e2 [variable, in LemmaOverloading.stmod]
-Model.Bind.s1 [variable, in LemmaOverloading.stmod]
-Model.Bind.s2 [variable, in LemmaOverloading.stmod]
-Model.BlockAllocation [section, in LemmaOverloading.stmod]
-Model.BlockAllocation.A [variable, in LemmaOverloading.stmod]
-Model.BlockAllocation.n [variable, in LemmaOverloading.stmod]
-Model.BlockAllocation.v [variable, in LemmaOverloading.stmod]
-Model.conseq [definition, in LemmaOverloading.stmod]
-Model.Consequence [section, in LemmaOverloading.stmod]
-Model.Consequence.A [variable, in LemmaOverloading.stmod]
-Model.Consequence.e [variable, in LemmaOverloading.stmod]
-Model.Consequence.pf [variable, in LemmaOverloading.stmod]
-Model.Consequence.s1 [variable, in LemmaOverloading.stmod]
-Model.Consequence.s2 [variable, in LemmaOverloading.stmod]
-Model.conseq_refl [lemma, in LemmaOverloading.stmod]
-Model.dealloc [definition, in LemmaOverloading.stmod]
-Model.Deallocation [section, in LemmaOverloading.stmod]
-Model.Deallocation.x [variable, in LemmaOverloading.stmod]
-Model.dealloc_has_spec [lemma, in LemmaOverloading.stmod]
-Model.dealloc_dstrict [lemma, in LemmaOverloading.stmod]
-Model.dealloc_coherent [lemma, in LemmaOverloading.stmod]
-Model.dealloc_sp [definition, in LemmaOverloading.stmod]
-Model.dealloc_s [definition, in LemmaOverloading.stmod]
-Model.Do [definition, in LemmaOverloading.stmod]
-Model.do_has_spec [lemma, in LemmaOverloading.stmod]
-Model.do_dstrict [lemma, in LemmaOverloading.stmod]
-Model.do_coherent [lemma, in LemmaOverloading.stmod]
-Model.do_sp [definition, in LemmaOverloading.stmod]
-Model.ffix [definition, in LemmaOverloading.stmod]
-Model.Fix [section, in LemmaOverloading.stmod]
-Model.Fix.A [variable, in LemmaOverloading.stmod]
-Model.Fix.B [variable, in LemmaOverloading.stmod]
-Model.Fix.f [variable, in LemmaOverloading.stmod]
-Model.Fix.s [variable, in LemmaOverloading.stmod]
-Model.f' [definition, in LemmaOverloading.stmod]
-Model.lat [abbreviation, in LemmaOverloading.stmod]
-Model.read [definition, in LemmaOverloading.stmod]
-Model.Read [section, in LemmaOverloading.stmod]
-Model.read_has_spec [lemma, in LemmaOverloading.stmod]
-Model.read_dstrict [lemma, in LemmaOverloading.stmod]
-Model.read_coherent [lemma, in LemmaOverloading.stmod]
-Model.read_sp [definition, in LemmaOverloading.stmod]
-Model.read_s [definition, in LemmaOverloading.stmod]
-Model.Read.A [variable, in LemmaOverloading.stmod]
-Model.Read.x [variable, in LemmaOverloading.stmod]
-Model.ret [definition, in LemmaOverloading.stmod]
-Model.Return [section, in LemmaOverloading.stmod]
-Model.Return.A [variable, in LemmaOverloading.stmod]
-Model.Return.x [variable, in LemmaOverloading.stmod]
-Model.ret_has_spec [lemma, in LemmaOverloading.stmod]
-Model.ret_dstrict [lemma, in LemmaOverloading.stmod]
-Model.ret_coherent [lemma, in LemmaOverloading.stmod]
-Model.ret_sp [definition, in LemmaOverloading.stmod]
-Model.ret_s [definition, in LemmaOverloading.stmod]
-Model.throw [definition, in LemmaOverloading.stmod]
-Model.Throw [section, in LemmaOverloading.stmod]
-Model.throw_has_spec [lemma, in LemmaOverloading.stmod]
-Model.throw_dstrict [lemma, in LemmaOverloading.stmod]
-Model.throw_coherent [lemma, in LemmaOverloading.stmod]
-Model.throw_sp [definition, in LemmaOverloading.stmod]
-Model.throw_s [definition, in LemmaOverloading.stmod]
-Model.Throw.A [variable, in LemmaOverloading.stmod]
-Model.Throw.e [variable, in LemmaOverloading.stmod]
-Model.tp [abbreviation, in LemmaOverloading.stmod]
-Model.try [definition, in LemmaOverloading.stmod]
-Model.Try [section, in LemmaOverloading.stmod]
-Model.try_has_spec [lemma, in LemmaOverloading.stmod]
-Model.try_dstrict [lemma, in LemmaOverloading.stmod]
-Model.try_coherent [lemma, in LemmaOverloading.stmod]
-Model.try_sp [definition, in LemmaOverloading.stmod]
-Model.try_s [definition, in LemmaOverloading.stmod]
-Model.try_post [definition, in LemmaOverloading.stmod]
-Model.try_pre [definition, in LemmaOverloading.stmod]
-Model.Try.A [variable, in LemmaOverloading.stmod]
-Model.Try.B [variable, in LemmaOverloading.stmod]
-Model.Try.e [variable, in LemmaOverloading.stmod]
-Model.Try.e1 [variable, in LemmaOverloading.stmod]
-Model.Try.e2 [variable, in LemmaOverloading.stmod]
-Model.Try.s [variable, in LemmaOverloading.stmod]
-Model.Try.s1 [variable, in LemmaOverloading.stmod]
-Model.Try.s2 [variable, in LemmaOverloading.stmod]
-Model.write [definition, in LemmaOverloading.stmod]
-Model.Write [section, in LemmaOverloading.stmod]
-Model.write_has_spec [lemma, in LemmaOverloading.stmod]
-Model.write_dstrict [lemma, in LemmaOverloading.stmod]
-Model.write_coherent [lemma, in LemmaOverloading.stmod]
-Model.write_sp [definition, in LemmaOverloading.stmod]
-Model.write_s [definition, in LemmaOverloading.stmod]
-Model.Write.A [variable, in LemmaOverloading.stmod]
-Model.Write.v [variable, in LemmaOverloading.stmod]
-Model.Write.x [variable, in LemmaOverloading.stmod]
-modnS [lemma, in LemmaOverloading.heaps]
-monotone [definition, in LemmaOverloading.domains]
-

N

-NatChain [section, in LemmaOverloading.domains]
-NatOrd [section, in LemmaOverloading.ordtype]
-NatPoset [section, in LemmaOverloading.domains]
-natPosetMixin [definition, in LemmaOverloading.domains]
-nat_chain [definition, in LemmaOverloading.domains]
-nat_chain_axiom [lemma, in LemmaOverloading.domains]
-nat_trans [lemma, in LemmaOverloading.domains]
-nat_asym [lemma, in LemmaOverloading.domains]
-nat_refl [lemma, in LemmaOverloading.domains]
-nat_botP [lemma, in LemmaOverloading.domains]
-nat_ordMixin [definition, in LemmaOverloading.ordtype]
-nat_ptr [definition, in LemmaOverloading.heaps]
-nil [abbreviation, in LemmaOverloading.finmap]
-nil [abbreviation, in LemmaOverloading.finmap]
-nil [abbreviation, in LemmaOverloading.finmap]
-nil [abbreviation, in LemmaOverloading.finmap]
-nil [definition, in LemmaOverloading.finmap]
-NoAlias [module, in LemmaOverloading.noalias]
-noalias [lemma, in LemmaOverloading.heaps]
-noalias [library]
-noaliasBT [library]
-noaliasCTC [library]
-noaliasR [lemma, in LemmaOverloading.noaliasCTC]
-noaliasR [lemma, in LemmaOverloading.noalias]
-noaliasR [lemma, in LemmaOverloading.noaliasBT]
-noaliasR_fwd3' [lemma, in LemmaOverloading.noalias]
-noaliasR_fwd3 [lemma, in LemmaOverloading.noalias]
-noaliasR_fwd' [abbreviation, in LemmaOverloading.noalias]
-noaliasR_fwd_wrong1 [lemma, in LemmaOverloading.noalias]
-noaliasR_fwd [abbreviation, in LemmaOverloading.noalias]
-noaliasR_fwd1 [lemma, in LemmaOverloading.noalias]
-noaliasR2 [lemma, in LemmaOverloading.noaliasBT]
-NoAlias.Exports [module, in LemmaOverloading.noalias]
-NoAlias.form [record, in LemmaOverloading.noalias]
-NoAlias.Form [constructor, in LemmaOverloading.noalias]
-NoAlias.NoAliasSection [section, in LemmaOverloading.noalias]
-NoAlias.noalias_pf [lemma, in LemmaOverloading.noalias]
-NoAlias.singleton [definition, in LemmaOverloading.noalias]
-NoAlias.Tag [constructor, in LemmaOverloading.noalias]
-NoAlias.tagged_ptr [record, in LemmaOverloading.noalias]
-NoAlias.untag [projection, in LemmaOverloading.noalias]
-NoAlias.y_of [projection, in LemmaOverloading.noalias]
-NoAlias2 [module, in LemmaOverloading.noaliasBT]
-NoAlias2.eq_of [projection, in LemmaOverloading.noaliasBT]
-NoAlias2.Exports [module, in LemmaOverloading.noaliasBT]
-NoAlias2.form [record, in LemmaOverloading.noaliasBT]
-NoAlias2.Form [constructor, in LemmaOverloading.noaliasBT]
-NoAlias2.NoAlias2Section [section, in LemmaOverloading.noaliasBT]
-NoAlias2.start_pf [lemma, in LemmaOverloading.noaliasBT]
-NoAlias2.Tag [constructor, in LemmaOverloading.noaliasBT]
-NoAlias2.tagged_bool [record, in LemmaOverloading.noaliasBT]
-NoAlias2.untag [projection, in LemmaOverloading.noaliasBT]
-NoAlias3 [module, in LemmaOverloading.noaliasBT]
-NoAlias3.Exports [module, in LemmaOverloading.noaliasBT]
-NoAlias3.form [record, in LemmaOverloading.noaliasBT]
-NoAlias3.Form [constructor, in LemmaOverloading.noaliasBT]
-NoAlias3.noalias_pf [lemma, in LemmaOverloading.noaliasBT]
-NoAlias3.NoAlias3Section [section, in LemmaOverloading.noaliasBT]
-NoAlias3.y_of [projection, in LemmaOverloading.noaliasBT]
-notin_filter [lemma, in LemmaOverloading.finmap]
-notin_path [lemma, in LemmaOverloading.finmap]
-nsym [lemma, in LemmaOverloading.ordtype]
-null [definition, in LemmaOverloading.heaps]
-NullLemmas [section, in LemmaOverloading.heaps]
-NullLemmas.d [variable, in LemmaOverloading.heaps]
-NullLemmas.f [variable, in LemmaOverloading.heaps]
-NullLemmas.g [variable, in LemmaOverloading.heaps]
-NullLemmas.x [variable, in LemmaOverloading.heaps]
-

O

-onth [definition, in LemmaOverloading.prefix]
-onth_size [lemma, in LemmaOverloading.prefix]
-opn [lemma, in LemmaOverloading.stlog]
-Ops [section, in LemmaOverloading.finmap]
-Ops.K [variable, in LemmaOverloading.finmap]
-Ops.V [variable, in LemmaOverloading.finmap]
-Ordered [module, in LemmaOverloading.ordtype]
-Ordered.base [projection, in LemmaOverloading.ordtype]
-Ordered.class [definition, in LemmaOverloading.ordtype]
-Ordered.Class [constructor, in LemmaOverloading.ordtype]
-Ordered.ClassDef [section, in LemmaOverloading.ordtype]
-Ordered.ClassDef.cT [variable, in LemmaOverloading.ordtype]
-Ordered.ClassDef.T [variable, in LemmaOverloading.ordtype]
-Ordered.class_of [record, in LemmaOverloading.ordtype]
-Ordered.clone [definition, in LemmaOverloading.ordtype]
-Ordered.eqType [definition, in LemmaOverloading.ordtype]
-Ordered.Exports [module, in LemmaOverloading.ordtype]
-Ordered.Exports.ord [definition, in LemmaOverloading.ordtype]
-Ordered.Exports.OrdMixin [abbreviation, in LemmaOverloading.ordtype]
-Ordered.Exports.OrdType [abbreviation, in LemmaOverloading.ordtype]
-Ordered.Exports.ordType [abbreviation, in LemmaOverloading.ordtype]
-[ ordType of _ ] (form_scope) [notation, in LemmaOverloading.ordtype]
-[ ordType of _ for _ ] (form_scope) [notation, in LemmaOverloading.ordtype]
-Ordered.mixin [projection, in LemmaOverloading.ordtype]
-Ordered.Mixin [constructor, in LemmaOverloading.ordtype]
-Ordered.mixin_of [record, in LemmaOverloading.ordtype]
-Ordered.ordering [projection, in LemmaOverloading.ordtype]
-Ordered.pack [definition, in LemmaOverloading.ordtype]
-Ordered.Pack [constructor, in LemmaOverloading.ordtype]
-Ordered.RawMixin [section, in LemmaOverloading.ordtype]
-Ordered.sort [projection, in LemmaOverloading.ordtype]
-Ordered.type [record, in LemmaOverloading.ordtype]
-ordf [definition, in LemmaOverloading.ordtype]
-ordinal_ordMixin [definition, in LemmaOverloading.ordtype]
-ordtype [library]
-ord_path [lemma, in LemmaOverloading.finmap]
-orFp [lemma, in LemmaOverloading.rels]
-orL_tag [definition, in LemmaOverloading.auto]
-orpF [lemma, in LemmaOverloading.rels]
-orpT [lemma, in LemmaOverloading.rels]
-orrA [lemma, in LemmaOverloading.rels]
-orrAb [lemma, in LemmaOverloading.rels]
-orrAC [lemma, in LemmaOverloading.rels]
-orrC [lemma, in LemmaOverloading.rels]
-orrCA [lemma, in LemmaOverloading.rels]
-orrI [lemma, in LemmaOverloading.rels]
-orR_tag [definition, in LemmaOverloading.auto]
-orr0 [lemma, in LemmaOverloading.rels]
-orTp [lemma, in LemmaOverloading.rels]
-or0r [lemma, in LemmaOverloading.rels]
-or5 [inductive, in LemmaOverloading.prelude]
-or5P [lemma, in LemmaOverloading.prelude]
-Or51 [constructor, in LemmaOverloading.prelude]
-Or52 [constructor, in LemmaOverloading.prelude]
-Or53 [constructor, in LemmaOverloading.prelude]
-Or54 [constructor, in LemmaOverloading.prelude]
-Or55 [constructor, in LemmaOverloading.prelude]
-or6 [inductive, in LemmaOverloading.prelude]
-or6P [lemma, in LemmaOverloading.prelude]
-Or61 [constructor, in LemmaOverloading.prelude]
-Or62 [constructor, in LemmaOverloading.prelude]
-Or63 [constructor, in LemmaOverloading.prelude]
-Or64 [constructor, in LemmaOverloading.prelude]
-Or65 [constructor, in LemmaOverloading.prelude]
-Or66 [constructor, in LemmaOverloading.prelude]
-

P

-Pack [constructor, in LemmaOverloading.cancel2]
-PackHeap [constructor, in LemmaOverloading.cancel2]
-pack_right [definition, in LemmaOverloading.cancel2]
-pack_found [definition, in LemmaOverloading.cancel2]
-pack_h [projection, in LemmaOverloading.cancel2]
-pack_heap [record, in LemmaOverloading.cancel2]
-pack01 [definition, in LemmaOverloading.cancel2]
-pack02 [definition, in LemmaOverloading.cancel2]
-pack03 [definition, in LemmaOverloading.cancel2]
-pack04 [definition, in LemmaOverloading.cancel2]
-pack05 [definition, in LemmaOverloading.cancel2]
-pack06 [definition, in LemmaOverloading.cancel2]
-pack07 [definition, in LemmaOverloading.cancel2]
-pack08 [definition, in LemmaOverloading.cancel2]
-pack09 [definition, in LemmaOverloading.cancel2]
-pack10 [definition, in LemmaOverloading.cancel2]
-PairCPO [section, in LemmaOverloading.domains]
-pairCPOMixin [definition, in LemmaOverloading.domains]
-PairCPO.A [variable, in LemmaOverloading.domains]
-PairCPO.B [variable, in LemmaOverloading.domains]
-PairLattice [section, in LemmaOverloading.domains]
-pairLatticeMixin [definition, in LemmaOverloading.domains]
-PairLattice.A [variable, in LemmaOverloading.domains]
-PairLattice.B [variable, in LemmaOverloading.domains]
-PairPoset [section, in LemmaOverloading.domains]
-pairPosetMixin [definition, in LemmaOverloading.domains]
-PairPoset.A [variable, in LemmaOverloading.domains]
-PairPoset.B [variable, in LemmaOverloading.domains]
-pair_limM [lemma, in LemmaOverloading.domains]
-pair_limP [lemma, in LemmaOverloading.domains]
-pair_lim [definition, in LemmaOverloading.domains]
-pair_supM [lemma, in LemmaOverloading.domains]
-pair_supP [lemma, in LemmaOverloading.domains]
-pair_sup [definition, in LemmaOverloading.domains]
-pair_trans [lemma, in LemmaOverloading.domains]
-pair_asym [lemma, in LemmaOverloading.domains]
-pair_refl [lemma, in LemmaOverloading.domains]
-pair_botP [lemma, in LemmaOverloading.domains]
-pair_leq [definition, in LemmaOverloading.domains]
-pair_bot [definition, in LemmaOverloading.domains]
-path_supp_ins_inv [lemma, in LemmaOverloading.finmap]
-path_supp_ins [lemma, in LemmaOverloading.finmap]
-path_supp_ord [lemma, in LemmaOverloading.finmap]
-path_ins' [lemma, in LemmaOverloading.finmap]
-path_filter [lemma, in LemmaOverloading.heaps]
-path_last [lemma, in LemmaOverloading.heaps]
-perm [inductive, in LemmaOverloading.perms]
-perms [library]
-Permutations [section, in LemmaOverloading.perms]
-Permutations.A [variable, in LemmaOverloading.perms]
-permutation_trans [constructor, in LemmaOverloading.perms]
-permutation_swap [constructor, in LemmaOverloading.perms]
-permutation_skip [constructor, in LemmaOverloading.perms]
-permutation_nil [constructor, in LemmaOverloading.perms]
-perm_catCA [lemma, in LemmaOverloading.perms]
-perm_catAC [lemma, in LemmaOverloading.perms]
-perm_cat2r [lemma, in LemmaOverloading.perms]
-perm_cat2l [lemma, in LemmaOverloading.perms]
-perm_cat_cons [lemma, in LemmaOverloading.perms]
-perm_cons_cat_cons [lemma, in LemmaOverloading.perms]
-perm_cons [lemma, in LemmaOverloading.perms]
-perm_cat_consR [lemma, in LemmaOverloading.perms]
-perm_ind2 [lemma, in LemmaOverloading.perms]
-perm_cons_cat_consL [lemma, in LemmaOverloading.perms]
-perm_cons_catAC [lemma, in LemmaOverloading.perms]
-perm_cons_catCA [lemma, in LemmaOverloading.perms]
-perm_catC [lemma, in LemmaOverloading.perms]
-perm_cat_consL [lemma, in LemmaOverloading.perms]
-perm_catL [lemma, in LemmaOverloading.perms]
-perm_cat2rL [lemma, in LemmaOverloading.perms]
-perm_cat2lL [lemma, in LemmaOverloading.perms]
-perm_in [lemma, in LemmaOverloading.perms]
-perm_trans [lemma, in LemmaOverloading.perms]
-perm_sym [lemma, in LemmaOverloading.perms]
-perm_refl [lemma, in LemmaOverloading.perms]
-perm_nil [lemma, in LemmaOverloading.perms]
-pext [axiom, in LemmaOverloading.prelude]
-pfree [definition, in LemmaOverloading.terms]
-pfreeE [lemma, in LemmaOverloading.terms]
-pfreeN [lemma, in LemmaOverloading.terms]
-pfree_def [lemma, in LemmaOverloading.terms]
-pfree_subdom [lemma, in LemmaOverloading.terms]
-pick [definition, in LemmaOverloading.heaps]
-pickP [lemma, in LemmaOverloading.heaps]
-pL [definition, in LemmaOverloading.prelude]
-plook [definition, in LemmaOverloading.terms]
-plook' [abbreviation, in LemmaOverloading.terms]
-plus2 [definition, in LemmaOverloading.heaps]
-Poset [module, in LemmaOverloading.domains]
-Poset.bot [definition, in LemmaOverloading.domains]
-Poset.class [definition, in LemmaOverloading.domains]
-Poset.Class [constructor, in LemmaOverloading.domains]
-Poset.ClassDef [section, in LemmaOverloading.domains]
-Poset.ClassDef.cT [variable, in LemmaOverloading.domains]
-Poset.ClassDef.T [variable, in LemmaOverloading.domains]
-Poset.class_of [record, in LemmaOverloading.domains]
-Poset.clone [definition, in LemmaOverloading.domains]
-Poset.Exports [module, in LemmaOverloading.domains]
-Poset.Exports.bot [abbreviation, in LemmaOverloading.domains]
-Poset.Exports.botP [lemma, in LemmaOverloading.domains]
-Poset.Exports.Laws [section, in LemmaOverloading.domains]
-Poset.Exports.Laws.T [variable, in LemmaOverloading.domains]
-Poset.Exports.Poset [abbreviation, in LemmaOverloading.domains]
-Poset.Exports.poset [abbreviation, in LemmaOverloading.domains]
-Poset.Exports.PosetMixin [abbreviation, in LemmaOverloading.domains]
-Poset.Exports.poset_trans [lemma, in LemmaOverloading.domains]
-Poset.Exports.poset_asym [lemma, in LemmaOverloading.domains]
-Poset.Exports.poset_refl [lemma, in LemmaOverloading.domains]
-[ poset of _ ] (form_scope) [notation, in LemmaOverloading.domains]
-[ poset of _ for _ ] (form_scope) [notation, in LemmaOverloading.domains]
-_ <== _ [notation, in LemmaOverloading.domains]
-Poset.leq [definition, in LemmaOverloading.domains]
-Poset.mixin [projection, in LemmaOverloading.domains]
-Poset.Mixin [constructor, in LemmaOverloading.domains]
-Poset.mixin_of [record, in LemmaOverloading.domains]
-Poset.mx_bot [projection, in LemmaOverloading.domains]
-Poset.mx_leq [projection, in LemmaOverloading.domains]
-Poset.pack [definition, in LemmaOverloading.domains]
-Poset.Pack [constructor, in LemmaOverloading.domains]
-Poset.RawMixin [section, in LemmaOverloading.domains]
-Poset.sort [projection, in LemmaOverloading.domains]
-Poset.type [record, in LemmaOverloading.domains]
-post [abbreviation, in LemmaOverloading.stmod]
-pow [definition, in LemmaOverloading.domains]
-pow_chain [definition, in LemmaOverloading.domains]
-pow_mono [lemma, in LemmaOverloading.domains]
-ppts [definition, in LemmaOverloading.hprop]
-pR [definition, in LemmaOverloading.prelude]
-pre [abbreviation, in LemmaOverloading.stmod]
-pread [definition, in LemmaOverloading.terms]
-pread' [abbreviation, in LemmaOverloading.terms]
-Pred [definition, in LemmaOverloading.rels]
-PredArgType [definition, in LemmaOverloading.rels]
-PredC [definition, in LemmaOverloading.rels]
-predCk [abbreviation, in LemmaOverloading.finmap]
-predCk [definition, in LemmaOverloading.finmap]
-PredCPO [section, in LemmaOverloading.domains]
-predCPOMixin [definition, in LemmaOverloading.domains]
-PredCPO.A [variable, in LemmaOverloading.domains]
-PredD [definition, in LemmaOverloading.rels]
-PredI [definition, in LemmaOverloading.rels]
-Predicates [section, in LemmaOverloading.rels]
-Predicates.T [variable, in LemmaOverloading.rels]
-predk [abbreviation, in LemmaOverloading.finmap]
-predk [definition, in LemmaOverloading.finmap]
-predkN [lemma, in LemmaOverloading.finmap]
-PredLattice [section, in LemmaOverloading.domains]
-predLatticeMixin [definition, in LemmaOverloading.domains]
-PredLattice.A [variable, in LemmaOverloading.domains]
-PredPoset [section, in LemmaOverloading.domains]
-predPosetMixin [definition, in LemmaOverloading.domains]
-PredPoset.A [variable, in LemmaOverloading.domains]
-PredT [definition, in LemmaOverloading.rels]
-PredType [record, in LemmaOverloading.rels]
-PredU [definition, in LemmaOverloading.rels]
-pred_of [projection, in LemmaOverloading.domains]
-Pred_Class [abbreviation, in LemmaOverloading.rels]
-Pred_Sort [projection, in LemmaOverloading.rels]
-Pred0 [definition, in LemmaOverloading.rels]
-Pred1 [definition, in LemmaOverloading.rels]
-prefix [definition, in LemmaOverloading.prefix]
-Prefix [section, in LemmaOverloading.prefix]
-prefix [library]
-prefix_onth [lemma, in LemmaOverloading.prefix]
-prefix_size [lemma, in LemmaOverloading.prefix]
-prefix_cons' [lemma, in LemmaOverloading.prefix]
-prefix_cons [lemma, in LemmaOverloading.prefix]
-prefix_trans [lemma, in LemmaOverloading.prefix]
-prefix_refl [lemma, in LemmaOverloading.prefix]
-Prefix.A [variable, in LemmaOverloading.prefix]
-Preim [definition, in LemmaOverloading.rels]
-prelude [library]
-ProdChain [section, in LemmaOverloading.domains]
-ProdChain.f1 [variable, in LemmaOverloading.domains]
-ProdChain.f2 [variable, in LemmaOverloading.domains]
-ProdChain.M1 [variable, in LemmaOverloading.domains]
-ProdChain.M2 [variable, in LemmaOverloading.domains]
-ProdChain.s [variable, in LemmaOverloading.domains]
-ProdChain.S1 [variable, in LemmaOverloading.domains]
-ProdChain.S2 [variable, in LemmaOverloading.domains]
-ProdChain.T1 [variable, in LemmaOverloading.domains]
-ProdChain.T2 [variable, in LemmaOverloading.domains]
-ProdOrd [section, in LemmaOverloading.ordtype]
-ProdOrd.K [variable, in LemmaOverloading.ordtype]
-ProdOrd.T [variable, in LemmaOverloading.ordtype]
-prod_cont [lemma, in LemmaOverloading.domains]
-prod_chain [definition, in LemmaOverloading.domains]
-prod_mono [lemma, in LemmaOverloading.domains]
-prod_ordMixin [definition, in LemmaOverloading.ordtype]
-prog [definition, in LemmaOverloading.stmod]
-ProjChain [section, in LemmaOverloading.domains]
-ProjChain.s [variable, in LemmaOverloading.domains]
-ProjChain.T1 [variable, in LemmaOverloading.domains]
-ProjChain.T2 [variable, in LemmaOverloading.domains]
-proj1_cont [lemma, in LemmaOverloading.domains]
-proj1_prodE [lemma, in LemmaOverloading.domains]
-proj1_diagE [lemma, in LemmaOverloading.domains]
-proj1_chain [definition, in LemmaOverloading.domains]
-proj1_mono [lemma, in LemmaOverloading.domains]
-proj2_cont [lemma, in LemmaOverloading.domains]
-proj2_prodE [lemma, in LemmaOverloading.domains]
-proj2_diagE [lemma, in LemmaOverloading.domains]
-proj2_chain [definition, in LemmaOverloading.domains]
-proj2_mono [lemma, in LemmaOverloading.domains]
-proof [projection, in LemmaOverloading.cancel2]
-proof_irrelevance [lemma, in LemmaOverloading.prelude]
-prop [projection, in LemmaOverloading.cancel2]
-PropCPO [section, in LemmaOverloading.domains]
-propCPOMixin [definition, in LemmaOverloading.domains]
-PropLattice [section, in LemmaOverloading.domains]
-propLatticeMixin [definition, in LemmaOverloading.domains]
-PropPoset [section, in LemmaOverloading.domains]
-propPosetMixin [definition, in LemmaOverloading.domains]
-PropPredType [constructor, in LemmaOverloading.rels]
-prop_limM [lemma, in LemmaOverloading.domains]
-prop_limP [lemma, in LemmaOverloading.domains]
-prop_lim [definition, in LemmaOverloading.domains]
-prop_supM [lemma, in LemmaOverloading.domains]
-prop_supP [lemma, in LemmaOverloading.domains]
-prop_sup [definition, in LemmaOverloading.domains]
-prop_trans [lemma, in LemmaOverloading.domains]
-prop_asym [lemma, in LemmaOverloading.domains]
-prop_refl [lemma, in LemmaOverloading.domains]
-prop_botP [lemma, in LemmaOverloading.domains]
-prop_leq [definition, in LemmaOverloading.domains]
-prop_bot [definition, in LemmaOverloading.domains]
-prop_of [projection, in LemmaOverloading.auto]
-prop_of [projection, in LemmaOverloading.cancelD]
-ptr [inductive, in LemmaOverloading.heaps]
-ptrA [lemma, in LemmaOverloading.heaps]
-ptrE [lemma, in LemmaOverloading.heaps]
-ptreq [definition, in LemmaOverloading.terms]
-ptrK [lemma, in LemmaOverloading.heaps]
-ptrs [definition, in LemmaOverloading.terms]
-ptrT [lemma, in LemmaOverloading.heaps]
-ptr_has [lemma, in LemmaOverloading.terms]
-ptr_ctx [projection, in LemmaOverloading.terms]
-ptr_ordMixin [definition, in LemmaOverloading.heaps]
-ptr_null [lemma, in LemmaOverloading.heaps]
-ptr_offset [definition, in LemmaOverloading.heaps]
-ptr_eqMixin [definition, in LemmaOverloading.heaps]
-ptr_nat [constructor, in LemmaOverloading.heaps]
-ptr0 [lemma, in LemmaOverloading.heaps]
-Pts [constructor, in LemmaOverloading.terms]
-pts [definition, in LemmaOverloading.heaps]
-pts_pf [lemma, in LemmaOverloading.cancel]
-pts_tag [definition, in LemmaOverloading.cancel]
-pts_inv [definition, in LemmaOverloading.cancel2]
-pts_h [projection, in LemmaOverloading.cancel2]
-pts_struct [instance, in LemmaOverloading.cancelCTC]
-pts_inj [lemma, in LemmaOverloading.heaps]
-pts_injT [lemma, in LemmaOverloading.heaps]
-pts_injP [lemma, in LemmaOverloading.heaps]
-pull [definition, in LemmaOverloading.stlog]
-puntag [projection, in LemmaOverloading.cancelD]
-push [definition, in LemmaOverloading.stlog]
-

R

-rA [definition, in LemmaOverloading.prelude]
-rAC [definition, in LemmaOverloading.prelude]
-rACI [lemma, in LemmaOverloading.prelude]
-rCA [definition, in LemmaOverloading.prelude]
-rCAI [lemma, in LemmaOverloading.prelude]
-read [definition, in LemmaOverloading.stsep]
-readP [lemma, in LemmaOverloading.stsep]
-read_s [definition, in LemmaOverloading.stsep]
-recurse [definition, in LemmaOverloading.auto]
-recurse_pf [lemma, in LemmaOverloading.xfind]
-recurse_tag [definition, in LemmaOverloading.xfind]
-recurse_struct [instance, in LemmaOverloading.xfindCTC]
-ReflectConnectives [section, in LemmaOverloading.prelude]
-ReflectConnectives.b1 [variable, in LemmaOverloading.prelude]
-ReflectConnectives.b2 [variable, in LemmaOverloading.prelude]
-ReflectConnectives.b3 [variable, in LemmaOverloading.prelude]
-ReflectConnectives.b4 [variable, in LemmaOverloading.prelude]
-ReflectConnectives.b5 [variable, in LemmaOverloading.prelude]
-ReflectConnectives.b6 [variable, in LemmaOverloading.prelude]
-refl_jmeq2 [lemma, in LemmaOverloading.prelude]
-reindex [lemma, in LemmaOverloading.domains]
-relax [definition, in LemmaOverloading.domains]
-relaxP [lemma, in LemmaOverloading.domains]
-RelLaws [section, in LemmaOverloading.rels]
-RelLaws.T [variable, in LemmaOverloading.rels]
-RelProperties [section, in LemmaOverloading.rels]
-RelProperties.pT [variable, in LemmaOverloading.rels]
-RelProperties.T [variable, in LemmaOverloading.rels]
-rels [library]
-rem [definition, in LemmaOverloading.finmap]
-remove [definition, in LemmaOverloading.llistR]
-rem_supp [lemma, in LemmaOverloading.finmap]
-rem_ins [lemma, in LemmaOverloading.finmap]
-rem_rem [lemma, in LemmaOverloading.finmap]
-rem_empty [lemma, in LemmaOverloading.finmap]
-Reorder [section, in LemmaOverloading.prelude]
-Reorder.A [variable, in LemmaOverloading.prelude]
-Reorder.B [variable, in LemmaOverloading.prelude]
-Reorder.C [variable, in LemmaOverloading.prelude]
-repack_Pred [definition, in LemmaOverloading.rels]
-rest [projection, in LemmaOverloading.stlogCTC]
-rest1 [projection, in LemmaOverloading.stlogCTC]
-ret [definition, in LemmaOverloading.stsep]
-retP [lemma, in LemmaOverloading.stsep]
-ret_s [definition, in LemmaOverloading.stsep]
-reverse [definition, in LemmaOverloading.llistR]
-revT [definition, in LemmaOverloading.llistR]
-riA [lemma, in LemmaOverloading.prelude]
-right_pf [lemma, in LemmaOverloading.indom]
-right_tag [definition, in LemmaOverloading.indom]
-right_struct [instance, in LemmaOverloading.stlogCTC]
-right_pf [lemma, in LemmaOverloading.stlogR]
-right_tag [definition, in LemmaOverloading.stlogR]
-runs_of [definition, in LemmaOverloading.stmod]
-

S

-scan [projection, in LemmaOverloading.noaliasCTC]
-Scan [record, in LemmaOverloading.noaliasCTC]
-Scan [module, in LemmaOverloading.noalias]
-scanE [lemma, in LemmaOverloading.noaliasCTC]
-scan_default [instance, in LemmaOverloading.noaliasCTC]
-scan_ptr [instance, in LemmaOverloading.noaliasCTC]
-scan_union [instance, in LemmaOverloading.noaliasCTC]
-scan_axiom [definition, in LemmaOverloading.noaliasCTC]
-scan_it [lemma, in LemmaOverloading.noalias]
-Scan.axiom [definition, in LemmaOverloading.noalias]
-Scan.default_pf [lemma, in LemmaOverloading.noalias]
-Scan.default_tag [definition, in LemmaOverloading.noalias]
-Scan.Exports [module, in LemmaOverloading.noalias]
-Scan.form [record, in LemmaOverloading.noalias]
-Scan.Form [constructor, in LemmaOverloading.noalias]
-Scan.heap_of [projection, in LemmaOverloading.noalias]
-Scan.ptr_pf [lemma, in LemmaOverloading.noalias]
-Scan.ptr_tag [definition, in LemmaOverloading.noalias]
-Scan.scanE [lemma, in LemmaOverloading.noalias]
-Scan.ScanSection [section, in LemmaOverloading.noalias]
-Scan.Tag [constructor, in LemmaOverloading.noalias]
-Scan.tagged_heap [record, in LemmaOverloading.noalias]
-Scan.union_pf [lemma, in LemmaOverloading.noalias]
-Scan.untag [projection, in LemmaOverloading.noalias]
-search [projection, in LemmaOverloading.noaliasCTC]
-Search [record, in LemmaOverloading.noaliasCTC]
-Search [module, in LemmaOverloading.noalias]
-search_recurse [instance, in LemmaOverloading.noaliasCTC]
-search_found [instance, in LemmaOverloading.noaliasCTC]
-search_them [definition, in LemmaOverloading.noalias]
-Search.axiom [definition, in LemmaOverloading.noalias]
-Search.Exports [module, in LemmaOverloading.noalias]
-Search.findE [lemma, in LemmaOverloading.noalias]
-Search.form [record, in LemmaOverloading.noalias]
-Search.Form [constructor, in LemmaOverloading.noalias]
-Search.found_pf [lemma, in LemmaOverloading.noalias]
-Search.recurse_pf [lemma, in LemmaOverloading.noalias]
-Search.recurse_tag [definition, in LemmaOverloading.noalias]
-Search.SearchSection [section, in LemmaOverloading.noalias]
-Search.seq_of [projection, in LemmaOverloading.noalias]
-Search.Tag [constructor, in LemmaOverloading.noalias]
-Search.tagged_seq [record, in LemmaOverloading.noalias]
-Search.untag [projection, in LemmaOverloading.noalias]
-search2 [projection, in LemmaOverloading.noaliasCTC]
-Search2 [record, in LemmaOverloading.noaliasCTC]
-Search2 [module, in LemmaOverloading.noalias]
-search2_foundz [instance, in LemmaOverloading.noaliasCTC]
-search2_foundy [instance, in LemmaOverloading.noaliasCTC]
-search2_foundx [instance, in LemmaOverloading.noaliasCTC]
-search2_axiom [definition, in LemmaOverloading.noaliasCTC]
-Search2.axiom [definition, in LemmaOverloading.noalias]
-Search2.Exports [module, in LemmaOverloading.noalias]
-Search2.find2E [lemma, in LemmaOverloading.noalias]
-Search2.form [record, in LemmaOverloading.noalias]
-Search2.Form [constructor, in LemmaOverloading.noalias]
-Search2.foundx_pf [lemma, in LemmaOverloading.noalias]
-Search2.foundy_pf [lemma, in LemmaOverloading.noalias]
-Search2.foundy_tag [definition, in LemmaOverloading.noalias]
-Search2.foundz_pf [lemma, in LemmaOverloading.noalias]
-Search2.foundz_tag [definition, in LemmaOverloading.noalias]
-Search2.Search2Section [section, in LemmaOverloading.noalias]
-Search2.seq_of [projection, in LemmaOverloading.noalias]
-Search2.Tag [constructor, in LemmaOverloading.noalias]
-Search2.tagged_seq [record, in LemmaOverloading.noalias]
-Search2.untag [projection, in LemmaOverloading.noalias]
-SepAlloc [section, in LemmaOverloading.stsep]
-SepAlloc.A [variable, in LemmaOverloading.stsep]
-SepAlloc.v [variable, in LemmaOverloading.stsep]
-SepBind [section, in LemmaOverloading.stsep]
-SepBind.A [variable, in LemmaOverloading.stsep]
-SepBind.B [variable, in LemmaOverloading.stsep]
-SepBind.e1 [variable, in LemmaOverloading.stsep]
-SepBind.e2 [variable, in LemmaOverloading.stsep]
-SepBind.s1 [variable, in LemmaOverloading.stsep]
-SepBind.s2 [variable, in LemmaOverloading.stsep]
-SepBlockAlloc [section, in LemmaOverloading.stsep]
-SepBlockAlloc.A [variable, in LemmaOverloading.stsep]
-SepBlockAlloc.n [variable, in LemmaOverloading.stsep]
-SepBlockAlloc.v [variable, in LemmaOverloading.stsep]
-SepConseq [section, in LemmaOverloading.stsep]
-SepConseq.A [variable, in LemmaOverloading.stsep]
-SepConseq.e [variable, in LemmaOverloading.stsep]
-SepConseq.pf [variable, in LemmaOverloading.stsep]
-SepConseq.s1 [variable, in LemmaOverloading.stsep]
-SepConseq.s2 [variable, in LemmaOverloading.stsep]
-SepDealloc [section, in LemmaOverloading.stsep]
-SepDealloc.x [variable, in LemmaOverloading.stsep]
-SepFix [section, in LemmaOverloading.stsep]
-SepFix.A [variable, in LemmaOverloading.stsep]
-SepFix.B [variable, in LemmaOverloading.stsep]
-SepFix.s [variable, in LemmaOverloading.stsep]
-SepFrame [section, in LemmaOverloading.stsep]
-SepFrame.A [variable, in LemmaOverloading.stsep]
-SepFrame.s [variable, in LemmaOverloading.stsep]
-SepRead [section, in LemmaOverloading.stsep]
-SepRead.A [variable, in LemmaOverloading.stsep]
-SepRead.x [variable, in LemmaOverloading.stsep]
-SepReturn [section, in LemmaOverloading.stsep]
-SepReturn.A [variable, in LemmaOverloading.stsep]
-SepReturn.x [variable, in LemmaOverloading.stsep]
-SepThrow [section, in LemmaOverloading.stsep]
-SepThrow.A [variable, in LemmaOverloading.stsep]
-SepThrow.e [variable, in LemmaOverloading.stsep]
-SepTry [section, in LemmaOverloading.stsep]
-SepTry.A [variable, in LemmaOverloading.stsep]
-SepTry.B [variable, in LemmaOverloading.stsep]
-SepTry.e [variable, in LemmaOverloading.stsep]
-SepTry.e1 [variable, in LemmaOverloading.stsep]
-SepTry.e2 [variable, in LemmaOverloading.stsep]
-SepTry.s [variable, in LemmaOverloading.stsep]
-SepTry.s1 [variable, in LemmaOverloading.stsep]
-SepTry.s2 [variable, in LemmaOverloading.stsep]
-SepWrite [section, in LemmaOverloading.stsep]
-SepWrite.A [variable, in LemmaOverloading.stsep]
-SepWrite.v [variable, in LemmaOverloading.stsep]
-SepWrite.x [variable, in LemmaOverloading.stsep]
-seqof_ins [lemma, in LemmaOverloading.finmap]
-seq_of [projection, in LemmaOverloading.noaliasCTC]
-seq_of [projection, in LemmaOverloading.xfindCTC]
-seq_of [projection, in LemmaOverloading.finmap]
-seq_of [projection, in LemmaOverloading.auto]
-sexit1 [lemma, in LemmaOverloading.heaps]
-sexit2 [lemma, in LemmaOverloading.heaps]
-sexit3 [lemma, in LemmaOverloading.heaps]
-sexit4 [lemma, in LemmaOverloading.heaps]
-shape_rev [definition, in LemmaOverloading.llistR]
-Simplifications [section, in LemmaOverloading.rels]
-Simplifications.pT [variable, in LemmaOverloading.rels]
-Simplifications.T [variable, in LemmaOverloading.rels]
-simplify [lemma, in LemmaOverloading.cancelD]
-SimplPred [definition, in LemmaOverloading.rels]
-Simpl_PredE [lemma, in LemmaOverloading.rels]
-Simpl_Pred [definition, in LemmaOverloading.rels]
-single [definition, in LemmaOverloading.stmod]
-singleP [lemma, in LemmaOverloading.stmod]
-size_onth [lemma, in LemmaOverloading.prefix]
-sorted_filter [lemma, in LemmaOverloading.finmap]
-sorted_ins' [lemma, in LemmaOverloading.finmap]
-sorted_nil [lemma, in LemmaOverloading.finmap]
-spec [definition, in LemmaOverloading.stmod]
-spec_runs [lemma, in LemmaOverloading.stmod]
-ST [record, in LemmaOverloading.stmod]
-star [definition, in LemmaOverloading.hprop]
-starA [lemma, in LemmaOverloading.hprop]
-starAC [lemma, in LemmaOverloading.hprop]
-starC [lemma, in LemmaOverloading.hprop]
-starCA [lemma, in LemmaOverloading.hprop]
-starp0 [lemma, in LemmaOverloading.hprop]
-star0p [lemma, in LemmaOverloading.hprop]
-STDef [section, in LemmaOverloading.stmod]
-STDef.A [variable, in LemmaOverloading.stmod]
-STDef.s [variable, in LemmaOverloading.stmod]
-stLatticeMixin [definition, in LemmaOverloading.stmod]
-stlog [library]
-stlogCTC [library]
-stlogR [library]
-stmod [library]
-stPosetMixin [definition, in LemmaOverloading.stmod]
-STprog [constructor, in LemmaOverloading.stmod]
-stress [definition, in LemmaOverloading.cancel]
-stress [definition, in LemmaOverloading.cancel2]
-STsep [definition, in LemmaOverloading.stsep]
-stsep [library]
-st_supM [lemma, in LemmaOverloading.stmod]
-st_supP [lemma, in LemmaOverloading.stmod]
-st_sup [definition, in LemmaOverloading.stmod]
-st_sup_has_spec [lemma, in LemmaOverloading.stmod]
-st_sup_dstrict [lemma, in LemmaOverloading.stmod]
-st_sup_coherent [lemma, in LemmaOverloading.stmod]
-st_sup' [definition, in LemmaOverloading.stmod]
-st_botP [lemma, in LemmaOverloading.stmod]
-st_bot [definition, in LemmaOverloading.stmod]
-st_bot_has_spec [lemma, in LemmaOverloading.stmod]
-st_bot_dstrict [lemma, in LemmaOverloading.stmod]
-st_bot_coherent [lemma, in LemmaOverloading.stmod]
-st_bot' [definition, in LemmaOverloading.stmod]
-st_trans [lemma, in LemmaOverloading.stmod]
-st_asym [lemma, in LemmaOverloading.stmod]
-st_refl [lemma, in LemmaOverloading.stmod]
-st_leq [definition, in LemmaOverloading.stmod]
-subCPO [definition, in LemmaOverloading.domains]
-SubCPO [section, in LemmaOverloading.domains]
-subCPOMixin [definition, in LemmaOverloading.domains]
-SubCPO.C [variable, in LemmaOverloading.domains]
-SubCPO.D [variable, in LemmaOverloading.domains]
-SubCPO.s [variable, in LemmaOverloading.domains]
-subctx [definition, in LemmaOverloading.terms]
-subctx_trans [lemma, in LemmaOverloading.terms]
-subctx_refl [lemma, in LemmaOverloading.terms]
-subdom [definition, in LemmaOverloading.heaps]
-subdomD [lemma, in LemmaOverloading.heaps]
-subdomE [lemma, in LemmaOverloading.heaps]
-subdomP [lemma, in LemmaOverloading.heaps]
-subdomPE [lemma, in LemmaOverloading.heaps]
-subdomQ [lemma, in LemmaOverloading.heaps]
-subdomUE [lemma, in LemmaOverloading.heaps]
-subdom_trans [lemma, in LemmaOverloading.heaps]
-subdom_emp_inv [lemma, in LemmaOverloading.heaps]
-subdom_emp [lemma, in LemmaOverloading.heaps]
-subdom_refl [lemma, in LemmaOverloading.heaps]
-subdom_def [lemma, in LemmaOverloading.heaps]
-subheap [definition, in LemmaOverloading.heaps]
-subheapE [lemma, in LemmaOverloading.heaps]
-subheapUn [lemma, in LemmaOverloading.heaps]
-subheapUnl [lemma, in LemmaOverloading.heaps]
-subheapUnr [lemma, in LemmaOverloading.heaps]
-subheap_id [lemma, in LemmaOverloading.heaps]
-subheap_trans [lemma, in LemmaOverloading.heaps]
-subheap_def [lemma, in LemmaOverloading.heaps]
-subheap_refl [lemma, in LemmaOverloading.heaps]
-subLattice [definition, in LemmaOverloading.domains]
-SubLattice [section, in LemmaOverloading.domains]
-subLatticeMixin [definition, in LemmaOverloading.domains]
-SubLattice.C [variable, in LemmaOverloading.domains]
-SubLattice.s [variable, in LemmaOverloading.domains]
-SubLattice.T [variable, in LemmaOverloading.domains]
-SubMem [definition, in LemmaOverloading.rels]
-SubMemLaws [section, in LemmaOverloading.rels]
-SubMemLaws.T [variable, in LemmaOverloading.rels]
-subPoset [definition, in LemmaOverloading.domains]
-SubPoset [section, in LemmaOverloading.domains]
-subPosetMixin [definition, in LemmaOverloading.domains]
-SubPoset.C [variable, in LemmaOverloading.domains]
-SubPoset.s [variable, in LemmaOverloading.domains]
-SubPoset.T [variable, in LemmaOverloading.domains]
-SubPred [definition, in LemmaOverloading.rels]
-SubPredFun [definition, in LemmaOverloading.rels]
-SubPredType [definition, in LemmaOverloading.rels]
-SubPredType_trans [definition, in LemmaOverloading.rels]
-SubPredType_trans' [lemma, in LemmaOverloading.rels]
-SubPredType_refl [lemma, in LemmaOverloading.rels]
-subp_andr [lemma, in LemmaOverloading.rels]
-subp_andl [lemma, in LemmaOverloading.rels]
-subp_orr [lemma, in LemmaOverloading.rels]
-subp_orl [lemma, in LemmaOverloading.rels]
-subp_and [lemma, in LemmaOverloading.rels]
-subp_or [lemma, in LemmaOverloading.rels]
-subp_trans [lemma, in LemmaOverloading.rels]
-subp_asym [lemma, in LemmaOverloading.rels]
-subp_refl [lemma, in LemmaOverloading.rels]
-SubSimplPred [definition, in LemmaOverloading.rels]
-subtract [definition, in LemmaOverloading.heaps]
-sub_limM [lemma, in LemmaOverloading.domains]
-sub_limP [lemma, in LemmaOverloading.domains]
-sub_lim [definition, in LemmaOverloading.domains]
-sub_limX [lemma, in LemmaOverloading.domains]
-sub_supM [lemma, in LemmaOverloading.domains]
-sub_supP [lemma, in LemmaOverloading.domains]
-sub_sup [definition, in LemmaOverloading.domains]
-sub_supX [lemma, in LemmaOverloading.domains]
-sub_sup' [definition, in LemmaOverloading.domains]
-sub_trans [lemma, in LemmaOverloading.domains]
-sub_asym [lemma, in LemmaOverloading.domains]
-sub_refl [lemma, in LemmaOverloading.domains]
-sub_botP [lemma, in LemmaOverloading.domains]
-sub_leq [definition, in LemmaOverloading.domains]
-sub_bot [definition, in LemmaOverloading.domains]
-sub_orr [lemma, in LemmaOverloading.rels]
-sub_orl [lemma, in LemmaOverloading.rels]
-supdom [definition, in LemmaOverloading.heaps]
-supdomeqUh [lemma, in LemmaOverloading.heaps]
-supdomUh [lemma, in LemmaOverloading.heaps]
-supE [lemma, in LemmaOverloading.domains]
-supp [definition, in LemmaOverloading.finmap]
-suppP [lemma, in LemmaOverloading.finmap]
-supp_eq_ins [lemma, in LemmaOverloading.finmap]
-supp_fcat [lemma, in LemmaOverloading.finmap]
-supp_ins [lemma, in LemmaOverloading.finmap]
-supp_rem [lemma, in LemmaOverloading.finmap]
-supp_nilE [lemma, in LemmaOverloading.finmap]
-supp_nil [lemma, in LemmaOverloading.finmap]
-supp_spec_none [constructor, in LemmaOverloading.finmap]
-supp_spec_some [constructor, in LemmaOverloading.finmap]
-supp_spec [inductive, in LemmaOverloading.finmap]
-sup_dappE [lemma, in LemmaOverloading.domains]
-sup_appE [lemma, in LemmaOverloading.domains]
-sup_clos_mono [lemma, in LemmaOverloading.domains]
-sup_clos_idemp [lemma, in LemmaOverloading.domains]
-sup_closP [lemma, in LemmaOverloading.domains]
-sup_clos_min [lemma, in LemmaOverloading.domains]
-sup_clos_sub [lemma, in LemmaOverloading.domains]
-sup_mono [lemma, in LemmaOverloading.domains]
-sup_closure [definition, in LemmaOverloading.domains]
-sup_closed [definition, in LemmaOverloading.domains]
-sup_defdef [lemma, in LemmaOverloading.heaps]
-svalE [lemma, in LemmaOverloading.prelude]
-sval_mono [lemma, in LemmaOverloading.domains]
-swap [definition, in LemmaOverloading.prelude]
-swapI [lemma, in LemmaOverloading.prelude]
-swap_rAC [lemma, in LemmaOverloading.prelude]
-swap_rCA [lemma, in LemmaOverloading.prelude]
-swap_prod [lemma, in LemmaOverloading.prelude]
-swp [lemma, in LemmaOverloading.stlog]
-sym [lemma, in LemmaOverloading.prelude]
-synheap [definition, in LemmaOverloading.terms]
-

T

-Tag [constructor, in LemmaOverloading.cancel]
-Tag [constructor, in LemmaOverloading.indom]
-Tag [constructor, in LemmaOverloading.auto]
-Tag [constructor, in LemmaOverloading.cancelD]
-Tag [constructor, in LemmaOverloading.stlogR]
-tagged_heap [record, in LemmaOverloading.cancel]
-tagged_heap [record, in LemmaOverloading.indom]
-tagged_prop [record, in LemmaOverloading.auto]
-tagged_seq [record, in LemmaOverloading.auto]
-tagged_prop [record, in LemmaOverloading.cancelD]
-tagged_heap [record, in LemmaOverloading.stlogR]
-TagS [constructor, in LemmaOverloading.auto]
-tarski_gfp_greatest [lemma, in LemmaOverloading.domains]
-tarski_gfp_fixed [lemma, in LemmaOverloading.domains]
-tarski_lfp_least [lemma, in LemmaOverloading.domains]
-tarski_lfp_fixed [lemma, in LemmaOverloading.domains]
-tarski_gfp [definition, in LemmaOverloading.domains]
-tarski_lfp [definition, in LemmaOverloading.domains]
-terms [library]
-test [definition, in LemmaOverloading.xfind]
-test [lemma, in LemmaOverloading.heaps]
-this [definition, in LemmaOverloading.hprop]
-throw [definition, in LemmaOverloading.stsep]
-throwP [lemma, in LemmaOverloading.stsep]
-throw_s [definition, in LemmaOverloading.stsep]
-top [definition, in LemmaOverloading.hprop]
-toPred [projection, in LemmaOverloading.rels]
-toPredE [lemma, in LemmaOverloading.rels]
-total [lemma, in LemmaOverloading.ordtype]
-Totality [section, in LemmaOverloading.ordtype]
-Totality.K [variable, in LemmaOverloading.ordtype]
-totalP [lemma, in LemmaOverloading.ordtype]
-total_ordf [lemma, in LemmaOverloading.ordtype]
-total_lex [lemma, in LemmaOverloading.ordtype]
-total_ltn_nat [lemma, in LemmaOverloading.ordtype]
-total_spec_gt [constructor, in LemmaOverloading.ordtype]
-total_spec_eq [constructor, in LemmaOverloading.ordtype]
-total_spec_lt [constructor, in LemmaOverloading.ordtype]
-total_spec [inductive, in LemmaOverloading.ordtype]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.domains]
-tp [abbreviation, in LemmaOverloading.stsep]
-trans [lemma, in LemmaOverloading.ordtype]
-trans_ordf [lemma, in LemmaOverloading.ordtype]
-trans_lex [lemma, in LemmaOverloading.ordtype]
-trans_ltn_nat [lemma, in LemmaOverloading.ordtype]
-trigger [record, in LemmaOverloading.cancel2]
-triggered [definition, in LemmaOverloading.noalias]
-try [definition, in LemmaOverloading.stsep]
-TryForm [constructor, in LemmaOverloading.stlogR]
-tryP [lemma, in LemmaOverloading.stsep]
-try_gh1 [lemma, in LemmaOverloading.stlog]
-try_gh [lemma, in LemmaOverloading.stlog]
-try_throw [lemma, in LemmaOverloading.stlog]
-try_dealloc [lemma, in LemmaOverloading.stlog]
-try_allocb [lemma, in LemmaOverloading.stlog]
-try_alloc [lemma, in LemmaOverloading.stlog]
-try_write [lemma, in LemmaOverloading.stlog]
-try_read [lemma, in LemmaOverloading.stlog]
-try_ret [lemma, in LemmaOverloading.stlog]
-try_do [lemma, in LemmaOverloading.stlog]
-try_s [definition, in LemmaOverloading.stsep]
-try_case_pf [lemma, in LemmaOverloading.stlogR]
-try_pivot [projection, in LemmaOverloading.stlogR]
-try_form [record, in LemmaOverloading.stlogR]
-try_gh1R [lemma, in LemmaOverloading.stlogR]
-try_ghR [lemma, in LemmaOverloading.stlogR]
-try_throwR [definition, in LemmaOverloading.stlogR]
-try_deallocR [lemma, in LemmaOverloading.stlogR]
-try_allocbR [definition, in LemmaOverloading.stlogR]
-try_allocR [definition, in LemmaOverloading.stlogR]
-try_writeR [lemma, in LemmaOverloading.stlogR]
-try_readR [lemma, in LemmaOverloading.stlogR]
-try_retR [definition, in LemmaOverloading.stlogR]
-try_doR [lemma, in LemmaOverloading.stlogR]
-

U

-unA [lemma, in LemmaOverloading.heaps]
-unAC [lemma, in LemmaOverloading.heaps]
-unA2 [lemma, in LemmaOverloading.heaps]
-unC [lemma, in LemmaOverloading.heaps]
-unCA [lemma, in LemmaOverloading.heaps]
-unC2 [lemma, in LemmaOverloading.heaps]
-Undef [constructor, in LemmaOverloading.heaps]
-undefE [lemma, in LemmaOverloading.heaps]
-unDl2 [lemma, in LemmaOverloading.heaps]
-unDr2 [lemma, in LemmaOverloading.heaps]
-unhKl [lemma, in LemmaOverloading.heaps]
-unhKr [lemma, in LemmaOverloading.heaps]
-unh0 [lemma, in LemmaOverloading.heaps]
-unh02 [lemma, in LemmaOverloading.heaps]
-union_pf [lemma, in LemmaOverloading.cancel]
-union_struct [instance, in LemmaOverloading.cancelCTC]
-union2 [definition, in LemmaOverloading.heaps]
-unit_test [definition, in LemmaOverloading.xfind]
-unit_test [definition, in LemmaOverloading.xfindCTC]
-unKhl [lemma, in LemmaOverloading.heaps]
-unKhl2 [lemma, in LemmaOverloading.heaps]
-unKhr [lemma, in LemmaOverloading.heaps]
-unKhr2 [lemma, in LemmaOverloading.heaps]
-unpack [projection, in LemmaOverloading.cancel2]
-untag [projection, in LemmaOverloading.cancel]
-untag [projection, in LemmaOverloading.indom]
-untag [projection, in LemmaOverloading.auto]
-untag [projection, in LemmaOverloading.stlogR]
-untags [projection, in LemmaOverloading.auto]
-un_nullP [lemma, in LemmaOverloading.heaps]
-un0E [lemma, in LemmaOverloading.heaps]
-un0h [lemma, in LemmaOverloading.heaps]
-un0h2 [lemma, in LemmaOverloading.heaps]
-upd [definition, in LemmaOverloading.heaps]
-Update [record, in LemmaOverloading.stlogCTC]
-update [record, in LemmaOverloading.stlogR]
-Update [constructor, in LemmaOverloading.stlogR]
-updateE [lemma, in LemmaOverloading.stlogR]
-update_axiom [definition, in LemmaOverloading.stlogR]
-update1 [projection, in LemmaOverloading.stlogCTC]
-update2 [projection, in LemmaOverloading.stlogCTC]
-updF [lemma, in LemmaOverloading.heaps]
-updi [definition, in LemmaOverloading.heaps]
-updiD [lemma, in LemmaOverloading.heaps]
-updimV [lemma, in LemmaOverloading.heaps]
-updiP [lemma, in LemmaOverloading.heaps]
-updiS [lemma, in LemmaOverloading.heaps]
-updiVm [lemma, in LemmaOverloading.heaps]
-updiVm' [lemma, in LemmaOverloading.heaps]
-updi_iinv [lemma, in LemmaOverloading.heaps]
-updi_inv [lemma, in LemmaOverloading.heaps]
-updi_catI [lemma, in LemmaOverloading.heaps]
-updi_cat [lemma, in LemmaOverloading.heaps]
-updi_last [lemma, in LemmaOverloading.heaps]
-updPtUn [lemma, in LemmaOverloading.heaps]
-updU [lemma, in LemmaOverloading.heaps]
-updUnl [lemma, in LemmaOverloading.heaps]
-updUnr [lemma, in LemmaOverloading.heaps]
-upd_inj [lemma, in LemmaOverloading.heaps]
-upd_nullP [lemma, in LemmaOverloading.heaps]
-

V

-Val [constructor, in LemmaOverloading.stmod]
-ValForm [constructor, in LemmaOverloading.stlogR]
-valid [definition, in LemmaOverloading.terms]
-valid_subctx [lemma, in LemmaOverloading.terms]
-valid_cat [lemma, in LemmaOverloading.terms]
-valid_heaps_cat [lemma, in LemmaOverloading.terms]
-valid_ptrs_cat [lemma, in LemmaOverloading.terms]
-valid_cons [lemma, in LemmaOverloading.terms]
-valid_heaps [definition, in LemmaOverloading.terms]
-valid_ptrs [definition, in LemmaOverloading.terms]
-value [definition, in LemmaOverloading.finmap]
-val_gh1 [lemma, in LemmaOverloading.stlog]
-val_gh [lemma, in LemmaOverloading.stlog]
-val_throw [lemma, in LemmaOverloading.stlog]
-val_dealloc [lemma, in LemmaOverloading.stlog]
-val_allocb [lemma, in LemmaOverloading.stlog]
-val_alloc [lemma, in LemmaOverloading.stlog]
-val_write [lemma, in LemmaOverloading.stlog]
-val_read [lemma, in LemmaOverloading.stlog]
-val_ret [lemma, in LemmaOverloading.stlog]
-val_do [lemma, in LemmaOverloading.stlog]
-val_doR [lemma, in LemmaOverloading.stlogCTC]
-val_pivot [projection, in LemmaOverloading.stlogR]
-val_form [record, in LemmaOverloading.stlogR]
-val_gh1R [lemma, in LemmaOverloading.stlogR]
-val_ghR [lemma, in LemmaOverloading.stlogR]
-val_throwR [definition, in LemmaOverloading.stlogR]
-val_deallocR [lemma, in LemmaOverloading.stlogR]
-val_allocbR [definition, in LemmaOverloading.stlogR]
-val_allocR [definition, in LemmaOverloading.stlogR]
-val_writeR [lemma, in LemmaOverloading.stlogR]
-val_readR [lemma, in LemmaOverloading.stlogR]
-val_retR [definition, in LemmaOverloading.stlogR]
-val_doR [lemma, in LemmaOverloading.stlogR]
-Var [constructor, in LemmaOverloading.terms]
-vareq [definition, in LemmaOverloading.terms]
-vars [definition, in LemmaOverloading.terms]
-vars_hfree [lemma, in LemmaOverloading.terms]
-var_pf [lemma, in LemmaOverloading.cancel]
-var_tag [definition, in LemmaOverloading.cancel]
-var_has [lemma, in LemmaOverloading.terms]
-var_tag [definition, in LemmaOverloading.auto]
-var_struct [instance, in LemmaOverloading.cancelCTC]
-verify [abbreviation, in LemmaOverloading.stsep]
-verify' [definition, in LemmaOverloading.stsep]
-

W

-without_notation [definition, in LemmaOverloading.noalias]
-write [definition, in LemmaOverloading.stsep]
-writeP [lemma, in LemmaOverloading.stsep]
-write_s [definition, in LemmaOverloading.stsep]
-

X

-xfind [record, in LemmaOverloading.xfind]
-XFind [constructor, in LemmaOverloading.xfind]
-XFind [section, in LemmaOverloading.xfind]
-xfind [projection, in LemmaOverloading.xfindCTC]
-XFind [record, in LemmaOverloading.xfindCTC]
-xfind [library]
-xfindCTC [library]
-XFind.A [variable, in LemmaOverloading.xfind]
-xPredC [abbreviation, in LemmaOverloading.rels]
-xPredD [abbreviation, in LemmaOverloading.rels]
-xPredI [abbreviation, in LemmaOverloading.rels]
-xPredT [abbreviation, in LemmaOverloading.rels]
-xPredU [abbreviation, in LemmaOverloading.rels]
-xPred0 [abbreviation, in LemmaOverloading.rels]
-xPred1 [abbreviation, in LemmaOverloading.rels]
-xPreim [abbreviation, in LemmaOverloading.rels]
-XTag [constructor, in LemmaOverloading.xfind]
-xtagged [record, in LemmaOverloading.xfind]
-xuntag [projection, in LemmaOverloading.xfind]
-x_of [projection, in LemmaOverloading.auto]
-

Y

-y_of' [projection, in LemmaOverloading.noalias]
-y_of [projection, in LemmaOverloading.noalias]
-

other

-[ _ ^^ _ by _ ] (form_scope) [notation, in LemmaOverloading.domains]
-[ PredType of _ ] (form_scope) [notation, in LemmaOverloading.rels]
-[ Pred _ _ \In _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ Pred _ _ \In _ | _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ Pred _ _ \In _ & _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ Pred _ _ \In _ & _ | _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ Pred _ \In _ | _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ Pred _ \In _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ Preim _ of _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ PredC _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ PredD _ & _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ PredU _ & _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ PredI _ & _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ Mem _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ Pred _ _ : _ | _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ Pred _ _ | _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ Pred _ : _ | _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ Pred _ | _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-[ Pred : _ | _ ] (fun_scope) [notation, in LemmaOverloading.rels]
-_ \Notin _ (rel_scope) [notation, in LemmaOverloading.rels]
-_ \In _ (rel_scope) [notation, in LemmaOverloading.rels]
-_ ~1> _ (rel_scope) [notation, in LemmaOverloading.rels]
-_ <~1> _ (rel_scope) [notation, in LemmaOverloading.rels]
-_ ~> _ (rel_scope) [notation, in LemmaOverloading.rels]
-_ <~> _ (rel_scope) [notation, in LemmaOverloading.rels]
-_ *p _ (rel_scope) [notation, in LemmaOverloading.rels]
-_ +p _ (rel_scope) [notation, in LemmaOverloading.rels]
-_ :--> _ (rel_scope) [notation, in LemmaOverloading.hprop]
-_ # _ (rel_scope) [notation, in LemmaOverloading.hprop]
-_ ===> _ (signature_scope) [notation, in LemmaOverloading.hprop]
-_ ===> _ (signature_scope) [notation, in LemmaOverloading.prelude]
-If _ then _ else _ (stsep_scope) [notation, in LemmaOverloading.stsep]
-match_opt _ then _ else [ _ ] _ (stsep_scope) [notation, in LemmaOverloading.stsep]
-match_opt _ then _ else [ _ ] _ (stsep_scope) [notation, in LemmaOverloading.stsep]
-ttry _ then _ else _ (stsep_scope) [notation, in LemmaOverloading.stsep]
-ttry _ then _ else [ _ ] _ (stsep_scope) [notation, in LemmaOverloading.stsep]
-ttry _ then [ _ ] _ else _ (stsep_scope) [notation, in LemmaOverloading.stsep]
-ttry _ then [ _ ] _ else [ _ ] _ (stsep_scope) [notation, in LemmaOverloading.stsep]
-throw [ _ ] _ (stsep_scope) [notation, in LemmaOverloading.stsep]
-_ ::= _ (stsep_scope) [notation, in LemmaOverloading.stsep]
-! _ (stsep_scope) [notation, in LemmaOverloading.stsep]
-_ ;; _ (stsep_scope) [notation, in LemmaOverloading.stsep]
-_ <-- _ ; _ (stsep_scope) [notation, in LemmaOverloading.stsep]
-_ --o _ (stsep_scope) [notation, in LemmaOverloading.stsep]
-_ <=p _ (type_scope) [notation, in LemmaOverloading.rels]
-_ =p _ (type_scope) [notation, in LemmaOverloading.rels]
-{ :: _ } (type_scope) [notation, in LemmaOverloading.rels]
-{ finMap _ } (type_scope) [notation, in LemmaOverloading.finmap]
-[ \/ _ , _ , _ , _ , _ | _ ] (type_scope) [notation, in LemmaOverloading.prelude]
-[ \/ _ , _ , _ , _ | _ ] (type_scope) [notation, in LemmaOverloading.prelude]
-[ /\ _ , _ , _ , _ , _ & _ ] (type_scope) [notation, in LemmaOverloading.prelude]
-_ \* _ [notation, in LemmaOverloading.prelude]
-_ =jm _ [notation, in LemmaOverloading.prelude]
-_ :++ _ [notation, in LemmaOverloading.heaps]
-_ =~ _ [notation, in LemmaOverloading.heaps]
-_ :-> _ [notation, in LemmaOverloading.heaps]
-_ :- _ [notation, in LemmaOverloading.heaps]
-_ :+ _ [notation, in LemmaOverloading.heaps]
-_ .+ _ [notation, in LemmaOverloading.heaps]
-Do _ [notation, in LemmaOverloading.stsep]
-() [notation, in LemmaOverloading.noalias]
-[ _ ] [notation, in LemmaOverloading.stsep]
-[ fin_ordMixin of _ ] [notation, in LemmaOverloading.ordtype]
-


-

Notation Index

-

C

-[ cpo of _ ] (form_scope) [in LemmaOverloading.domains]
-[ cpo of _ for _ ] (form_scope) [in LemmaOverloading.domains]
-

L

-[ lattice of _ ] (form_scope) [in LemmaOverloading.domains]
-[ lattice of _ for _ ] (form_scope) [in LemmaOverloading.domains]
-

O

-[ ordType of _ ] (form_scope) [in LemmaOverloading.ordtype]
-[ ordType of _ for _ ] (form_scope) [in LemmaOverloading.ordtype]
-

P

-[ poset of _ ] (form_scope) [in LemmaOverloading.domains]
-[ poset of _ for _ ] (form_scope) [in LemmaOverloading.domains]
-_ <== _ [in LemmaOverloading.domains]
-

other

-[ _ ^^ _ by _ ] (form_scope) [in LemmaOverloading.domains]
-[ PredType of _ ] (form_scope) [in LemmaOverloading.rels]
-[ Pred _ _ \In _ ] (fun_scope) [in LemmaOverloading.rels]
-[ Pred _ _ \In _ | _ ] (fun_scope) [in LemmaOverloading.rels]
-[ Pred _ _ \In _ & _ ] (fun_scope) [in LemmaOverloading.rels]
-[ Pred _ _ \In _ & _ | _ ] (fun_scope) [in LemmaOverloading.rels]
-[ Pred _ \In _ | _ ] (fun_scope) [in LemmaOverloading.rels]
-[ Pred _ \In _ ] (fun_scope) [in LemmaOverloading.rels]
-[ Preim _ of _ ] (fun_scope) [in LemmaOverloading.rels]
-[ PredC _ ] (fun_scope) [in LemmaOverloading.rels]
-[ PredD _ & _ ] (fun_scope) [in LemmaOverloading.rels]
-[ PredU _ & _ ] (fun_scope) [in LemmaOverloading.rels]
-[ PredI _ & _ ] (fun_scope) [in LemmaOverloading.rels]
-[ Mem _ ] (fun_scope) [in LemmaOverloading.rels]
-[ Pred _ _ : _ | _ ] (fun_scope) [in LemmaOverloading.rels]
-[ Pred _ _ | _ ] (fun_scope) [in LemmaOverloading.rels]
-[ Pred _ : _ | _ ] (fun_scope) [in LemmaOverloading.rels]
-[ Pred _ | _ ] (fun_scope) [in LemmaOverloading.rels]
-[ Pred : _ | _ ] (fun_scope) [in LemmaOverloading.rels]
-_ \Notin _ (rel_scope) [in LemmaOverloading.rels]
-_ \In _ (rel_scope) [in LemmaOverloading.rels]
-_ ~1> _ (rel_scope) [in LemmaOverloading.rels]
-_ <~1> _ (rel_scope) [in LemmaOverloading.rels]
-_ ~> _ (rel_scope) [in LemmaOverloading.rels]
-_ <~> _ (rel_scope) [in LemmaOverloading.rels]
-_ *p _ (rel_scope) [in LemmaOverloading.rels]
-_ +p _ (rel_scope) [in LemmaOverloading.rels]
-_ :--> _ (rel_scope) [in LemmaOverloading.hprop]
-_ # _ (rel_scope) [in LemmaOverloading.hprop]
-_ ===> _ (signature_scope) [in LemmaOverloading.hprop]
-_ ===> _ (signature_scope) [in LemmaOverloading.prelude]
-If _ then _ else _ (stsep_scope) [in LemmaOverloading.stsep]
-match_opt _ then _ else [ _ ] _ (stsep_scope) [in LemmaOverloading.stsep]
-match_opt _ then _ else [ _ ] _ (stsep_scope) [in LemmaOverloading.stsep]
-ttry _ then _ else _ (stsep_scope) [in LemmaOverloading.stsep]
-ttry _ then _ else [ _ ] _ (stsep_scope) [in LemmaOverloading.stsep]
-ttry _ then [ _ ] _ else _ (stsep_scope) [in LemmaOverloading.stsep]
-ttry _ then [ _ ] _ else [ _ ] _ (stsep_scope) [in LemmaOverloading.stsep]
-throw [ _ ] _ (stsep_scope) [in LemmaOverloading.stsep]
-_ ::= _ (stsep_scope) [in LemmaOverloading.stsep]
-! _ (stsep_scope) [in LemmaOverloading.stsep]
-_ ;; _ (stsep_scope) [in LemmaOverloading.stsep]
-_ <-- _ ; _ (stsep_scope) [in LemmaOverloading.stsep]
-_ --o _ (stsep_scope) [in LemmaOverloading.stsep]
-_ <=p _ (type_scope) [in LemmaOverloading.rels]
-_ =p _ (type_scope) [in LemmaOverloading.rels]
-{ :: _ } (type_scope) [in LemmaOverloading.rels]
-{ finMap _ } (type_scope) [in LemmaOverloading.finmap]
-[ \/ _ , _ , _ , _ , _ | _ ] (type_scope) [in LemmaOverloading.prelude]
-[ \/ _ , _ , _ , _ | _ ] (type_scope) [in LemmaOverloading.prelude]
-[ /\ _ , _ , _ , _ , _ & _ ] (type_scope) [in LemmaOverloading.prelude]
-_ \* _ [in LemmaOverloading.prelude]
-_ =jm _ [in LemmaOverloading.prelude]
-_ :++ _ [in LemmaOverloading.heaps]
-_ =~ _ [in LemmaOverloading.heaps]
-_ :-> _ [in LemmaOverloading.heaps]
-_ :- _ [in LemmaOverloading.heaps]
-_ :+ _ [in LemmaOverloading.heaps]
-_ .+ _ [in LemmaOverloading.heaps]
-Do _ [in LemmaOverloading.stsep]
-() [in LemmaOverloading.noalias]
-[ _ ] [in LemmaOverloading.stsep]
-[ fin_ordMixin of _ ] [in LemmaOverloading.ordtype]
-


-

Module Index

-

C

-CPO [in LemmaOverloading.domains]
-CPO.Exports [in LemmaOverloading.domains]
-

D

-Dyn [in LemmaOverloading.prelude]
-

L

-Lattice [in LemmaOverloading.domains]
-Lattice.Exports [in LemmaOverloading.domains]
-

M

-Model [in LemmaOverloading.stmod]
-

N

-NoAlias [in LemmaOverloading.noalias]
-NoAlias.Exports [in LemmaOverloading.noalias]
-NoAlias2 [in LemmaOverloading.noaliasBT]
-NoAlias2.Exports [in LemmaOverloading.noaliasBT]
-NoAlias3 [in LemmaOverloading.noaliasBT]
-NoAlias3.Exports [in LemmaOverloading.noaliasBT]
-

O

-Ordered [in LemmaOverloading.ordtype]
-Ordered.Exports [in LemmaOverloading.ordtype]
-

P

-Poset [in LemmaOverloading.domains]
-Poset.Exports [in LemmaOverloading.domains]
-

S

-Scan [in LemmaOverloading.noalias]
-Scan.Exports [in LemmaOverloading.noalias]
-Search [in LemmaOverloading.noalias]
-Search.Exports [in LemmaOverloading.noalias]
-Search2 [in LemmaOverloading.noalias]
-Search2.Exports [in LemmaOverloading.noalias]
-


-

Variable Index

-

A

-AdmissibleClosure.T [in LemmaOverloading.domains]
-AppChain.A [in LemmaOverloading.domains]
-AppChain.s [in LemmaOverloading.domains]
-AppChain.T [in LemmaOverloading.domains]
-Append.K [in LemmaOverloading.finmap]
-Append.V [in LemmaOverloading.finmap]
-

B

-BasePrograms.A [in LemmaOverloading.stmod]
-BasePrograms.P [in LemmaOverloading.stmod]
-BasicProperties.T [in LemmaOverloading.domains]
-BlockUpdate.A [in LemmaOverloading.heaps]
-

C

-ChainCompose.f1 [in LemmaOverloading.domains]
-ChainCompose.f2 [in LemmaOverloading.domains]
-ChainCompose.M1 [in LemmaOverloading.domains]
-ChainCompose.M2 [in LemmaOverloading.domains]
-ChainCompose.s [in LemmaOverloading.domains]
-ChainCompose.T1 [in LemmaOverloading.domains]
-ChainCompose.T2 [in LemmaOverloading.domains]
-ChainCompose.T3 [in LemmaOverloading.domains]
-ChainConst.T1 [in LemmaOverloading.domains]
-ChainConst.T2 [in LemmaOverloading.domains]
-ChainConst.y [in LemmaOverloading.domains]
-ChainId.s [in LemmaOverloading.domains]
-ChainId.T [in LemmaOverloading.domains]
-Chains.T [in LemmaOverloading.domains]
-Coercions.T [in LemmaOverloading.prelude]
-Coercions2.T [in LemmaOverloading.prelude]
-CondBool.A [in LemmaOverloading.stsep]
-CondBool.b [in LemmaOverloading.stsep]
-CondBool.s1 [in LemmaOverloading.stsep]
-CondBool.s2 [in LemmaOverloading.stsep]
-CondDecide.A [in LemmaOverloading.stsep]
-CondDecide.b [in LemmaOverloading.stsep]
-CondDecide.p1 [in LemmaOverloading.stsep]
-CondDecide.p2 [in LemmaOverloading.stsep]
-CondDecide.s1 [in LemmaOverloading.stsep]
-CondDecide.s2 [in LemmaOverloading.stsep]
-CondNat.A [in LemmaOverloading.stsep]
-CondNat.n [in LemmaOverloading.stsep]
-CondNat.s1 [in LemmaOverloading.stsep]
-CondNat.s2 [in LemmaOverloading.stsep]
-CondOption.A [in LemmaOverloading.stsep]
-CondOption.B [in LemmaOverloading.stsep]
-CondOption.s1 [in LemmaOverloading.stsep]
-CondOption.s2 [in LemmaOverloading.stsep]
-CondOption.x [in LemmaOverloading.stsep]
-CondSeq.A [in LemmaOverloading.stsep]
-CondSeq.B [in LemmaOverloading.stsep]
-CondSeq.s [in LemmaOverloading.stsep]
-CondSeq.s1 [in LemmaOverloading.stsep]
-CondSeq.s2 [in LemmaOverloading.stsep]
-Continuity.D1 [in LemmaOverloading.domains]
-Continuity.D2 [in LemmaOverloading.domains]
-Continuity.f [in LemmaOverloading.domains]
-CPO.ClassDef.cT [in LemmaOverloading.domains]
-CPO.ClassDef.T [in LemmaOverloading.domains]
-CPO.Exports.Laws.D [in LemmaOverloading.domains]
-

D

-DAppChain.A [in LemmaOverloading.domains]
-DAppChain.s [in LemmaOverloading.domains]
-DAppChain.T [in LemmaOverloading.domains]
-Def.K [in LemmaOverloading.finmap]
-Def.V [in LemmaOverloading.finmap]
-DFunCPO.A [in LemmaOverloading.domains]
-DFunCPO.B [in LemmaOverloading.domains]
-DFunLattice.A [in LemmaOverloading.domains]
-DFunLattice.B [in LemmaOverloading.domains]
-DFunPoset.A [in LemmaOverloading.domains]
-DFunPoset.B [in LemmaOverloading.domains]
-DiagChain.s [in LemmaOverloading.domains]
-DiagChain.T [in LemmaOverloading.domains]
-DisjointUnion.K [in LemmaOverloading.finmap]
-DisjointUnion.V [in LemmaOverloading.finmap]
-

E

-EqType.K [in LemmaOverloading.finmap]
-EqType.V [in LemmaOverloading.finmap]
-EvalAlloc.A [in LemmaOverloading.stlog]
-EvalAlloc.B [in LemmaOverloading.stlog]
-EvalBlockAlloc.A [in LemmaOverloading.stlog]
-EvalBlockAlloc.B [in LemmaOverloading.stlog]
-EvalDeallocR.A [in LemmaOverloading.stlogCTC]
-EvalDeallocR.A [in LemmaOverloading.stlogR]
-EvalDeallocR.B [in LemmaOverloading.stlogCTC]
-EvalDeallocR.B [in LemmaOverloading.stlogR]
-EvalDealloc.A [in LemmaOverloading.stlog]
-EvalDealloc.B [in LemmaOverloading.stlog]
-EvalDoR.A [in LemmaOverloading.stlogCTC]
-EvalDoR.A [in LemmaOverloading.stlogR]
-EvalDoR.B [in LemmaOverloading.stlogCTC]
-EvalDoR.B [in LemmaOverloading.stlogR]
-EvalDo.A [in LemmaOverloading.stlog]
-EvalDo.B [in LemmaOverloading.stlog]
-EvalGhostR.A [in LemmaOverloading.stlogR]
-EvalGhostR.B [in LemmaOverloading.stlogR]
-EvalGhostR.C [in LemmaOverloading.stlogR]
-EvalGhostR.f [in LemmaOverloading.stlogR]
-EvalGhostR.i [in LemmaOverloading.stlogR]
-EvalGhostR.j [in LemmaOverloading.stlogR]
-EvalGhostR.P [in LemmaOverloading.stlogR]
-EvalGhostR.p [in LemmaOverloading.stlogR]
-EvalGhostR.q [in LemmaOverloading.stlogR]
-EvalGhostR.s1 [in LemmaOverloading.stlogR]
-EvalGhostR.s2 [in LemmaOverloading.stlogR]
-EvalGhostR.t [in LemmaOverloading.stlogR]
-EvalGhost.A [in LemmaOverloading.stlog]
-EvalGhost.B [in LemmaOverloading.stlog]
-EvalGhost.C [in LemmaOverloading.stlog]
-EvalGhost.i [in LemmaOverloading.stlog]
-EvalGhost.j [in LemmaOverloading.stlog]
-EvalGhost.P [in LemmaOverloading.stlog]
-EvalGhost.p [in LemmaOverloading.stlog]
-EvalGhost.q [in LemmaOverloading.stlog]
-EvalGhost.s1 [in LemmaOverloading.stlog]
-EvalGhost.s2 [in LemmaOverloading.stlog]
-EvalGhost.t [in LemmaOverloading.stlog]
-EvalReadR.A [in LemmaOverloading.stlogR]
-EvalReadR.B [in LemmaOverloading.stlogR]
-EvalRead.A [in LemmaOverloading.stlog]
-EvalRead.B [in LemmaOverloading.stlog]
-EvalReturn.A [in LemmaOverloading.stlog]
-EvalReturn.B [in LemmaOverloading.stlog]
-EvalThrow.A [in LemmaOverloading.stlog]
-EvalThrow.B [in LemmaOverloading.stlog]
-EvalWriteR.A [in LemmaOverloading.stlogCTC]
-EvalWriteR.A [in LemmaOverloading.stlogR]
-EvalWriteR.B [in LemmaOverloading.stlogCTC]
-EvalWriteR.B [in LemmaOverloading.stlogR]
-EvalWriteR.C [in LemmaOverloading.stlogCTC]
-EvalWriteR.C [in LemmaOverloading.stlogR]
-EvalWrite.A [in LemmaOverloading.stlog]
-EvalWrite.B [in LemmaOverloading.stlog]
-EvalWrite.C [in LemmaOverloading.stlog]
-

F

-FinTypeOrd.T [in LemmaOverloading.ordtype]
-FMapInd.K [in LemmaOverloading.finmap]
-FMapInd.V [in LemmaOverloading.finmap]
-FunCPO.A [in LemmaOverloading.domains]
-FunCPO.B [in LemmaOverloading.domains]
-FunLattice.A [in LemmaOverloading.domains]
-FunLattice.B [in LemmaOverloading.domains]
-FunPoset.A [in LemmaOverloading.domains]
-FunPoset.B [in LemmaOverloading.domains]
-

G

-Ghosts.A [in LemmaOverloading.stsep]
-Ghosts.p [in LemmaOverloading.stsep]
-Ghosts.s [in LemmaOverloading.stsep]
-

H

-HasSelect.A [in LemmaOverloading.prelude]
-HasSelect.p [in LemmaOverloading.prelude]
-

I

-IdealDef.T [in LemmaOverloading.domains]
-IdealLattice.P [in LemmaOverloading.domains]
-IdealLattice.T [in LemmaOverloading.domains]
-IdealPoset.P [in LemmaOverloading.domains]
-IdealPoset.T [in LemmaOverloading.domains]
-ImageChain.f [in LemmaOverloading.domains]
-ImageChain.M [in LemmaOverloading.domains]
-ImageChain.s [in LemmaOverloading.domains]
-ImageChain.T1 [in LemmaOverloading.domains]
-ImageChain.T2 [in LemmaOverloading.domains]
-Infimum.T [in LemmaOverloading.domains]
-

K

-Kleene.C [in LemmaOverloading.domains]
-Kleene.D [in LemmaOverloading.domains]
-Kleene.f [in LemmaOverloading.domains]
-

L

-LatticeCPO.A [in LemmaOverloading.domains]
-Lattice.ClassDef.cT [in LemmaOverloading.domains]
-Lattice.ClassDef.T [in LemmaOverloading.domains]
-Lattice.Exports.Laws.T [in LemmaOverloading.domains]
-Lattice.RawMixin.T [in LemmaOverloading.domains]
-Lat.T [in LemmaOverloading.domains]
-Laws.K [in LemmaOverloading.finmap]
-Laws.V [in LemmaOverloading.finmap]
-Lemmas.T [in LemmaOverloading.ordtype]
-LiftChain.s [in LemmaOverloading.domains]
-LiftChain.T [in LemmaOverloading.domains]
-ListMembership.T [in LemmaOverloading.rels]
-LList.T [in LemmaOverloading.llistR]
-

M

-Model.Allocation.A [in LemmaOverloading.stmod]
-Model.Allocation.v [in LemmaOverloading.stmod]
-Model.Bind.A [in LemmaOverloading.stmod]
-Model.Bind.B [in LemmaOverloading.stmod]
-Model.Bind.e1 [in LemmaOverloading.stmod]
-Model.Bind.e2 [in LemmaOverloading.stmod]
-Model.Bind.s1 [in LemmaOverloading.stmod]
-Model.Bind.s2 [in LemmaOverloading.stmod]
-Model.BlockAllocation.A [in LemmaOverloading.stmod]
-Model.BlockAllocation.n [in LemmaOverloading.stmod]
-Model.BlockAllocation.v [in LemmaOverloading.stmod]
-Model.Consequence.A [in LemmaOverloading.stmod]
-Model.Consequence.e [in LemmaOverloading.stmod]
-Model.Consequence.pf [in LemmaOverloading.stmod]
-Model.Consequence.s1 [in LemmaOverloading.stmod]
-Model.Consequence.s2 [in LemmaOverloading.stmod]
-Model.Deallocation.x [in LemmaOverloading.stmod]
-Model.Fix.A [in LemmaOverloading.stmod]
-Model.Fix.B [in LemmaOverloading.stmod]
-Model.Fix.f [in LemmaOverloading.stmod]
-Model.Fix.s [in LemmaOverloading.stmod]
-Model.Read.A [in LemmaOverloading.stmod]
-Model.Read.x [in LemmaOverloading.stmod]
-Model.Return.A [in LemmaOverloading.stmod]
-Model.Return.x [in LemmaOverloading.stmod]
-Model.Throw.A [in LemmaOverloading.stmod]
-Model.Throw.e [in LemmaOverloading.stmod]
-Model.Try.A [in LemmaOverloading.stmod]
-Model.Try.B [in LemmaOverloading.stmod]
-Model.Try.e [in LemmaOverloading.stmod]
-Model.Try.e1 [in LemmaOverloading.stmod]
-Model.Try.e2 [in LemmaOverloading.stmod]
-Model.Try.s [in LemmaOverloading.stmod]
-Model.Try.s1 [in LemmaOverloading.stmod]
-Model.Try.s2 [in LemmaOverloading.stmod]
-Model.Write.A [in LemmaOverloading.stmod]
-Model.Write.v [in LemmaOverloading.stmod]
-Model.Write.x [in LemmaOverloading.stmod]
-

N

-NullLemmas.d [in LemmaOverloading.heaps]
-NullLemmas.f [in LemmaOverloading.heaps]
-NullLemmas.g [in LemmaOverloading.heaps]
-NullLemmas.x [in LemmaOverloading.heaps]
-

O

-Ops.K [in LemmaOverloading.finmap]
-Ops.V [in LemmaOverloading.finmap]
-Ordered.ClassDef.cT [in LemmaOverloading.ordtype]
-Ordered.ClassDef.T [in LemmaOverloading.ordtype]
-

P

-PairCPO.A [in LemmaOverloading.domains]
-PairCPO.B [in LemmaOverloading.domains]
-PairLattice.A [in LemmaOverloading.domains]
-PairLattice.B [in LemmaOverloading.domains]
-PairPoset.A [in LemmaOverloading.domains]
-PairPoset.B [in LemmaOverloading.domains]
-Permutations.A [in LemmaOverloading.perms]
-Poset.ClassDef.cT [in LemmaOverloading.domains]
-Poset.ClassDef.T [in LemmaOverloading.domains]
-Poset.Exports.Laws.T [in LemmaOverloading.domains]
-PredCPO.A [in LemmaOverloading.domains]
-Predicates.T [in LemmaOverloading.rels]
-PredLattice.A [in LemmaOverloading.domains]
-PredPoset.A [in LemmaOverloading.domains]
-Prefix.A [in LemmaOverloading.prefix]
-ProdChain.f1 [in LemmaOverloading.domains]
-ProdChain.f2 [in LemmaOverloading.domains]
-ProdChain.M1 [in LemmaOverloading.domains]
-ProdChain.M2 [in LemmaOverloading.domains]
-ProdChain.s [in LemmaOverloading.domains]
-ProdChain.S1 [in LemmaOverloading.domains]
-ProdChain.S2 [in LemmaOverloading.domains]
-ProdChain.T1 [in LemmaOverloading.domains]
-ProdChain.T2 [in LemmaOverloading.domains]
-ProdOrd.K [in LemmaOverloading.ordtype]
-ProdOrd.T [in LemmaOverloading.ordtype]
-ProjChain.s [in LemmaOverloading.domains]
-ProjChain.T1 [in LemmaOverloading.domains]
-ProjChain.T2 [in LemmaOverloading.domains]
-

R

-ReflectConnectives.b1 [in LemmaOverloading.prelude]
-ReflectConnectives.b2 [in LemmaOverloading.prelude]
-ReflectConnectives.b3 [in LemmaOverloading.prelude]
-ReflectConnectives.b4 [in LemmaOverloading.prelude]
-ReflectConnectives.b5 [in LemmaOverloading.prelude]
-ReflectConnectives.b6 [in LemmaOverloading.prelude]
-RelLaws.T [in LemmaOverloading.rels]
-RelProperties.pT [in LemmaOverloading.rels]
-RelProperties.T [in LemmaOverloading.rels]
-Reorder.A [in LemmaOverloading.prelude]
-Reorder.B [in LemmaOverloading.prelude]
-Reorder.C [in LemmaOverloading.prelude]
-

S

-SepAlloc.A [in LemmaOverloading.stsep]
-SepAlloc.v [in LemmaOverloading.stsep]
-SepBind.A [in LemmaOverloading.stsep]
-SepBind.B [in LemmaOverloading.stsep]
-SepBind.e1 [in LemmaOverloading.stsep]
-SepBind.e2 [in LemmaOverloading.stsep]
-SepBind.s1 [in LemmaOverloading.stsep]
-SepBind.s2 [in LemmaOverloading.stsep]
-SepBlockAlloc.A [in LemmaOverloading.stsep]
-SepBlockAlloc.n [in LemmaOverloading.stsep]
-SepBlockAlloc.v [in LemmaOverloading.stsep]
-SepConseq.A [in LemmaOverloading.stsep]
-SepConseq.e [in LemmaOverloading.stsep]
-SepConseq.pf [in LemmaOverloading.stsep]
-SepConseq.s1 [in LemmaOverloading.stsep]
-SepConseq.s2 [in LemmaOverloading.stsep]
-SepDealloc.x [in LemmaOverloading.stsep]
-SepFix.A [in LemmaOverloading.stsep]
-SepFix.B [in LemmaOverloading.stsep]
-SepFix.s [in LemmaOverloading.stsep]
-SepFrame.A [in LemmaOverloading.stsep]
-SepFrame.s [in LemmaOverloading.stsep]
-SepRead.A [in LemmaOverloading.stsep]
-SepRead.x [in LemmaOverloading.stsep]
-SepReturn.A [in LemmaOverloading.stsep]
-SepReturn.x [in LemmaOverloading.stsep]
-SepThrow.A [in LemmaOverloading.stsep]
-SepThrow.e [in LemmaOverloading.stsep]
-SepTry.A [in LemmaOverloading.stsep]
-SepTry.B [in LemmaOverloading.stsep]
-SepTry.e [in LemmaOverloading.stsep]
-SepTry.e1 [in LemmaOverloading.stsep]
-SepTry.e2 [in LemmaOverloading.stsep]
-SepTry.s [in LemmaOverloading.stsep]
-SepTry.s1 [in LemmaOverloading.stsep]
-SepTry.s2 [in LemmaOverloading.stsep]
-SepWrite.A [in LemmaOverloading.stsep]
-SepWrite.v [in LemmaOverloading.stsep]
-SepWrite.x [in LemmaOverloading.stsep]
-Simplifications.pT [in LemmaOverloading.rels]
-Simplifications.T [in LemmaOverloading.rels]
-STDef.A [in LemmaOverloading.stmod]
-STDef.s [in LemmaOverloading.stmod]
-SubCPO.C [in LemmaOverloading.domains]
-SubCPO.D [in LemmaOverloading.domains]
-SubCPO.s [in LemmaOverloading.domains]
-SubLattice.C [in LemmaOverloading.domains]
-SubLattice.s [in LemmaOverloading.domains]
-SubLattice.T [in LemmaOverloading.domains]
-SubMemLaws.T [in LemmaOverloading.rels]
-SubPoset.C [in LemmaOverloading.domains]
-SubPoset.s [in LemmaOverloading.domains]
-SubPoset.T [in LemmaOverloading.domains]
-

T

-Totality.K [in LemmaOverloading.ordtype]
-

X

-XFind.A [in LemmaOverloading.xfind]
-


-

Library Index

-

A

-auto
-

C

-cancel
-cancelCTC
-cancelD
-cancel2
-

D

-domains
-

F

-finmap
-

H

-heaps
-hprop
-

I

-indom
-indomCTC
-

L

-llistR
-

N

-noalias
-noaliasBT
-noaliasCTC
-

O

-ordtype
-

P

-perms
-prefix
-prelude
-

R

-rels
-

S

-stlog
-stlogCTC
-stlogR
-stmod
-stsep
-

T

-terms
-

X

-xfind
-xfindCTC
-


-

Lemma Index

-

A

-allC [in LemmaOverloading.stsep]
-allocbP [in LemmaOverloading.stsep]
-allocP [in LemmaOverloading.stsep]
-andFp [in LemmaOverloading.rels]
-andpF [in LemmaOverloading.rels]
-andpT [in LemmaOverloading.rels]
-andTp [in LemmaOverloading.rels]
-and6P [in LemmaOverloading.prelude]
-antiframe [in LemmaOverloading.stsep]
-app_cont [in LemmaOverloading.domains]
-app_mono [in LemmaOverloading.domains]
-auto [in LemmaOverloading.auto]
-

B

-bindP [in LemmaOverloading.stsep]
-bla [in LemmaOverloading.xfindCTC]
-blah [in LemmaOverloading.stlog]
-blah2 [in LemmaOverloading.stlog]
-bnd_gh1 [in LemmaOverloading.stlog]
-bnd_gh [in LemmaOverloading.stlog]
-bnd_throw [in LemmaOverloading.stlog]
-bnd_dealloc [in LemmaOverloading.stlog]
-bnd_allocb [in LemmaOverloading.stlog]
-bnd_alloc [in LemmaOverloading.stlog]
-bnd_write [in LemmaOverloading.stlog]
-bnd_read [in LemmaOverloading.stlog]
-bnd_ret [in LemmaOverloading.stlog]
-bnd_do [in LemmaOverloading.stlog]
-bnd_is_try [in LemmaOverloading.stlog]
-bnd_deallocR [in LemmaOverloading.stlogCTC]
-bnd_writeR [in LemmaOverloading.stlogCTC]
-bnd_gh1R [in LemmaOverloading.stlogR]
-bnd_ghR [in LemmaOverloading.stlogR]
-bnd_deallocR [in LemmaOverloading.stlogR]
-bnd_writeR [in LemmaOverloading.stlogR]
-bnd_readR [in LemmaOverloading.stlogR]
-bnd_doR [in LemmaOverloading.stlogR]
-bot_runs [in LemmaOverloading.stmod]
-bound [in LemmaOverloading.stmod]
-

C

-cancel [in LemmaOverloading.cancel2]
-cancel [in LemmaOverloading.heaps]
-cancelR [in LemmaOverloading.cancel]
-cancelR [in LemmaOverloading.cancelCTC]
-cancelT [in LemmaOverloading.heaps]
-cancel_sound [in LemmaOverloading.terms]
-cancel_sound' [in LemmaOverloading.terms]
-cancel_ins [in LemmaOverloading.finmap]
-cancel1 [in LemmaOverloading.cancel2]
-cancel2 [in LemmaOverloading.cancel2]
-cexit1 [in LemmaOverloading.heaps]
-cexit2 [in LemmaOverloading.heaps]
-cexit3 [in LemmaOverloading.heaps]
-chainE [in LemmaOverloading.domains]
-chain_clos_diag [in LemmaOverloading.domains]
-chain_closI [in LemmaOverloading.domains]
-chain_clos_mono [in LemmaOverloading.domains]
-chain_clos_idemp [in LemmaOverloading.domains]
-chain_closP [in LemmaOverloading.domains]
-chain_clos_min [in LemmaOverloading.domains]
-chain_clos_sub [in LemmaOverloading.domains]
-compA [in LemmaOverloading.prelude]
-compf1 [in LemmaOverloading.prelude]
-comp_cont [in LemmaOverloading.domains]
-comp_chainE [in LemmaOverloading.domains]
-comp_mono [in LemmaOverloading.domains]
-comp1f [in LemmaOverloading.prelude]
-congeqUh [in LemmaOverloading.heaps]
-congUh [in LemmaOverloading.heaps]
-conseq_refl [in LemmaOverloading.stsep]
-const_cont [in LemmaOverloading.domains]
-const_chainE [in LemmaOverloading.domains]
-const_chainP [in LemmaOverloading.domains]
-const_mono [in LemmaOverloading.domains]
-contE [in LemmaOverloading.domains]
-contV [in LemmaOverloading.prelude]
-contVT [in LemmaOverloading.prelude]
-cont_mono [in LemmaOverloading.domains]
-countN_varfree [in LemmaOverloading.terms]
-count0_hfree [in LemmaOverloading.terms]
-count1_hfree [in LemmaOverloading.terms]
-CPO.Exports.limM [in LemmaOverloading.domains]
-CPO.Exports.limP [in LemmaOverloading.domains]
-

D

-dapp_cont [in LemmaOverloading.domains]
-dapp_mono [in LemmaOverloading.domains]
-deallocP [in LemmaOverloading.stsep]
-defE [in LemmaOverloading.heaps]
-defF [in LemmaOverloading.heaps]
-defFUn [in LemmaOverloading.heaps]
-defPt [in LemmaOverloading.heaps]
-defPtUn [in LemmaOverloading.heaps]
-defPt_dom [in LemmaOverloading.heaps]
-defPt_def [in LemmaOverloading.heaps]
-defPt_null [in LemmaOverloading.heaps]
-defR [in LemmaOverloading.terms]
-defU [in LemmaOverloading.heaps]
-defUn [in LemmaOverloading.heaps]
-defUnF [in LemmaOverloading.heaps]
-defUnhh [in LemmaOverloading.heaps]
-defUnl [in LemmaOverloading.heaps]
-defUnr [in LemmaOverloading.heaps]
-def_runs [in LemmaOverloading.stmod]
-def0 [in LemmaOverloading.heaps]
-dfun_limM [in LemmaOverloading.domains]
-dfun_limP [in LemmaOverloading.domains]
-dfun_supM [in LemmaOverloading.domains]
-dfun_supP [in LemmaOverloading.domains]
-dfun_trans [in LemmaOverloading.domains]
-dfun_asym [in LemmaOverloading.domains]
-dfun_refl [in LemmaOverloading.domains]
-dfun_botP [in LemmaOverloading.domains]
-diag_cont [in LemmaOverloading.domains]
-diag_mono [in LemmaOverloading.domains]
-disjC [in LemmaOverloading.finmap]
-disjP [in LemmaOverloading.finmap]
-disj_fcat [in LemmaOverloading.finmap]
-disj_remE [in LemmaOverloading.finmap]
-disj_rem [in LemmaOverloading.finmap]
-disj_ins [in LemmaOverloading.finmap]
-disj_nil [in LemmaOverloading.finmap]
-domF [in LemmaOverloading.heaps]
-domPt [in LemmaOverloading.heaps]
-domPtUn [in LemmaOverloading.heaps]
-domPtUnX [in LemmaOverloading.heaps]
-domPtX [in LemmaOverloading.heaps]
-domR [in LemmaOverloading.terms]
-domU [in LemmaOverloading.heaps]
-domUn [in LemmaOverloading.heaps]
-dom_hfresh [in LemmaOverloading.heaps]
-dom_lfresh [in LemmaOverloading.heaps]
-dom_in_notin [in LemmaOverloading.heaps]
-dom_notin_notin [in LemmaOverloading.heaps]
-dom_fresh [in LemmaOverloading.heaps]
-dom_look [in LemmaOverloading.heaps]
-dom_free [in LemmaOverloading.heaps]
-dom_def [in LemmaOverloading.heaps]
-dom_null [in LemmaOverloading.heaps]
-dom0 [in LemmaOverloading.heaps]
-doP [in LemmaOverloading.stsep]
-dyn_injT [in LemmaOverloading.prelude]
-dyn_eta [in LemmaOverloading.prelude]
-dyn_inj [in LemmaOverloading.prelude]
-

E

-empbE [in LemmaOverloading.heaps]
-empP [in LemmaOverloading.heaps]
-empPt [in LemmaOverloading.heaps]
-empty_pf [in LemmaOverloading.cancel]
-empty_hfree [in LemmaOverloading.terms]
-empU [in LemmaOverloading.heaps]
-empUn [in LemmaOverloading.heaps]
-emp_pick [in LemmaOverloading.heaps]
-eqc [in LemmaOverloading.prelude]
-eqc2 [in LemmaOverloading.prelude]
-eqexnP [in LemmaOverloading.stmod]
-eqfun_trans [in LemmaOverloading.rels]
-eqfun_sym [in LemmaOverloading.rels]
-eqfun_refl [in LemmaOverloading.rels]
-EqPredType_trans' [in LemmaOverloading.rels]
-EqPredType_sym [in LemmaOverloading.rels]
-EqPredType_refl [in LemmaOverloading.rels]
-eqUh [in LemmaOverloading.heaps]
-eq_ptrP [in LemmaOverloading.heaps]
-eta [in LemmaOverloading.prelude]
-eval_rcons [in LemmaOverloading.terms]
-eval_cat [in LemmaOverloading.terms]
-eval_cons [in LemmaOverloading.terms]
-exit1 [in LemmaOverloading.heaps]
-exit2 [in LemmaOverloading.heaps]
-exit3 [in LemmaOverloading.heaps]
-exit4 [in LemmaOverloading.heaps]
-ext [in LemmaOverloading.prelude]
-extend_pf [in LemmaOverloading.xfind]
-

F

-fcatA [in LemmaOverloading.finmap]
-fcatAC [in LemmaOverloading.finmap]
-fcatC [in LemmaOverloading.finmap]
-fcatCA [in LemmaOverloading.finmap]
-fcatKs [in LemmaOverloading.finmap]
-fcatsK [in LemmaOverloading.finmap]
-fcats0 [in LemmaOverloading.finmap]
-fcat_srem [in LemmaOverloading.finmap]
-fcat_rems [in LemmaOverloading.finmap]
-fcat_sins [in LemmaOverloading.finmap]
-fcat_inss [in LemmaOverloading.finmap]
-fcat_nil' [in LemmaOverloading.finmap]
-fcat_ins' [in LemmaOverloading.finmap]
-fcat0s [in LemmaOverloading.finmap]
-feqP [in LemmaOverloading.finmap]
-findme [in LemmaOverloading.xfind]
-find2E [in LemmaOverloading.noaliasCTC]
-fmapE [in LemmaOverloading.finmap]
-fmapP [in LemmaOverloading.finmap]
-fmap_ind2 [in LemmaOverloading.finmap]
-fmap_ind' [in LemmaOverloading.finmap]
-fnd_fcat [in LemmaOverloading.finmap]
-fnd_supp_in [in LemmaOverloading.finmap]
-fnd_supp [in LemmaOverloading.finmap]
-fnd_ins [in LemmaOverloading.finmap]
-fnd_rem [in LemmaOverloading.finmap]
-fnd_empty [in LemmaOverloading.finmap]
-found_pf [in LemmaOverloading.xfind]
-found_pf [in LemmaOverloading.indom]
-found_pf [in LemmaOverloading.stlogR]
-frame [in LemmaOverloading.stsep]
-frame0 [in LemmaOverloading.stsep]
-frame1 [in LemmaOverloading.stsep]
-freeF [in LemmaOverloading.heaps]
-freePtUn [in LemmaOverloading.heaps]
-freeR [in LemmaOverloading.terms]
-freeU [in LemmaOverloading.heaps]
-freeUn [in LemmaOverloading.heaps]
-freeUnD [in LemmaOverloading.heaps]
-freeUnl [in LemmaOverloading.heaps]
-freeUnr [in LemmaOverloading.heaps]
-free_nullP [in LemmaOverloading.heaps]
-free0 [in LemmaOverloading.heaps]
-fresh_null [in LemmaOverloading.heaps]
-fr_pre [in LemmaOverloading.stsep]
-fun_limM [in LemmaOverloading.domains]
-fun_limP [in LemmaOverloading.domains]
-fun_supM [in LemmaOverloading.domains]
-fun_supP [in LemmaOverloading.domains]
-fun_trans [in LemmaOverloading.domains]
-fun_asym [in LemmaOverloading.domains]
-fun_refl [in LemmaOverloading.domains]
-fun_botP [in LemmaOverloading.domains]
-

G

-ghE [in LemmaOverloading.stsep]
-

H

-hasPx [in LemmaOverloading.prelude]
-hdomP [in LemmaOverloading.heaps]
-heapE [in LemmaOverloading.heaps]
-heap_etaP [in LemmaOverloading.heaps]
-heap_eta [in LemmaOverloading.heaps]
-hfreeE [in LemmaOverloading.terms]
-hfreeN [in LemmaOverloading.terms]
-hfree_def [in LemmaOverloading.terms]
-hfree_subdom' [in LemmaOverloading.terms]
-hfree_subdom [in LemmaOverloading.terms]
-hfresh_null [in LemmaOverloading.heaps]
-hfresh_high [in LemmaOverloading.heaps]
-highPn [in LemmaOverloading.heaps]
-highPtUn [in LemmaOverloading.heaps]
-highPtUn2 [in LemmaOverloading.heaps]
-high_lowD [in LemmaOverloading.heaps]
-hlE [in LemmaOverloading.heaps]
-

I

-ideal_supM [in LemmaOverloading.domains]
-ideal_supP [in LemmaOverloading.domains]
-ideal_supP' [in LemmaOverloading.domains]
-ideal_trans [in LemmaOverloading.domains]
-ideal_asym [in LemmaOverloading.domains]
-ideal_refl [in LemmaOverloading.domains]
-ideal_botP [in LemmaOverloading.domains]
-id_cont [in LemmaOverloading.domains]
-id_chainE [in LemmaOverloading.domains]
-id_mono [in LemmaOverloading.domains]
-image_chainP [in LemmaOverloading.domains]
-impC [in LemmaOverloading.stsep]
-indom [in LemmaOverloading.indom]
-infM [in LemmaOverloading.domains]
-infP [in LemmaOverloading.domains]
-injUh [in LemmaOverloading.heaps]
-inj_sval [in LemmaOverloading.prelude]
-ins_ins [in LemmaOverloading.finmap]
-ins_rem [in LemmaOverloading.finmap]
-interp_subctx [in LemmaOverloading.terms]
-interp_perm [in LemmaOverloading.terms]
-interp_cat [in LemmaOverloading.terms]
-interp_cons [in LemmaOverloading.terms]
-In_nil [in LemmaOverloading.rels]
-In_cons [in LemmaOverloading.rels]
-In_Simpl [in LemmaOverloading.rels]
-in_split [in LemmaOverloading.perms]
-irA [in LemmaOverloading.prelude]
-irr [in LemmaOverloading.ordtype]
-irr_ordf [in LemmaOverloading.ordtype]
-irr_lex [in LemmaOverloading.ordtype]
-irr_ltn_nat [in LemmaOverloading.ordtype]
-

J

-jmE [in LemmaOverloading.prelude]
-jmeq_refl [in LemmaOverloading.prelude]
-jm2E [in LemmaOverloading.prelude]
-

K

-kleene_lfp_least [in LemmaOverloading.domains]
-kleene_lfp_fixed [in LemmaOverloading.domains]
-

L

-last_ins' [in LemmaOverloading.finmap]
-last_inv [in LemmaOverloading.heaps]
-Lattice.Exports.supM [in LemmaOverloading.domains]
-Lattice.Exports.supP [in LemmaOverloading.domains]
-lat_limM [in LemmaOverloading.domains]
-lat_limP [in LemmaOverloading.domains]
-ldomK [in LemmaOverloading.heaps]
-ldomP [in LemmaOverloading.heaps]
-ldomUn [in LemmaOverloading.heaps]
-left_pf [in LemmaOverloading.indom]
-left_pf [in LemmaOverloading.stlogR]
-lfresh_null [in LemmaOverloading.heaps]
-lfresh_low [in LemmaOverloading.heaps]
-lhE [in LemmaOverloading.heaps]
-lift_chainP [in LemmaOverloading.domains]
-limE [in LemmaOverloading.domains]
-lim_dappE [in LemmaOverloading.domains]
-lim_appE [in LemmaOverloading.domains]
-lim_liftE [in LemmaOverloading.domains]
-lim_mono [in LemmaOverloading.domains]
-locality [in LemmaOverloading.stsep]
-lookF [in LemmaOverloading.heaps]
-lookPtUn [in LemmaOverloading.heaps]
-lookR [in LemmaOverloading.terms]
-lookU [in LemmaOverloading.heaps]
-lookUnl [in LemmaOverloading.heaps]
-lookUnr [in LemmaOverloading.heaps]
-loweqE [in LemmaOverloading.heaps]
-loweqK [in LemmaOverloading.heaps]
-loweqP [in LemmaOverloading.heaps]
-lowPn [in LemmaOverloading.heaps]
-lowPtUn [in LemmaOverloading.heaps]
-lowUn [in LemmaOverloading.heaps]
-low_trans [in LemmaOverloading.heaps]
-low_sym [in LemmaOverloading.heaps]
-low_refl [in LemmaOverloading.heaps]
-lseg_case [in LemmaOverloading.llistR]
-lseg_empty [in LemmaOverloading.llistR]
-lseg_neq [in LemmaOverloading.llistR]
-lseg_null [in LemmaOverloading.llistR]
-lseg_add_last [in LemmaOverloading.llistR]
-lseq_pos [in LemmaOverloading.llistR]
-lseq_null [in LemmaOverloading.llistR]
-ltn_ptr_total [in LemmaOverloading.heaps]
-ltn_ptr_trans [in LemmaOverloading.heaps]
-ltn_ptr_irr [in LemmaOverloading.heaps]
-

M

-Mem_Seq1 [in LemmaOverloading.rels]
-Mem_Mem [in LemmaOverloading.rels]
-Mem_Simpl [in LemmaOverloading.rels]
-Mem_toPred [in LemmaOverloading.rels]
-modelE [in LemmaOverloading.stmod]
-model_runs [in LemmaOverloading.stmod]
-Model.allocb_has_spec [in LemmaOverloading.stmod]
-Model.allocb_dstrict [in LemmaOverloading.stmod]
-Model.allocb_coherent [in LemmaOverloading.stmod]
-Model.alloc_has_spec [in LemmaOverloading.stmod]
-Model.alloc_dstrict [in LemmaOverloading.stmod]
-Model.alloc_coherent [in LemmaOverloading.stmod]
-Model.bind_has_spec [in LemmaOverloading.stmod]
-Model.bind_dstrict [in LemmaOverloading.stmod]
-Model.bind_coherent [in LemmaOverloading.stmod]
-Model.conseq_refl [in LemmaOverloading.stmod]
-Model.dealloc_has_spec [in LemmaOverloading.stmod]
-Model.dealloc_dstrict [in LemmaOverloading.stmod]
-Model.dealloc_coherent [in LemmaOverloading.stmod]
-Model.do_has_spec [in LemmaOverloading.stmod]
-Model.do_dstrict [in LemmaOverloading.stmod]
-Model.do_coherent [in LemmaOverloading.stmod]
-Model.read_has_spec [in LemmaOverloading.stmod]
-Model.read_dstrict [in LemmaOverloading.stmod]
-Model.read_coherent [in LemmaOverloading.stmod]
-Model.ret_has_spec [in LemmaOverloading.stmod]
-Model.ret_dstrict [in LemmaOverloading.stmod]
-Model.ret_coherent [in LemmaOverloading.stmod]
-Model.throw_has_spec [in LemmaOverloading.stmod]
-Model.throw_dstrict [in LemmaOverloading.stmod]
-Model.throw_coherent [in LemmaOverloading.stmod]
-Model.try_has_spec [in LemmaOverloading.stmod]
-Model.try_dstrict [in LemmaOverloading.stmod]
-Model.try_coherent [in LemmaOverloading.stmod]
-Model.write_has_spec [in LemmaOverloading.stmod]
-Model.write_dstrict [in LemmaOverloading.stmod]
-Model.write_coherent [in LemmaOverloading.stmod]
-modnS [in LemmaOverloading.heaps]
-

N

-nat_chain_axiom [in LemmaOverloading.domains]
-nat_trans [in LemmaOverloading.domains]
-nat_asym [in LemmaOverloading.domains]
-nat_refl [in LemmaOverloading.domains]
-nat_botP [in LemmaOverloading.domains]
-noalias [in LemmaOverloading.heaps]
-noaliasR [in LemmaOverloading.noaliasCTC]
-noaliasR [in LemmaOverloading.noalias]
-noaliasR [in LemmaOverloading.noaliasBT]
-noaliasR_fwd3' [in LemmaOverloading.noalias]
-noaliasR_fwd3 [in LemmaOverloading.noalias]
-noaliasR_fwd_wrong1 [in LemmaOverloading.noalias]
-noaliasR_fwd1 [in LemmaOverloading.noalias]
-noaliasR2 [in LemmaOverloading.noaliasBT]
-NoAlias.noalias_pf [in LemmaOverloading.noalias]
-NoAlias2.start_pf [in LemmaOverloading.noaliasBT]
-NoAlias3.noalias_pf [in LemmaOverloading.noaliasBT]
-notin_filter [in LemmaOverloading.finmap]
-notin_path [in LemmaOverloading.finmap]
-nsym [in LemmaOverloading.ordtype]
-

O

-onth_size [in LemmaOverloading.prefix]
-opn [in LemmaOverloading.stlog]
-ord_path [in LemmaOverloading.finmap]
-orFp [in LemmaOverloading.rels]
-orpF [in LemmaOverloading.rels]
-orpT [in LemmaOverloading.rels]
-orrA [in LemmaOverloading.rels]
-orrAb [in LemmaOverloading.rels]
-orrAC [in LemmaOverloading.rels]
-orrC [in LemmaOverloading.rels]
-orrCA [in LemmaOverloading.rels]
-orrI [in LemmaOverloading.rels]
-orr0 [in LemmaOverloading.rels]
-orTp [in LemmaOverloading.rels]
-or0r [in LemmaOverloading.rels]
-or5P [in LemmaOverloading.prelude]
-or6P [in LemmaOverloading.prelude]
-

P

-pair_limM [in LemmaOverloading.domains]
-pair_limP [in LemmaOverloading.domains]
-pair_supM [in LemmaOverloading.domains]
-pair_supP [in LemmaOverloading.domains]
-pair_trans [in LemmaOverloading.domains]
-pair_asym [in LemmaOverloading.domains]
-pair_refl [in LemmaOverloading.domains]
-pair_botP [in LemmaOverloading.domains]
-path_supp_ins_inv [in LemmaOverloading.finmap]
-path_supp_ins [in LemmaOverloading.finmap]
-path_supp_ord [in LemmaOverloading.finmap]
-path_ins' [in LemmaOverloading.finmap]
-path_filter [in LemmaOverloading.heaps]
-path_last [in LemmaOverloading.heaps]
-perm_catCA [in LemmaOverloading.perms]
-perm_catAC [in LemmaOverloading.perms]
-perm_cat2r [in LemmaOverloading.perms]
-perm_cat2l [in LemmaOverloading.perms]
-perm_cat_cons [in LemmaOverloading.perms]
-perm_cons_cat_cons [in LemmaOverloading.perms]
-perm_cons [in LemmaOverloading.perms]
-perm_cat_consR [in LemmaOverloading.perms]
-perm_ind2 [in LemmaOverloading.perms]
-perm_cons_cat_consL [in LemmaOverloading.perms]
-perm_cons_catAC [in LemmaOverloading.perms]
-perm_cons_catCA [in LemmaOverloading.perms]
-perm_catC [in LemmaOverloading.perms]
-perm_cat_consL [in LemmaOverloading.perms]
-perm_catL [in LemmaOverloading.perms]
-perm_cat2rL [in LemmaOverloading.perms]
-perm_cat2lL [in LemmaOverloading.perms]
-perm_in [in LemmaOverloading.perms]
-perm_trans [in LemmaOverloading.perms]
-perm_sym [in LemmaOverloading.perms]
-perm_refl [in LemmaOverloading.perms]
-perm_nil [in LemmaOverloading.perms]
-pfreeE [in LemmaOverloading.terms]
-pfreeN [in LemmaOverloading.terms]
-pfree_def [in LemmaOverloading.terms]
-pfree_subdom [in LemmaOverloading.terms]
-pickP [in LemmaOverloading.heaps]
-Poset.Exports.botP [in LemmaOverloading.domains]
-Poset.Exports.poset_trans [in LemmaOverloading.domains]
-Poset.Exports.poset_asym [in LemmaOverloading.domains]
-Poset.Exports.poset_refl [in LemmaOverloading.domains]
-pow_mono [in LemmaOverloading.domains]
-predkN [in LemmaOverloading.finmap]
-prefix_onth [in LemmaOverloading.prefix]
-prefix_size [in LemmaOverloading.prefix]
-prefix_cons' [in LemmaOverloading.prefix]
-prefix_cons [in LemmaOverloading.prefix]
-prefix_trans [in LemmaOverloading.prefix]
-prefix_refl [in LemmaOverloading.prefix]
-prod_cont [in LemmaOverloading.domains]
-prod_mono [in LemmaOverloading.domains]
-proj1_cont [in LemmaOverloading.domains]
-proj1_prodE [in LemmaOverloading.domains]
-proj1_diagE [in LemmaOverloading.domains]
-proj1_mono [in LemmaOverloading.domains]
-proj2_cont [in LemmaOverloading.domains]
-proj2_prodE [in LemmaOverloading.domains]
-proj2_diagE [in LemmaOverloading.domains]
-proj2_mono [in LemmaOverloading.domains]
-proof_irrelevance [in LemmaOverloading.prelude]
-prop_limM [in LemmaOverloading.domains]
-prop_limP [in LemmaOverloading.domains]
-prop_supM [in LemmaOverloading.domains]
-prop_supP [in LemmaOverloading.domains]
-prop_trans [in LemmaOverloading.domains]
-prop_asym [in LemmaOverloading.domains]
-prop_refl [in LemmaOverloading.domains]
-prop_botP [in LemmaOverloading.domains]
-ptrA [in LemmaOverloading.heaps]
-ptrE [in LemmaOverloading.heaps]
-ptrK [in LemmaOverloading.heaps]
-ptrT [in LemmaOverloading.heaps]
-ptr_has [in LemmaOverloading.terms]
-ptr_null [in LemmaOverloading.heaps]
-ptr0 [in LemmaOverloading.heaps]
-pts_pf [in LemmaOverloading.cancel]
-pts_inj [in LemmaOverloading.heaps]
-pts_injT [in LemmaOverloading.heaps]
-pts_injP [in LemmaOverloading.heaps]
-

R

-rACI [in LemmaOverloading.prelude]
-rCAI [in LemmaOverloading.prelude]
-readP [in LemmaOverloading.stsep]
-recurse_pf [in LemmaOverloading.xfind]
-refl_jmeq2 [in LemmaOverloading.prelude]
-reindex [in LemmaOverloading.domains]
-relaxP [in LemmaOverloading.domains]
-rem_supp [in LemmaOverloading.finmap]
-rem_ins [in LemmaOverloading.finmap]
-rem_rem [in LemmaOverloading.finmap]
-rem_empty [in LemmaOverloading.finmap]
-retP [in LemmaOverloading.stsep]
-riA [in LemmaOverloading.prelude]
-right_pf [in LemmaOverloading.indom]
-right_pf [in LemmaOverloading.stlogR]
-

S

-scanE [in LemmaOverloading.noaliasCTC]
-scan_it [in LemmaOverloading.noalias]
-Scan.default_pf [in LemmaOverloading.noalias]
-Scan.ptr_pf [in LemmaOverloading.noalias]
-Scan.scanE [in LemmaOverloading.noalias]
-Scan.union_pf [in LemmaOverloading.noalias]
-Search.findE [in LemmaOverloading.noalias]
-Search.found_pf [in LemmaOverloading.noalias]
-Search.recurse_pf [in LemmaOverloading.noalias]
-Search2.find2E [in LemmaOverloading.noalias]
-Search2.foundx_pf [in LemmaOverloading.noalias]
-Search2.foundy_pf [in LemmaOverloading.noalias]
-Search2.foundz_pf [in LemmaOverloading.noalias]
-seqof_ins [in LemmaOverloading.finmap]
-sexit1 [in LemmaOverloading.heaps]
-sexit2 [in LemmaOverloading.heaps]
-sexit3 [in LemmaOverloading.heaps]
-sexit4 [in LemmaOverloading.heaps]
-simplify [in LemmaOverloading.cancelD]
-Simpl_PredE [in LemmaOverloading.rels]
-singleP [in LemmaOverloading.stmod]
-size_onth [in LemmaOverloading.prefix]
-sorted_filter [in LemmaOverloading.finmap]
-sorted_ins' [in LemmaOverloading.finmap]
-sorted_nil [in LemmaOverloading.finmap]
-spec_runs [in LemmaOverloading.stmod]
-starA [in LemmaOverloading.hprop]
-starAC [in LemmaOverloading.hprop]
-starC [in LemmaOverloading.hprop]
-starCA [in LemmaOverloading.hprop]
-starp0 [in LemmaOverloading.hprop]
-star0p [in LemmaOverloading.hprop]
-st_supM [in LemmaOverloading.stmod]
-st_supP [in LemmaOverloading.stmod]
-st_sup_has_spec [in LemmaOverloading.stmod]
-st_sup_dstrict [in LemmaOverloading.stmod]
-st_sup_coherent [in LemmaOverloading.stmod]
-st_botP [in LemmaOverloading.stmod]
-st_bot_has_spec [in LemmaOverloading.stmod]
-st_bot_dstrict [in LemmaOverloading.stmod]
-st_bot_coherent [in LemmaOverloading.stmod]
-st_trans [in LemmaOverloading.stmod]
-st_asym [in LemmaOverloading.stmod]
-st_refl [in LemmaOverloading.stmod]
-subctx_trans [in LemmaOverloading.terms]
-subctx_refl [in LemmaOverloading.terms]
-subdomD [in LemmaOverloading.heaps]
-subdomE [in LemmaOverloading.heaps]
-subdomP [in LemmaOverloading.heaps]
-subdomPE [in LemmaOverloading.heaps]
-subdomQ [in LemmaOverloading.heaps]
-subdomUE [in LemmaOverloading.heaps]
-subdom_trans [in LemmaOverloading.heaps]
-subdom_emp_inv [in LemmaOverloading.heaps]
-subdom_emp [in LemmaOverloading.heaps]
-subdom_refl [in LemmaOverloading.heaps]
-subdom_def [in LemmaOverloading.heaps]
-subheapE [in LemmaOverloading.heaps]
-subheapUn [in LemmaOverloading.heaps]
-subheapUnl [in LemmaOverloading.heaps]
-subheapUnr [in LemmaOverloading.heaps]
-subheap_id [in LemmaOverloading.heaps]
-subheap_trans [in LemmaOverloading.heaps]
-subheap_def [in LemmaOverloading.heaps]
-subheap_refl [in LemmaOverloading.heaps]
-SubPredType_trans' [in LemmaOverloading.rels]
-SubPredType_refl [in LemmaOverloading.rels]
-subp_andr [in LemmaOverloading.rels]
-subp_andl [in LemmaOverloading.rels]
-subp_orr [in LemmaOverloading.rels]
-subp_orl [in LemmaOverloading.rels]
-subp_and [in LemmaOverloading.rels]
-subp_or [in LemmaOverloading.rels]
-subp_trans [in LemmaOverloading.rels]
-subp_asym [in LemmaOverloading.rels]
-subp_refl [in LemmaOverloading.rels]
-sub_limM [in LemmaOverloading.domains]
-sub_limP [in LemmaOverloading.domains]
-sub_limX [in LemmaOverloading.domains]
-sub_supM [in LemmaOverloading.domains]
-sub_supP [in LemmaOverloading.domains]
-sub_supX [in LemmaOverloading.domains]
-sub_trans [in LemmaOverloading.domains]
-sub_asym [in LemmaOverloading.domains]
-sub_refl [in LemmaOverloading.domains]
-sub_botP [in LemmaOverloading.domains]
-sub_orr [in LemmaOverloading.rels]
-sub_orl [in LemmaOverloading.rels]
-supdomeqUh [in LemmaOverloading.heaps]
-supdomUh [in LemmaOverloading.heaps]
-supE [in LemmaOverloading.domains]
-suppP [in LemmaOverloading.finmap]
-supp_eq_ins [in LemmaOverloading.finmap]
-supp_fcat [in LemmaOverloading.finmap]
-supp_ins [in LemmaOverloading.finmap]
-supp_rem [in LemmaOverloading.finmap]
-supp_nilE [in LemmaOverloading.finmap]
-supp_nil [in LemmaOverloading.finmap]
-sup_dappE [in LemmaOverloading.domains]
-sup_appE [in LemmaOverloading.domains]
-sup_clos_mono [in LemmaOverloading.domains]
-sup_clos_idemp [in LemmaOverloading.domains]
-sup_closP [in LemmaOverloading.domains]
-sup_clos_min [in LemmaOverloading.domains]
-sup_clos_sub [in LemmaOverloading.domains]
-sup_mono [in LemmaOverloading.domains]
-sup_defdef [in LemmaOverloading.heaps]
-svalE [in LemmaOverloading.prelude]
-sval_mono [in LemmaOverloading.domains]
-swapI [in LemmaOverloading.prelude]
-swap_rAC [in LemmaOverloading.prelude]
-swap_rCA [in LemmaOverloading.prelude]
-swap_prod [in LemmaOverloading.prelude]
-swp [in LemmaOverloading.stlog]
-sym [in LemmaOverloading.prelude]
-

T

-tarski_gfp_greatest [in LemmaOverloading.domains]
-tarski_gfp_fixed [in LemmaOverloading.domains]
-tarski_lfp_least [in LemmaOverloading.domains]
-tarski_lfp_fixed [in LemmaOverloading.domains]
-test [in LemmaOverloading.heaps]
-throwP [in LemmaOverloading.stsep]
-toPredE [in LemmaOverloading.rels]
-total [in LemmaOverloading.ordtype]
-totalP [in LemmaOverloading.ordtype]
-total_ordf [in LemmaOverloading.ordtype]
-total_lex [in LemmaOverloading.ordtype]
-total_ltn_nat [in LemmaOverloading.ordtype]
-trans [in LemmaOverloading.ordtype]
-trans_ordf [in LemmaOverloading.ordtype]
-trans_lex [in LemmaOverloading.ordtype]
-trans_ltn_nat [in LemmaOverloading.ordtype]
-tryP [in LemmaOverloading.stsep]
-try_gh1 [in LemmaOverloading.stlog]
-try_gh [in LemmaOverloading.stlog]
-try_throw [in LemmaOverloading.stlog]
-try_dealloc [in LemmaOverloading.stlog]
-try_allocb [in LemmaOverloading.stlog]
-try_alloc [in LemmaOverloading.stlog]
-try_write [in LemmaOverloading.stlog]
-try_read [in LemmaOverloading.stlog]
-try_ret [in LemmaOverloading.stlog]
-try_do [in LemmaOverloading.stlog]
-try_case_pf [in LemmaOverloading.stlogR]
-try_gh1R [in LemmaOverloading.stlogR]
-try_ghR [in LemmaOverloading.stlogR]
-try_deallocR [in LemmaOverloading.stlogR]
-try_writeR [in LemmaOverloading.stlogR]
-try_readR [in LemmaOverloading.stlogR]
-try_doR [in LemmaOverloading.stlogR]
-

U

-unA [in LemmaOverloading.heaps]
-unAC [in LemmaOverloading.heaps]
-unA2 [in LemmaOverloading.heaps]
-unC [in LemmaOverloading.heaps]
-unCA [in LemmaOverloading.heaps]
-unC2 [in LemmaOverloading.heaps]
-undefE [in LemmaOverloading.heaps]
-unDl2 [in LemmaOverloading.heaps]
-unDr2 [in LemmaOverloading.heaps]
-unhKl [in LemmaOverloading.heaps]
-unhKr [in LemmaOverloading.heaps]
-unh0 [in LemmaOverloading.heaps]
-unh02 [in LemmaOverloading.heaps]
-union_pf [in LemmaOverloading.cancel]
-unKhl [in LemmaOverloading.heaps]
-unKhl2 [in LemmaOverloading.heaps]
-unKhr [in LemmaOverloading.heaps]
-unKhr2 [in LemmaOverloading.heaps]
-un_nullP [in LemmaOverloading.heaps]
-un0E [in LemmaOverloading.heaps]
-un0h [in LemmaOverloading.heaps]
-un0h2 [in LemmaOverloading.heaps]
-updateE [in LemmaOverloading.stlogR]
-updF [in LemmaOverloading.heaps]
-updiD [in LemmaOverloading.heaps]
-updimV [in LemmaOverloading.heaps]
-updiP [in LemmaOverloading.heaps]
-updiS [in LemmaOverloading.heaps]
-updiVm [in LemmaOverloading.heaps]
-updiVm' [in LemmaOverloading.heaps]
-updi_iinv [in LemmaOverloading.heaps]
-updi_inv [in LemmaOverloading.heaps]
-updi_catI [in LemmaOverloading.heaps]
-updi_cat [in LemmaOverloading.heaps]
-updi_last [in LemmaOverloading.heaps]
-updPtUn [in LemmaOverloading.heaps]
-updU [in LemmaOverloading.heaps]
-updUnl [in LemmaOverloading.heaps]
-updUnr [in LemmaOverloading.heaps]
-upd_inj [in LemmaOverloading.heaps]
-upd_nullP [in LemmaOverloading.heaps]
-

V

-valid_subctx [in LemmaOverloading.terms]
-valid_cat [in LemmaOverloading.terms]
-valid_heaps_cat [in LemmaOverloading.terms]
-valid_ptrs_cat [in LemmaOverloading.terms]
-valid_cons [in LemmaOverloading.terms]
-val_gh1 [in LemmaOverloading.stlog]
-val_gh [in LemmaOverloading.stlog]
-val_throw [in LemmaOverloading.stlog]
-val_dealloc [in LemmaOverloading.stlog]
-val_allocb [in LemmaOverloading.stlog]
-val_alloc [in LemmaOverloading.stlog]
-val_write [in LemmaOverloading.stlog]
-val_read [in LemmaOverloading.stlog]
-val_ret [in LemmaOverloading.stlog]
-val_do [in LemmaOverloading.stlog]
-val_doR [in LemmaOverloading.stlogCTC]
-val_gh1R [in LemmaOverloading.stlogR]
-val_ghR [in LemmaOverloading.stlogR]
-val_deallocR [in LemmaOverloading.stlogR]
-val_writeR [in LemmaOverloading.stlogR]
-val_readR [in LemmaOverloading.stlogR]
-val_doR [in LemmaOverloading.stlogR]
-vars_hfree [in LemmaOverloading.terms]
-var_pf [in LemmaOverloading.cancel]
-var_has [in LemmaOverloading.terms]
-

W

-writeP [in LemmaOverloading.stsep]
-


-

Constructor Index

-

A

-AbsHeap [in LemmaOverloading.cancel2]
-AbsPts [in LemmaOverloading.cancel2]
-And6 [in LemmaOverloading.prelude]
-Ast [in LemmaOverloading.cancel]
-

B

-BndForm [in LemmaOverloading.stlogR]
-

C

-Chain [in LemmaOverloading.domains]
-Check [in LemmaOverloading.noalias]
-Check [in LemmaOverloading.auto]
-Check' [in LemmaOverloading.noalias]
-Context [in LemmaOverloading.terms]
-CPO.Class [in LemmaOverloading.domains]
-CPO.Mixin [in LemmaOverloading.domains]
-CPO.Pack [in LemmaOverloading.domains]
-

D

-Def [in LemmaOverloading.heaps]
-def_true [in LemmaOverloading.heaps]
-def_false3 [in LemmaOverloading.heaps]
-def_false2 [in LemmaOverloading.heaps]
-def_false1 [in LemmaOverloading.heaps]
-disj_false [in LemmaOverloading.finmap]
-disj_true [in LemmaOverloading.finmap]
-Dyn.dyn [in LemmaOverloading.prelude]
-

E

-eqD [in LemmaOverloading.terms]
-eqH [in LemmaOverloading.terms]
-Equate [in LemmaOverloading.auto]
-eqX [in LemmaOverloading.terms]
-Exn [in LemmaOverloading.stmod]
-exn_from_nat [in LemmaOverloading.stmod]
-

F

-Find [in LemmaOverloading.auto]
-FinMap [in LemmaOverloading.finmap]
-Form [in LemmaOverloading.indom]
-Form [in LemmaOverloading.auto]
-Form [in LemmaOverloading.cancelD]
-

H

-has_false [in LemmaOverloading.prelude]
-has_true [in LemmaOverloading.prelude]
-HeapEq [in LemmaOverloading.cancel2]
-

I

-Ideal [in LemmaOverloading.domains]
-

L

-Lattice.Class [in LemmaOverloading.domains]
-Lattice.Mixin [in LemmaOverloading.domains]
-Lattice.Pack [in LemmaOverloading.domains]
-

M

-MemProp [in LemmaOverloading.rels]
-

N

-NoAlias.Form [in LemmaOverloading.noalias]
-NoAlias.Tag [in LemmaOverloading.noalias]
-NoAlias2.Form [in LemmaOverloading.noaliasBT]
-NoAlias2.Tag [in LemmaOverloading.noaliasBT]
-NoAlias3.Form [in LemmaOverloading.noaliasBT]
-

O

-Ordered.Class [in LemmaOverloading.ordtype]
-Ordered.Mixin [in LemmaOverloading.ordtype]
-Ordered.Pack [in LemmaOverloading.ordtype]
-Or51 [in LemmaOverloading.prelude]
-Or52 [in LemmaOverloading.prelude]
-Or53 [in LemmaOverloading.prelude]
-Or54 [in LemmaOverloading.prelude]
-Or55 [in LemmaOverloading.prelude]
-Or61 [in LemmaOverloading.prelude]
-Or62 [in LemmaOverloading.prelude]
-Or63 [in LemmaOverloading.prelude]
-Or64 [in LemmaOverloading.prelude]
-Or65 [in LemmaOverloading.prelude]
-Or66 [in LemmaOverloading.prelude]
-

P

-Pack [in LemmaOverloading.cancel2]
-PackHeap [in LemmaOverloading.cancel2]
-permutation_trans [in LemmaOverloading.perms]
-permutation_swap [in LemmaOverloading.perms]
-permutation_skip [in LemmaOverloading.perms]
-permutation_nil [in LemmaOverloading.perms]
-Poset.Class [in LemmaOverloading.domains]
-Poset.Mixin [in LemmaOverloading.domains]
-Poset.Pack [in LemmaOverloading.domains]
-PropPredType [in LemmaOverloading.rels]
-ptr_nat [in LemmaOverloading.heaps]
-Pts [in LemmaOverloading.terms]
-

S

-Scan.Form [in LemmaOverloading.noalias]
-Scan.Tag [in LemmaOverloading.noalias]
-Search.Form [in LemmaOverloading.noalias]
-Search.Tag [in LemmaOverloading.noalias]
-Search2.Form [in LemmaOverloading.noalias]
-Search2.Tag [in LemmaOverloading.noalias]
-STprog [in LemmaOverloading.stmod]
-supp_spec_none [in LemmaOverloading.finmap]
-supp_spec_some [in LemmaOverloading.finmap]
-

T

-Tag [in LemmaOverloading.cancel]
-Tag [in LemmaOverloading.indom]
-Tag [in LemmaOverloading.auto]
-Tag [in LemmaOverloading.cancelD]
-Tag [in LemmaOverloading.stlogR]
-TagS [in LemmaOverloading.auto]
-total_spec_gt [in LemmaOverloading.ordtype]
-total_spec_eq [in LemmaOverloading.ordtype]
-total_spec_lt [in LemmaOverloading.ordtype]
-TryForm [in LemmaOverloading.stlogR]
-

U

-Undef [in LemmaOverloading.heaps]
-Update [in LemmaOverloading.stlogR]
-

V

-Val [in LemmaOverloading.stmod]
-ValForm [in LemmaOverloading.stlogR]
-Var [in LemmaOverloading.terms]
-

X

-XFind [in LemmaOverloading.xfind]
-XTag [in LemmaOverloading.xfind]
-


-

Axiom Index

-

F

-fext [in LemmaOverloading.prelude]
-

P

-pext [in LemmaOverloading.prelude]
-


-

Projection Index

-

A

-assign [in LemmaOverloading.auto]
-ast [in LemmaOverloading.cancelCTC]
-

B

-bnd_pivot [in LemmaOverloading.stlogR]
-

C

-CPO.base [in LemmaOverloading.domains]
-CPO.mixin [in LemmaOverloading.domains]
-CPO.mx_lim [in LemmaOverloading.domains]
-CPO.sort [in LemmaOverloading.domains]
-

D

-dummy [in LemmaOverloading.cancel2]
-Dyn.typ [in LemmaOverloading.prelude]
-Dyn.val [in LemmaOverloading.prelude]
-

E

-elem_of [in LemmaOverloading.xfind]
-

H

-heap_of [in LemmaOverloading.cancel]
-heap_ctx [in LemmaOverloading.terms]
-heap_of [in LemmaOverloading.indom]
-heap_h [in LemmaOverloading.cancel2]
-heap_of [in LemmaOverloading.stlogR]
-heq1 [in LemmaOverloading.stlogCTC]
-

I

-id_pf [in LemmaOverloading.domains]
-id_val [in LemmaOverloading.domains]
-index_of [in LemmaOverloading.xfindCTC]
-indom [in LemmaOverloading.indomCTC]
-

L

-Lattice.base [in LemmaOverloading.domains]
-Lattice.mixin [in LemmaOverloading.domains]
-Lattice.mx_sup [in LemmaOverloading.domains]
-Lattice.sort [in LemmaOverloading.domains]
-

M

-model [in LemmaOverloading.stmod]
-

N

-NoAlias.untag [in LemmaOverloading.noalias]
-NoAlias.y_of [in LemmaOverloading.noalias]
-NoAlias2.eq_of [in LemmaOverloading.noaliasBT]
-NoAlias2.untag [in LemmaOverloading.noaliasBT]
-NoAlias3.y_of [in LemmaOverloading.noaliasBT]
-

O

-Ordered.base [in LemmaOverloading.ordtype]
-Ordered.mixin [in LemmaOverloading.ordtype]
-Ordered.ordering [in LemmaOverloading.ordtype]
-Ordered.sort [in LemmaOverloading.ordtype]
-

P

-pack_h [in LemmaOverloading.cancel2]
-Poset.mixin [in LemmaOverloading.domains]
-Poset.mx_bot [in LemmaOverloading.domains]
-Poset.mx_leq [in LemmaOverloading.domains]
-Poset.sort [in LemmaOverloading.domains]
-pred_of [in LemmaOverloading.domains]
-Pred_Sort [in LemmaOverloading.rels]
-proof [in LemmaOverloading.cancel2]
-prop [in LemmaOverloading.cancel2]
-prop_of [in LemmaOverloading.auto]
-prop_of [in LemmaOverloading.cancelD]
-ptr_ctx [in LemmaOverloading.terms]
-pts_h [in LemmaOverloading.cancel2]
-puntag [in LemmaOverloading.cancelD]
-

R

-rest [in LemmaOverloading.stlogCTC]
-rest1 [in LemmaOverloading.stlogCTC]
-

S

-scan [in LemmaOverloading.noaliasCTC]
-Scan.heap_of [in LemmaOverloading.noalias]
-Scan.untag [in LemmaOverloading.noalias]
-search [in LemmaOverloading.noaliasCTC]
-Search.seq_of [in LemmaOverloading.noalias]
-Search.untag [in LemmaOverloading.noalias]
-search2 [in LemmaOverloading.noaliasCTC]
-Search2.seq_of [in LemmaOverloading.noalias]
-Search2.untag [in LemmaOverloading.noalias]
-seq_of [in LemmaOverloading.noaliasCTC]
-seq_of [in LemmaOverloading.xfindCTC]
-seq_of [in LemmaOverloading.finmap]
-seq_of [in LemmaOverloading.auto]
-

T

-toPred [in LemmaOverloading.rels]
-try_pivot [in LemmaOverloading.stlogR]
-

U

-unpack [in LemmaOverloading.cancel2]
-untag [in LemmaOverloading.cancel]
-untag [in LemmaOverloading.indom]
-untag [in LemmaOverloading.auto]
-untag [in LemmaOverloading.stlogR]
-untags [in LemmaOverloading.auto]
-update1 [in LemmaOverloading.stlogCTC]
-update2 [in LemmaOverloading.stlogCTC]
-

V

-val_pivot [in LemmaOverloading.stlogR]
-

X

-xfind [in LemmaOverloading.xfindCTC]
-xuntag [in LemmaOverloading.xfind]
-x_of [in LemmaOverloading.auto]
-

Y

-y_of' [in LemmaOverloading.noalias]
-y_of [in LemmaOverloading.noalias]
-


-

Inductive Index

-

A

-and6 [in LemmaOverloading.prelude]
-ans [in LemmaOverloading.stmod]
-

D

-defUn_spec [in LemmaOverloading.heaps]
-disj_spec [in LemmaOverloading.finmap]
-

E

-elem [in LemmaOverloading.terms]
-exn [in LemmaOverloading.stmod]
-

F

-fact [in LemmaOverloading.terms]
-

H

-has_spec [in LemmaOverloading.prelude]
-heap [in LemmaOverloading.heaps]
-

M

-Mem_Pred [in LemmaOverloading.rels]
-

O

-or5 [in LemmaOverloading.prelude]
-or6 [in LemmaOverloading.prelude]
-

P

-perm [in LemmaOverloading.perms]
-ptr [in LemmaOverloading.heaps]
-

S

-supp_spec [in LemmaOverloading.finmap]
-

T

-total_spec [in LemmaOverloading.ordtype]
-


-

Section Index

-

A

-AdmissibleClosure [in LemmaOverloading.domains]
-AppChain [in LemmaOverloading.domains]
-Append [in LemmaOverloading.finmap]
-

B

-BasePrograms [in LemmaOverloading.stmod]
-BasicProperties [in LemmaOverloading.domains]
-BasicProperties [in LemmaOverloading.hprop]
-BlockUpdate [in LemmaOverloading.heaps]
-

C

-ChainCompose [in LemmaOverloading.domains]
-ChainConst [in LemmaOverloading.domains]
-ChainId [in LemmaOverloading.domains]
-Chains [in LemmaOverloading.domains]
-Coercions [in LemmaOverloading.prelude]
-Coercions2 [in LemmaOverloading.prelude]
-CondBool [in LemmaOverloading.stsep]
-CondDecide [in LemmaOverloading.stsep]
-CondNat [in LemmaOverloading.stsep]
-CondOption [in LemmaOverloading.stsep]
-CondSeq [in LemmaOverloading.stsep]
-Continuity [in LemmaOverloading.domains]
-CPO.ClassDef [in LemmaOverloading.domains]
-CPO.Exports.Laws [in LemmaOverloading.domains]
-CPO.RawMixin [in LemmaOverloading.domains]
-

D

-DAppChain [in LemmaOverloading.domains]
-Def [in LemmaOverloading.finmap]
-DFunCPO [in LemmaOverloading.domains]
-DFunLattice [in LemmaOverloading.domains]
-DFunPoset [in LemmaOverloading.domains]
-DiagChain [in LemmaOverloading.domains]
-DisjointUnion [in LemmaOverloading.finmap]
-

E

-EqType [in LemmaOverloading.finmap]
-EvalAlloc [in LemmaOverloading.stlog]
-EvalBlockAlloc [in LemmaOverloading.stlog]
-EvalDealloc [in LemmaOverloading.stlog]
-EvalDeallocR [in LemmaOverloading.stlogCTC]
-EvalDeallocR [in LemmaOverloading.stlogR]
-EvalDo [in LemmaOverloading.stlog]
-EvalDoR [in LemmaOverloading.stlogCTC]
-EvalDoR [in LemmaOverloading.stlogR]
-EvalGhost [in LemmaOverloading.stlog]
-EvalGhostR [in LemmaOverloading.stlogR]
-EvalRead [in LemmaOverloading.stlog]
-EvalReadR [in LemmaOverloading.stlogR]
-EvalReturn [in LemmaOverloading.stlog]
-EvalThrow [in LemmaOverloading.stlog]
-EvalWrite [in LemmaOverloading.stlog]
-EvalWriteR [in LemmaOverloading.stlogCTC]
-EvalWriteR [in LemmaOverloading.stlogR]
-

F

-FinTypeOrd [in LemmaOverloading.ordtype]
-FMapInd [in LemmaOverloading.finmap]
-FunCPO [in LemmaOverloading.domains]
-FunLattice [in LemmaOverloading.domains]
-FunPoset [in LemmaOverloading.domains]
-

G

-Ghosts [in LemmaOverloading.stsep]
-

H

-HasSelect [in LemmaOverloading.prelude]
-HeapReflection [in LemmaOverloading.cancel]
-

I

-IdealDef [in LemmaOverloading.domains]
-IdealLattice [in LemmaOverloading.domains]
-IdealPoset [in LemmaOverloading.domains]
-ImageChain [in LemmaOverloading.domains]
-Infimum [in LemmaOverloading.domains]
-

K

-Kleene [in LemmaOverloading.domains]
-

L

-Lat [in LemmaOverloading.domains]
-LatticeCPO [in LemmaOverloading.domains]
-Lattice.ClassDef [in LemmaOverloading.domains]
-Lattice.Exports.Laws [in LemmaOverloading.domains]
-Lattice.RawMixin [in LemmaOverloading.domains]
-Laws [in LemmaOverloading.finmap]
-Lemmas [in LemmaOverloading.ordtype]
-LiftChain [in LemmaOverloading.domains]
-ListMembership [in LemmaOverloading.rels]
-LList [in LemmaOverloading.llistR]
-

M

-Model.Allocation [in LemmaOverloading.stmod]
-Model.Bind [in LemmaOverloading.stmod]
-Model.BlockAllocation [in LemmaOverloading.stmod]
-Model.Consequence [in LemmaOverloading.stmod]
-Model.Deallocation [in LemmaOverloading.stmod]
-Model.Fix [in LemmaOverloading.stmod]
-Model.Read [in LemmaOverloading.stmod]
-Model.Return [in LemmaOverloading.stmod]
-Model.Throw [in LemmaOverloading.stmod]
-Model.Try [in LemmaOverloading.stmod]
-Model.Write [in LemmaOverloading.stmod]
-

N

-NatChain [in LemmaOverloading.domains]
-NatOrd [in LemmaOverloading.ordtype]
-NatPoset [in LemmaOverloading.domains]
-NoAlias.NoAliasSection [in LemmaOverloading.noalias]
-NoAlias2.NoAlias2Section [in LemmaOverloading.noaliasBT]
-NoAlias3.NoAlias3Section [in LemmaOverloading.noaliasBT]
-NullLemmas [in LemmaOverloading.heaps]
-

O

-Ops [in LemmaOverloading.finmap]
-Ordered.ClassDef [in LemmaOverloading.ordtype]
-Ordered.RawMixin [in LemmaOverloading.ordtype]
-

P

-PairCPO [in LemmaOverloading.domains]
-PairLattice [in LemmaOverloading.domains]
-PairPoset [in LemmaOverloading.domains]
-Permutations [in LemmaOverloading.perms]
-Poset.ClassDef [in LemmaOverloading.domains]
-Poset.Exports.Laws [in LemmaOverloading.domains]
-Poset.RawMixin [in LemmaOverloading.domains]
-PredCPO [in LemmaOverloading.domains]
-Predicates [in LemmaOverloading.rels]
-PredLattice [in LemmaOverloading.domains]
-PredPoset [in LemmaOverloading.domains]
-Prefix [in LemmaOverloading.prefix]
-ProdChain [in LemmaOverloading.domains]
-ProdOrd [in LemmaOverloading.ordtype]
-ProjChain [in LemmaOverloading.domains]
-PropCPO [in LemmaOverloading.domains]
-PropLattice [in LemmaOverloading.domains]
-PropPoset [in LemmaOverloading.domains]
-

R

-ReflectConnectives [in LemmaOverloading.prelude]
-RelLaws [in LemmaOverloading.rels]
-RelProperties [in LemmaOverloading.rels]
-Reorder [in LemmaOverloading.prelude]
-

S

-Scan.ScanSection [in LemmaOverloading.noalias]
-Search.SearchSection [in LemmaOverloading.noalias]
-Search2.Search2Section [in LemmaOverloading.noalias]
-SepAlloc [in LemmaOverloading.stsep]
-SepBind [in LemmaOverloading.stsep]
-SepBlockAlloc [in LemmaOverloading.stsep]
-SepConseq [in LemmaOverloading.stsep]
-SepDealloc [in LemmaOverloading.stsep]
-SepFix [in LemmaOverloading.stsep]
-SepFrame [in LemmaOverloading.stsep]
-SepRead [in LemmaOverloading.stsep]
-SepReturn [in LemmaOverloading.stsep]
-SepThrow [in LemmaOverloading.stsep]
-SepTry [in LemmaOverloading.stsep]
-SepWrite [in LemmaOverloading.stsep]
-Simplifications [in LemmaOverloading.rels]
-STDef [in LemmaOverloading.stmod]
-SubCPO [in LemmaOverloading.domains]
-SubLattice [in LemmaOverloading.domains]
-SubMemLaws [in LemmaOverloading.rels]
-SubPoset [in LemmaOverloading.domains]
-

T

-Totality [in LemmaOverloading.ordtype]
-

X

-XFind [in LemmaOverloading.xfind]
-


-

Instance Index

-

E

-empty_struct [in LemmaOverloading.cancelCTC]
-extend_struct [in LemmaOverloading.xfindCTC]
-

F

-ffound_struct1 [in LemmaOverloading.stlogCTC]
-fleft_struct1 [in LemmaOverloading.stlogCTC]
-found [in LemmaOverloading.indomCTC]
-found_struct [in LemmaOverloading.xfindCTC]
-found_right [in LemmaOverloading.indomCTC]
-found_left [in LemmaOverloading.indomCTC]
-found_struct [in LemmaOverloading.stlogCTC]
-fright_struct1 [in LemmaOverloading.stlogCTC]
-

L

-left_struct [in LemmaOverloading.stlogCTC]
-

P

-pts_struct [in LemmaOverloading.cancelCTC]
-

R

-recurse_struct [in LemmaOverloading.xfindCTC]
-right_struct [in LemmaOverloading.stlogCTC]
-

S

-scan_default [in LemmaOverloading.noaliasCTC]
-scan_ptr [in LemmaOverloading.noaliasCTC]
-scan_union [in LemmaOverloading.noaliasCTC]
-search_recurse [in LemmaOverloading.noaliasCTC]
-search_found [in LemmaOverloading.noaliasCTC]
-search2_foundz [in LemmaOverloading.noaliasCTC]
-search2_foundy [in LemmaOverloading.noaliasCTC]
-search2_foundx [in LemmaOverloading.noaliasCTC]
-

U

-union_struct [in LemmaOverloading.cancelCTC]
-

V

-var_struct [in LemmaOverloading.cancelCTC]
-


-

Abbreviation Index

-

C

-cancelD [in LemmaOverloading.cancelD]
-conseq1 [in LemmaOverloading.stsep]
-cont [in LemmaOverloading.stlog]
-cont [in LemmaOverloading.stlogCTC]
-cont [in LemmaOverloading.stlogR]
-CPO.Exports.CPO [in LemmaOverloading.domains]
-CPO.Exports.cpo [in LemmaOverloading.domains]
-CPO.Exports.CPOMixin [in LemmaOverloading.domains]
-CPO.Exports.lim [in LemmaOverloading.domains]
-

D

-dyn [in LemmaOverloading.prelude]
-dynamic [in LemmaOverloading.prelude]
-

F

-fmap [in LemmaOverloading.finmap]
-fmap [in LemmaOverloading.finmap]
-fmap [in LemmaOverloading.finmap]
-fmap [in LemmaOverloading.finmap]
-fmap [in LemmaOverloading.finmap]
-

I

-ideald [in LemmaOverloading.stmod]
-

K

-key [in LemmaOverloading.finmap]
-

L

-Lattice.Exports.Lattice [in LemmaOverloading.domains]
-Lattice.Exports.lattice [in LemmaOverloading.domains]
-Lattice.Exports.LatticeMixin [in LemmaOverloading.domains]
-Lattice.Exports.sup [in LemmaOverloading.domains]
-llist [in LemmaOverloading.llistR]
-

M

-Model.lat [in LemmaOverloading.stmod]
-Model.tp [in LemmaOverloading.stmod]
-

N

-nil [in LemmaOverloading.finmap]
-nil [in LemmaOverloading.finmap]
-nil [in LemmaOverloading.finmap]
-nil [in LemmaOverloading.finmap]
-noaliasR_fwd' [in LemmaOverloading.noalias]
-noaliasR_fwd [in LemmaOverloading.noalias]
-

O

-Ordered.Exports.OrdMixin [in LemmaOverloading.ordtype]
-Ordered.Exports.OrdType [in LemmaOverloading.ordtype]
-Ordered.Exports.ordType [in LemmaOverloading.ordtype]
-

P

-plook' [in LemmaOverloading.terms]
-Poset.Exports.bot [in LemmaOverloading.domains]
-Poset.Exports.Poset [in LemmaOverloading.domains]
-Poset.Exports.poset [in LemmaOverloading.domains]
-Poset.Exports.PosetMixin [in LemmaOverloading.domains]
-post [in LemmaOverloading.stmod]
-pre [in LemmaOverloading.stmod]
-pread' [in LemmaOverloading.terms]
-predCk [in LemmaOverloading.finmap]
-predk [in LemmaOverloading.finmap]
-Pred_Class [in LemmaOverloading.rels]
-

T

-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.domains]
-tp [in LemmaOverloading.stsep]
-

V

-verify [in LemmaOverloading.stsep]
-

X

-xPredC [in LemmaOverloading.rels]
-xPredD [in LemmaOverloading.rels]
-xPredI [in LemmaOverloading.rels]
-xPredT [in LemmaOverloading.rels]
-xPredU [in LemmaOverloading.rels]
-xPred0 [in LemmaOverloading.rels]
-xPred1 [in LemmaOverloading.rels]
-xPreim [in LemmaOverloading.rels]
-


-

Definition Index

-

A

-alloc [in LemmaOverloading.stsep]
-allocb [in LemmaOverloading.stsep]
-allocb_s [in LemmaOverloading.stsep]
-alloc_s [in LemmaOverloading.stsep]
-all_tag [in LemmaOverloading.auto]
-app_chain [in LemmaOverloading.domains]
-

B

-bind [in LemmaOverloading.stsep]
-bind_s [in LemmaOverloading.stsep]
-bnd_throwR [in LemmaOverloading.stlogR]
-bnd_allocbR [in LemmaOverloading.stlogR]
-bnd_allocR [in LemmaOverloading.stlogR]
-bnd_retR [in LemmaOverloading.stlogR]
-

C

-cancel [in LemmaOverloading.terms]
-cancel' [in LemmaOverloading.terms]
-chain_closure [in LemmaOverloading.domains]
-chain_closed [in LemmaOverloading.domains]
-chain_axiom [in LemmaOverloading.domains]
-coerce [in LemmaOverloading.prelude]
-coerce2 [in LemmaOverloading.prelude]
-coherent [in LemmaOverloading.stmod]
-conseq [in LemmaOverloading.stsep]
-const_chain [in LemmaOverloading.domains]
-continuous [in LemmaOverloading.domains]
-CPO.class [in LemmaOverloading.domains]
-CPO.clone [in LemmaOverloading.domains]
-CPO.lim [in LemmaOverloading.domains]
-CPO.pack [in LemmaOverloading.domains]
-CPO.poset [in LemmaOverloading.domains]
-

D

-dapp_chain [in LemmaOverloading.domains]
-dealloc [in LemmaOverloading.stsep]
-dealloc_s [in LemmaOverloading.stsep]
-def [in LemmaOverloading.heaps]
-default_tag [in LemmaOverloading.cancelD]
-defed [in LemmaOverloading.stmod]
-def_strict [in LemmaOverloading.stmod]
-def2 [in LemmaOverloading.heaps]
-dfunCPO [in LemmaOverloading.domains]
-dfunCPOMixin [in LemmaOverloading.domains]
-dfunLattice [in LemmaOverloading.domains]
-dfunLatticeMixin [in LemmaOverloading.domains]
-dfunPoset [in LemmaOverloading.domains]
-dfunPosetMixin [in LemmaOverloading.domains]
-dfun_lim [in LemmaOverloading.domains]
-dfun_sup [in LemmaOverloading.domains]
-dfun_leq [in LemmaOverloading.domains]
-dfun_bot [in LemmaOverloading.domains]
-diag_chain [in LemmaOverloading.domains]
-disj [in LemmaOverloading.finmap]
-dom [in LemmaOverloading.heaps]
-do' [in LemmaOverloading.stsep]
-dyneq_tag [in LemmaOverloading.cancelD]
-

E

-einterp [in LemmaOverloading.terms]
-emp [in LemmaOverloading.hprop]
-empb [in LemmaOverloading.heaps]
-empc [in LemmaOverloading.terms]
-empty [in LemmaOverloading.heaps]
-empty_tag [in LemmaOverloading.cancel]
-eqexn [in LemmaOverloading.stmod]
-EqMem [in LemmaOverloading.rels]
-EqPred [in LemmaOverloading.rels]
-EqPredFun [in LemmaOverloading.rels]
-EqPredType [in LemmaOverloading.rels]
-EqPredType_trans [in LemmaOverloading.rels]
-EqSeq_Class [in LemmaOverloading.rels]
-EqSimplPred [in LemmaOverloading.rels]
-eq_ptr [in LemmaOverloading.heaps]
-eval [in LemmaOverloading.terms]
-eval_fact [in LemmaOverloading.terms]
-exnc [in LemmaOverloading.noaliasCTC]
-exnc [in LemmaOverloading.noalias]
-exnc [in LemmaOverloading.noalias]
-exnc [in LemmaOverloading.noalias]
-exnc [in LemmaOverloading.noaliasBT]
-exnc [in LemmaOverloading.noaliasBT]
-exn_to_nat [in LemmaOverloading.stmod]
-extend_tag [in LemmaOverloading.xfind]
-ex_noalias2 [in LemmaOverloading.noaliasCTC]
-ex_noalias [in LemmaOverloading.noaliasCTC]
-ex_find2 [in LemmaOverloading.noaliasCTC]
-ex_find [in LemmaOverloading.noaliasCTC]
-ex_scan [in LemmaOverloading.noaliasCTC]
-ex_find2 [in LemmaOverloading.noalias]
-ex_find [in LemmaOverloading.noalias]
-ex_scan [in LemmaOverloading.noalias]
-ex_dealloc_bwd [in LemmaOverloading.stlogCTC]
-ex_fwd [in LemmaOverloading.stlogCTC]
-ex_bwd [in LemmaOverloading.stlogCTC]
-ex_val_do [in LemmaOverloading.stlogCTC]
-ex_fwd [in LemmaOverloading.stlogR]
-ex_bwd [in LemmaOverloading.stlogR]
-ex_val_do [in LemmaOverloading.stlogR]
-ex_read [in LemmaOverloading.stlogR]
-ex0 [in LemmaOverloading.cancel]
-ex1 [in LemmaOverloading.cancel]
-ex1 [in LemmaOverloading.xfindCTC]
-ex1 [in LemmaOverloading.indom]
-ex1 [in LemmaOverloading.auto]
-ex1 [in LemmaOverloading.cancelCTC]
-ex1 [in LemmaOverloading.indomCTC]
-ex1' [in LemmaOverloading.cancel]
-ex2 [in LemmaOverloading.cancel]
-ex2 [in LemmaOverloading.indom]
-ex2 [in LemmaOverloading.auto]
-ex2 [in LemmaOverloading.cancelCTC]
-ex2 [in LemmaOverloading.indomCTC]
-ex3 [in LemmaOverloading.auto]
-ex3 [in LemmaOverloading.cancel2]
-ex3 [in LemmaOverloading.cancelD]
-ex4 [in LemmaOverloading.auto]
-ex5 [in LemmaOverloading.auto]
-ex6 [in LemmaOverloading.auto]
-ex7 [in LemmaOverloading.auto]
-ex8 [in LemmaOverloading.auto]
-ex9 [in LemmaOverloading.auto]
-

F

-fcat [in LemmaOverloading.finmap]
-fcat' [in LemmaOverloading.finmap]
-feq [in LemmaOverloading.finmap]
-finMap_for [in LemmaOverloading.finmap]
-fin_ordMixin [in LemmaOverloading.ordtype]
-Fix [in LemmaOverloading.stsep]
-fnd [in LemmaOverloading.finmap]
-fprod [in LemmaOverloading.prelude]
-fr [in LemmaOverloading.stsep]
-free [in LemmaOverloading.heaps]
-fresh [in LemmaOverloading.heaps]
-funCPOMixin [in LemmaOverloading.domains]
-funLatticeMixin [in LemmaOverloading.domains]
-funPosetMixin [in LemmaOverloading.domains]
-fun_lim [in LemmaOverloading.domains]
-fun_sup [in LemmaOverloading.domains]
-fun_leq [in LemmaOverloading.domains]
-fun_bot [in LemmaOverloading.domains]
-

G

-get_highs [in LemmaOverloading.heaps]
-get_lows [in LemmaOverloading.heaps]
-gh [in LemmaOverloading.stsep]
-

H

-has_spec [in LemmaOverloading.stmod]
-hdom [in LemmaOverloading.heaps]
-heap_inv [in LemmaOverloading.cancel2]
-hfree [in LemmaOverloading.terms]
-hfresh [in LemmaOverloading.heaps]
-high [in LemmaOverloading.heaps]
-hlook [in LemmaOverloading.terms]
-hstep [in LemmaOverloading.stlogR]
-hstep_bnd [in LemmaOverloading.stlogR]
-

I

-iA [in LemmaOverloading.prelude]
-idealLatticeMixin [in LemmaOverloading.domains]
-idealPosetMixin [in LemmaOverloading.domains]
-ideal_sup [in LemmaOverloading.domains]
-ideal_sup' [in LemmaOverloading.domains]
-ideal_leq [in LemmaOverloading.domains]
-ideal_bot [in LemmaOverloading.domains]
-If [in LemmaOverloading.stsep]
-image_chain [in LemmaOverloading.domains]
-imp_tag [in LemmaOverloading.auto]
-InE [in LemmaOverloading.rels]
-inf [in LemmaOverloading.domains]
-inj_pair2 [in LemmaOverloading.prelude]
-InMem [in LemmaOverloading.rels]
-ins [in LemmaOverloading.finmap]
-insert [in LemmaOverloading.llistR]
-ins' [in LemmaOverloading.finmap]
-interp [in LemmaOverloading.terms]
-invariant [in LemmaOverloading.xfind]
-invariant [in LemmaOverloading.cancel]
-invariant [in LemmaOverloading.xfindCTC]
-invariant [in LemmaOverloading.indom]
-invariant [in LemmaOverloading.cancelCTC]
-isMem [in LemmaOverloading.rels]
-

J

-jmeq [in LemmaOverloading.prelude]
-jmeq2 [in LemmaOverloading.prelude]
-

K

-key [in LemmaOverloading.finmap]
-kleene_lfp [in LemmaOverloading.domains]
-

L

-latCPO [in LemmaOverloading.domains]
-latCPOMixin [in LemmaOverloading.domains]
-Lattice.class [in LemmaOverloading.domains]
-Lattice.clone [in LemmaOverloading.domains]
-Lattice.pack [in LemmaOverloading.domains]
-Lattice.poset [in LemmaOverloading.domains]
-Lattice.sup [in LemmaOverloading.domains]
-lat_lim [in LemmaOverloading.domains]
-ldom [in LemmaOverloading.heaps]
-left_tag [in LemmaOverloading.indom]
-left_tag [in LemmaOverloading.stlogR]
-lex [in LemmaOverloading.ordtype]
-lfresh [in LemmaOverloading.heaps]
-lift_chain [in LemmaOverloading.domains]
-llist [in LemmaOverloading.llistR]
-lolli [in LemmaOverloading.stsep]
-look [in LemmaOverloading.heaps]
-low [in LemmaOverloading.heaps]
-loweq [in LemmaOverloading.heaps]
-lseg [in LemmaOverloading.llistR]
-lseq [in LemmaOverloading.llistR]
-ltn_ptr [in LemmaOverloading.heaps]
-

M

-Match_seq [in LemmaOverloading.stsep]
-Match_nat [in LemmaOverloading.stsep]
-Match_dec [in LemmaOverloading.stsep]
-Match_opt [in LemmaOverloading.stsep]
-Mem [in LemmaOverloading.rels]
-MemE [in LemmaOverloading.rels]
-Mem_Seq [in LemmaOverloading.rels]
-mkPredType [in LemmaOverloading.rels]
-Model.alloc [in LemmaOverloading.stmod]
-Model.allocb [in LemmaOverloading.stmod]
-Model.allocb_sp [in LemmaOverloading.stmod]
-Model.allocb_s [in LemmaOverloading.stmod]
-Model.alloc_sp [in LemmaOverloading.stmod]
-Model.alloc_s [in LemmaOverloading.stmod]
-Model.bind [in LemmaOverloading.stmod]
-Model.bind_sp [in LemmaOverloading.stmod]
-Model.bind_s [in LemmaOverloading.stmod]
-Model.bind_post [in LemmaOverloading.stmod]
-Model.bind_pre [in LemmaOverloading.stmod]
-Model.conseq [in LemmaOverloading.stmod]
-Model.dealloc [in LemmaOverloading.stmod]
-Model.dealloc_sp [in LemmaOverloading.stmod]
-Model.dealloc_s [in LemmaOverloading.stmod]
-Model.Do [in LemmaOverloading.stmod]
-Model.do_sp [in LemmaOverloading.stmod]
-Model.ffix [in LemmaOverloading.stmod]
-Model.f' [in LemmaOverloading.stmod]
-Model.read [in LemmaOverloading.stmod]
-Model.read_sp [in LemmaOverloading.stmod]
-Model.read_s [in LemmaOverloading.stmod]
-Model.ret [in LemmaOverloading.stmod]
-Model.ret_sp [in LemmaOverloading.stmod]
-Model.ret_s [in LemmaOverloading.stmod]
-Model.throw [in LemmaOverloading.stmod]
-Model.throw_sp [in LemmaOverloading.stmod]
-Model.throw_s [in LemmaOverloading.stmod]
-Model.try [in LemmaOverloading.stmod]
-Model.try_sp [in LemmaOverloading.stmod]
-Model.try_s [in LemmaOverloading.stmod]
-Model.try_post [in LemmaOverloading.stmod]
-Model.try_pre [in LemmaOverloading.stmod]
-Model.write [in LemmaOverloading.stmod]
-Model.write_sp [in LemmaOverloading.stmod]
-Model.write_s [in LemmaOverloading.stmod]
-monotone [in LemmaOverloading.domains]
-

N

-natPosetMixin [in LemmaOverloading.domains]
-nat_chain [in LemmaOverloading.domains]
-nat_ordMixin [in LemmaOverloading.ordtype]
-nat_ptr [in LemmaOverloading.heaps]
-nil [in LemmaOverloading.finmap]
-NoAlias.singleton [in LemmaOverloading.noalias]
-null [in LemmaOverloading.heaps]
-

O

-onth [in LemmaOverloading.prefix]
-Ordered.class [in LemmaOverloading.ordtype]
-Ordered.clone [in LemmaOverloading.ordtype]
-Ordered.eqType [in LemmaOverloading.ordtype]
-Ordered.Exports.ord [in LemmaOverloading.ordtype]
-Ordered.pack [in LemmaOverloading.ordtype]
-ordf [in LemmaOverloading.ordtype]
-ordinal_ordMixin [in LemmaOverloading.ordtype]
-orL_tag [in LemmaOverloading.auto]
-orR_tag [in LemmaOverloading.auto]
-

P

-pack_right [in LemmaOverloading.cancel2]
-pack_found [in LemmaOverloading.cancel2]
-pack01 [in LemmaOverloading.cancel2]
-pack02 [in LemmaOverloading.cancel2]
-pack03 [in LemmaOverloading.cancel2]
-pack04 [in LemmaOverloading.cancel2]
-pack05 [in LemmaOverloading.cancel2]
-pack06 [in LemmaOverloading.cancel2]
-pack07 [in LemmaOverloading.cancel2]
-pack08 [in LemmaOverloading.cancel2]
-pack09 [in LemmaOverloading.cancel2]
-pack10 [in LemmaOverloading.cancel2]
-pairCPOMixin [in LemmaOverloading.domains]
-pairLatticeMixin [in LemmaOverloading.domains]
-pairPosetMixin [in LemmaOverloading.domains]
-pair_lim [in LemmaOverloading.domains]
-pair_sup [in LemmaOverloading.domains]
-pair_leq [in LemmaOverloading.domains]
-pair_bot [in LemmaOverloading.domains]
-pfree [in LemmaOverloading.terms]
-pick [in LemmaOverloading.heaps]
-pL [in LemmaOverloading.prelude]
-plook [in LemmaOverloading.terms]
-plus2 [in LemmaOverloading.heaps]
-Poset.bot [in LemmaOverloading.domains]
-Poset.class [in LemmaOverloading.domains]
-Poset.clone [in LemmaOverloading.domains]
-Poset.leq [in LemmaOverloading.domains]
-Poset.pack [in LemmaOverloading.domains]
-pow [in LemmaOverloading.domains]
-pow_chain [in LemmaOverloading.domains]
-ppts [in LemmaOverloading.hprop]
-pR [in LemmaOverloading.prelude]
-pread [in LemmaOverloading.terms]
-Pred [in LemmaOverloading.rels]
-PredArgType [in LemmaOverloading.rels]
-PredC [in LemmaOverloading.rels]
-predCk [in LemmaOverloading.finmap]
-predCPOMixin [in LemmaOverloading.domains]
-PredD [in LemmaOverloading.rels]
-PredI [in LemmaOverloading.rels]
-predk [in LemmaOverloading.finmap]
-predLatticeMixin [in LemmaOverloading.domains]
-predPosetMixin [in LemmaOverloading.domains]
-PredT [in LemmaOverloading.rels]
-PredU [in LemmaOverloading.rels]
-Pred0 [in LemmaOverloading.rels]
-Pred1 [in LemmaOverloading.rels]
-prefix [in LemmaOverloading.prefix]
-Preim [in LemmaOverloading.rels]
-prod_chain [in LemmaOverloading.domains]
-prod_ordMixin [in LemmaOverloading.ordtype]
-prog [in LemmaOverloading.stmod]
-proj1_chain [in LemmaOverloading.domains]
-proj2_chain [in LemmaOverloading.domains]
-propCPOMixin [in LemmaOverloading.domains]
-propLatticeMixin [in LemmaOverloading.domains]
-propPosetMixin [in LemmaOverloading.domains]
-prop_lim [in LemmaOverloading.domains]
-prop_sup [in LemmaOverloading.domains]
-prop_leq [in LemmaOverloading.domains]
-prop_bot [in LemmaOverloading.domains]
-ptreq [in LemmaOverloading.terms]
-ptrs [in LemmaOverloading.terms]
-ptr_ordMixin [in LemmaOverloading.heaps]
-ptr_offset [in LemmaOverloading.heaps]
-ptr_eqMixin [in LemmaOverloading.heaps]
-pts [in LemmaOverloading.heaps]
-pts_tag [in LemmaOverloading.cancel]
-pts_inv [in LemmaOverloading.cancel2]
-pull [in LemmaOverloading.stlog]
-push [in LemmaOverloading.stlog]
-

R

-rA [in LemmaOverloading.prelude]
-rAC [in LemmaOverloading.prelude]
-rCA [in LemmaOverloading.prelude]
-read [in LemmaOverloading.stsep]
-read_s [in LemmaOverloading.stsep]
-recurse [in LemmaOverloading.auto]
-recurse_tag [in LemmaOverloading.xfind]
-relax [in LemmaOverloading.domains]
-rem [in LemmaOverloading.finmap]
-remove [in LemmaOverloading.llistR]
-repack_Pred [in LemmaOverloading.rels]
-ret [in LemmaOverloading.stsep]
-ret_s [in LemmaOverloading.stsep]
-reverse [in LemmaOverloading.llistR]
-revT [in LemmaOverloading.llistR]
-right_tag [in LemmaOverloading.indom]
-right_tag [in LemmaOverloading.stlogR]
-runs_of [in LemmaOverloading.stmod]
-

S

-scan_axiom [in LemmaOverloading.noaliasCTC]
-Scan.axiom [in LemmaOverloading.noalias]
-Scan.default_tag [in LemmaOverloading.noalias]
-Scan.ptr_tag [in LemmaOverloading.noalias]
-search_them [in LemmaOverloading.noalias]
-Search.axiom [in LemmaOverloading.noalias]
-Search.recurse_tag [in LemmaOverloading.noalias]
-search2_axiom [in LemmaOverloading.noaliasCTC]
-Search2.axiom [in LemmaOverloading.noalias]
-Search2.foundy_tag [in LemmaOverloading.noalias]
-Search2.foundz_tag [in LemmaOverloading.noalias]
-shape_rev [in LemmaOverloading.llistR]
-SimplPred [in LemmaOverloading.rels]
-Simpl_Pred [in LemmaOverloading.rels]
-single [in LemmaOverloading.stmod]
-spec [in LemmaOverloading.stmod]
-star [in LemmaOverloading.hprop]
-stLatticeMixin [in LemmaOverloading.stmod]
-stPosetMixin [in LemmaOverloading.stmod]
-stress [in LemmaOverloading.cancel]
-stress [in LemmaOverloading.cancel2]
-STsep [in LemmaOverloading.stsep]
-st_sup [in LemmaOverloading.stmod]
-st_sup' [in LemmaOverloading.stmod]
-st_bot [in LemmaOverloading.stmod]
-st_bot' [in LemmaOverloading.stmod]
-st_leq [in LemmaOverloading.stmod]
-subCPO [in LemmaOverloading.domains]
-subCPOMixin [in LemmaOverloading.domains]
-subctx [in LemmaOverloading.terms]
-subdom [in LemmaOverloading.heaps]
-subheap [in LemmaOverloading.heaps]
-subLattice [in LemmaOverloading.domains]
-subLatticeMixin [in LemmaOverloading.domains]
-SubMem [in LemmaOverloading.rels]
-subPoset [in LemmaOverloading.domains]
-subPosetMixin [in LemmaOverloading.domains]
-SubPred [in LemmaOverloading.rels]
-SubPredFun [in LemmaOverloading.rels]
-SubPredType [in LemmaOverloading.rels]
-SubPredType_trans [in LemmaOverloading.rels]
-SubSimplPred [in LemmaOverloading.rels]
-subtract [in LemmaOverloading.heaps]
-sub_lim [in LemmaOverloading.domains]
-sub_sup [in LemmaOverloading.domains]
-sub_sup' [in LemmaOverloading.domains]
-sub_leq [in LemmaOverloading.domains]
-sub_bot [in LemmaOverloading.domains]
-supdom [in LemmaOverloading.heaps]
-supp [in LemmaOverloading.finmap]
-sup_closure [in LemmaOverloading.domains]
-sup_closed [in LemmaOverloading.domains]
-swap [in LemmaOverloading.prelude]
-synheap [in LemmaOverloading.terms]
-

T

-tarski_gfp [in LemmaOverloading.domains]
-tarski_lfp [in LemmaOverloading.domains]
-test [in LemmaOverloading.xfind]
-this [in LemmaOverloading.hprop]
-throw [in LemmaOverloading.stsep]
-throw_s [in LemmaOverloading.stsep]
-top [in LemmaOverloading.hprop]
-triggered [in LemmaOverloading.noalias]
-try [in LemmaOverloading.stsep]
-try_s [in LemmaOverloading.stsep]
-try_throwR [in LemmaOverloading.stlogR]
-try_allocbR [in LemmaOverloading.stlogR]
-try_allocR [in LemmaOverloading.stlogR]
-try_retR [in LemmaOverloading.stlogR]
-

U

-union2 [in LemmaOverloading.heaps]
-unit_test [in LemmaOverloading.xfind]
-unit_test [in LemmaOverloading.xfindCTC]
-upd [in LemmaOverloading.heaps]
-update_axiom [in LemmaOverloading.stlogR]
-updi [in LemmaOverloading.heaps]
-

V

-valid [in LemmaOverloading.terms]
-valid_heaps [in LemmaOverloading.terms]
-valid_ptrs [in LemmaOverloading.terms]
-value [in LemmaOverloading.finmap]
-val_throwR [in LemmaOverloading.stlogR]
-val_allocbR [in LemmaOverloading.stlogR]
-val_allocR [in LemmaOverloading.stlogR]
-val_retR [in LemmaOverloading.stlogR]
-vareq [in LemmaOverloading.terms]
-vars [in LemmaOverloading.terms]
-var_tag [in LemmaOverloading.cancel]
-var_tag [in LemmaOverloading.auto]
-verify' [in LemmaOverloading.stsep]
-

W

-without_notation [in LemmaOverloading.noalias]
-write [in LemmaOverloading.stsep]
-write_s [in LemmaOverloading.stsep]
-


-

Record Index

-

A

-abs_heap [in LemmaOverloading.cancel2]
-abs_pts [in LemmaOverloading.cancel2]
-ast [in LemmaOverloading.cancel]
-Ast [in LemmaOverloading.cancelCTC]
-

B

-bnd_form [in LemmaOverloading.stlogR]
-

C

-chain [in LemmaOverloading.domains]
-check [in LemmaOverloading.noalias]
-check [in LemmaOverloading.auto]
-check' [in LemmaOverloading.noalias]
-CPO.class_of [in LemmaOverloading.domains]
-CPO.mixin_of [in LemmaOverloading.domains]
-CPO.type [in LemmaOverloading.domains]
-ctx [in LemmaOverloading.terms]
-

D

-Dyn.dynamic [in LemmaOverloading.prelude]
-

E

-equate_to [in LemmaOverloading.auto]
-

F

-find [in LemmaOverloading.indom]
-find [in LemmaOverloading.auto]
-Find1 [in LemmaOverloading.stlogCTC]
-finMap [in LemmaOverloading.finmap]
-form [in LemmaOverloading.auto]
-form [in LemmaOverloading.cancelD]
-

H

-heapeq [in LemmaOverloading.cancel2]
-

I

-ideal [in LemmaOverloading.domains]
-Indom [in LemmaOverloading.indomCTC]
-

L

-Lattice.class_of [in LemmaOverloading.domains]
-Lattice.mixin_of [in LemmaOverloading.domains]
-Lattice.type [in LemmaOverloading.domains]
-

N

-NoAlias.form [in LemmaOverloading.noalias]
-NoAlias.tagged_ptr [in LemmaOverloading.noalias]
-NoAlias2.form [in LemmaOverloading.noaliasBT]
-NoAlias2.tagged_bool [in LemmaOverloading.noaliasBT]
-NoAlias3.form [in LemmaOverloading.noaliasBT]
-

O

-Ordered.class_of [in LemmaOverloading.ordtype]
-Ordered.mixin_of [in LemmaOverloading.ordtype]
-Ordered.type [in LemmaOverloading.ordtype]
-

P

-pack_heap [in LemmaOverloading.cancel2]
-Poset.class_of [in LemmaOverloading.domains]
-Poset.mixin_of [in LemmaOverloading.domains]
-Poset.type [in LemmaOverloading.domains]
-PredType [in LemmaOverloading.rels]
-

S

-Scan [in LemmaOverloading.noaliasCTC]
-Scan.form [in LemmaOverloading.noalias]
-Scan.tagged_heap [in LemmaOverloading.noalias]
-Search [in LemmaOverloading.noaliasCTC]
-Search.form [in LemmaOverloading.noalias]
-Search.tagged_seq [in LemmaOverloading.noalias]
-Search2 [in LemmaOverloading.noaliasCTC]
-Search2.form [in LemmaOverloading.noalias]
-Search2.tagged_seq [in LemmaOverloading.noalias]
-ST [in LemmaOverloading.stmod]
-

T

-tagged_heap [in LemmaOverloading.cancel]
-tagged_heap [in LemmaOverloading.indom]
-tagged_prop [in LemmaOverloading.auto]
-tagged_seq [in LemmaOverloading.auto]
-tagged_prop [in LemmaOverloading.cancelD]
-tagged_heap [in LemmaOverloading.stlogR]
-trigger [in LemmaOverloading.cancel2]
-try_form [in LemmaOverloading.stlogR]
-

U

-Update [in LemmaOverloading.stlogCTC]
-update [in LemmaOverloading.stlogR]
-

V

-val_form [in LemmaOverloading.stlogR]
-

X

-xfind [in LemmaOverloading.xfind]
-XFind [in LemmaOverloading.xfindCTC]
-xtagged [in LemmaOverloading.xfind]
-


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Global IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(2070 entries)
Notation IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(72 entries)
Module IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(22 entries)
Variable IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(312 entries)
Library IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(28 entries)
Lemma IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(711 entries)
Constructor IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(97 entries)
Axiom IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(2 entries)
Projection IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(80 entries)
Inductive IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(16 entries)
Section IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(137 entries)
Instance IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(24 entries)
Abbreviation IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(69 entries)
Definition IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(436 entries)
Record IndexABCDEFGHIJKLMNOPQRSTUVWXYZ_other(64 entries)
-
- -
- - - diff --git a/docs/toc.html b/docs/toc.html deleted file mode 100644 index e8de8b9..0000000 --- a/docs/toc.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - -
-
- -
- -
- - - diff --git a/meta.yml b/meta.yml index 64ce315..32ad506 100644 --- a/meta.yml +++ b/meta.yml @@ -91,7 +91,7 @@ documentation: |- The Coq source files mentioned in the paper [How to make ad hoc proof automation less ad hoc][lessadhoc], Journal of Functional Programming 23(4), pp. 357-401, are described below. See also the - [coqdoc presentation][coqdoc] of the files. + [coqdoc presentation][coqdoc] of the files from the latest release. ### `indom.v` @@ -153,5 +153,5 @@ documentation: |- [lessadhoc]: https://software.imdea.org/~aleks/papers/lessadhoc/journal.pdf [reflect]: https://software.imdea.org/~aleks/papers/reflect/reflect.pdf - [coqdoc]: https://coq-community.github.io/lemma-overloading/toc.html + [coqdoc]: https://coq-community.github.io/lemma-overloading/docs/latest/coqdoc/toc.html --- diff --git a/resources/config.js b/resources/config.js index aed1ac3..1902b36 100644 --- a/resources/config.js +++ b/resources/config.js @@ -30,6 +30,7 @@ coqdocjs.repl = { ":=": "≔", "-|": "⊣", "*": "×", + "::": "∷", "lhd": "⊲", "rhd": "⊳", "nat": "ℕ", diff --git a/resources/coqdocjs.css b/resources/coqdocjs.css index 046ca8d..959b42e 100644 --- a/resources/coqdocjs.css +++ b/resources/coqdocjs.css @@ -64,10 +64,10 @@ } .proof[show="true"]:before { - content: "\2BC6"; /* arrow down */ + content: "\25BC"; /* arrow down */ } .proof[show="false"]:before { - content: "\2BC8"; /* arrow right */ + content: "\25B6"; /* arrow right */ } .proof[show="false"]:hover { diff --git a/resources/header.html b/resources/header.html index 5b45026..58a399d 100644 --- a/resources/header.html +++ b/resources/header.html @@ -18,7 +18,7 @@ - Project Page + Project Website Index Table of Contents diff --git a/resources/index.html b/resources/index.html index eff50c0..d16f077 100644 --- a/resources/index.html +++ b/resources/index.html @@ -26,7 +26,10 @@

About

Get the code

The current stable release of Lemma Overloading can be downloaded from GitHub.

Documentation

-

The coqdoc presentation of the source files from the latest release can be browsed online.

+

The coqdoc presentations of releases can be browsed online:

+

Other related publications, if any, are listed below.