Commit 84fe6493 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Bump stdpp.

parent 672d60be
Pipeline #5514 failed with stages
in 6 minutes and 8 seconds
...@@ -12,5 +12,5 @@ remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris"] ...@@ -12,5 +12,5 @@ remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris"]
depends: [ depends: [
"coq" { >= "8.6.1" & < "8.8~" } "coq" { >= "8.6.1" & < "8.8~" }
"coq-mathcomp-ssreflect" { (>= "1.6.1" & < "1.7~") | (= "dev") } "coq-mathcomp-ssreflect" { (>= "1.6.1" & < "1.7~") | (= "dev") }
"coq-stdpp" { (= "dev.2017-11-20.0") | (= "dev") } "coq-stdpp" { (= "dev.2017-11-22.1") | (= "dev") }
] ]
...@@ -55,7 +55,7 @@ Definition envs_lookup_delete {M} (i : ident) ...@@ -55,7 +55,7 @@ Definition envs_lookup_delete {M} (i : ident)
let (Γp,Γs) := Δ in let (Γp,Γs) := Δ in
match env_lookup_delete i Γp with match env_lookup_delete i Γp with
| Some (P,Γp') => Some (true, P, Envs Γp' Γs) | Some (P,Γp') => Some (true, P, Envs Γp' Γs)
| None => '(P,Γs') env_lookup_delete i Γs; Some (false, P, Envs Γp Γs') | None => ''(P,Γs') env_lookup_delete i Γs; Some (false, P, Envs Γp Γs')
end. end.
Fixpoint envs_lookup_delete_list {M} (js : list ident) (remove_persistent : bool) Fixpoint envs_lookup_delete_list {M} (js : list ident) (remove_persistent : bool)
...@@ -63,9 +63,9 @@ Fixpoint envs_lookup_delete_list {M} (js : list ident) (remove_persistent : bool ...@@ -63,9 +63,9 @@ Fixpoint envs_lookup_delete_list {M} (js : list ident) (remove_persistent : bool
match js with match js with
| [] => Some (true, [], Δ) | [] => Some (true, [], Δ)
| j :: js => | j :: js =>
'(p,P,Δ') envs_lookup_delete j Δ; ''(p,P,Δ') envs_lookup_delete j Δ;
let Δ' := if p then (if remove_persistent then Δ' else Δ) else Δ' in let Δ' := if p : bool then (if remove_persistent then Δ' else Δ) else Δ' in
'(q,Hs,Δ'') envs_lookup_delete_list js remove_persistent Δ'; ''(q,Hs,Δ'') envs_lookup_delete_list js remove_persistent Δ';
Some (p && q, P :: Hs, Δ'') Some (p && q, P :: Hs, Δ'')
end. end.
...@@ -109,15 +109,15 @@ Fixpoint envs_split_go {M} ...@@ -109,15 +109,15 @@ Fixpoint envs_split_go {M}
match js with match js with
| [] => Some (Δ1, Δ2) | [] => Some (Δ1, Δ2)
| j :: js => | j :: js =>
'(p,P,Δ1') envs_lookup_delete j Δ1; ''(p,P,Δ1') envs_lookup_delete j Δ1;
if p then envs_split_go js Δ1 Δ2 else if p : bool then envs_split_go js Δ1 Δ2 else
envs_split_go js Δ1' (envs_snoc Δ2 false j P) envs_split_go js Δ1' (envs_snoc Δ2 false j P)
end. end.
(* if [d = Right] then [result = (remaining hyps, hyps named js)] and (* if [d = Right] then [result = (remaining hyps, hyps named js)] and
if [d = Left] then [result = (hyps named js, remaining hyps)] *) if [d = Left] then [result = (hyps named js, remaining hyps)] *)
Definition envs_split {M} (d : direction) Definition envs_split {M} (d : direction)
(js : list ident) (Δ : envs M) : option (envs M * envs M) := (js : list ident) (Δ : envs M) : option (envs M * envs M) :=
'(Δ1,Δ2) envs_split_go js Δ (envs_clear_spatial Δ); ''(Δ1,Δ2) envs_split_go js Δ (envs_clear_spatial Δ);
if d is Right then Some (Δ1,Δ2) else Some (Δ2,Δ1). if d is Right then Some (Δ1,Δ2) else Some (Δ2,Δ1).
(* Coq versions of the tactics *) (* Coq versions of the tactics *)
...@@ -297,7 +297,7 @@ Proof. intros. by rewrite envs_lookup_sound// envs_replace_sound'//. Qed. ...@@ -297,7 +297,7 @@ Proof. intros. by rewrite envs_lookup_sound// envs_replace_sound'//. Qed.
Lemma envs_lookup_envs_clear_spatial Δ j : Lemma envs_lookup_envs_clear_spatial Δ j :
envs_lookup j (envs_clear_spatial Δ) envs_lookup j (envs_clear_spatial Δ)
= '(p,P) envs_lookup j Δ; if p then Some (p,P) else None. = ''(p,P) envs_lookup j Δ; if p : bool then Some (p,P) else None.
Proof. Proof.
rewrite /envs_lookup /envs_clear_spatial. rewrite /envs_lookup /envs_clear_spatial.
destruct Δ as [Γp Γs]; simpl; destruct (Γp !! j) eqn:?; simplify_eq/=; auto. destruct Δ as [Γp Γs]; simpl; destruct (Γp !! j) eqn:?; simplify_eq/=; auto.
...@@ -640,7 +640,7 @@ Qed. ...@@ -640,7 +640,7 @@ Qed.
Lemma tac_specialize_assert Δ Δ' Δ1 Δ2' j q neg js R P1 P2 P1' Q : Lemma tac_specialize_assert Δ Δ' Δ1 Δ2' j q neg js R P1 P2 P1' Q :
envs_lookup_delete j Δ = Some (q, R, Δ') envs_lookup_delete j Δ = Some (q, R, Δ')
IntoWand false R P1 P2 ElimModal P1' P1 Q Q IntoWand false R P1 P2 ElimModal P1' P1 Q Q
('(Δ1,Δ2) envs_split (if neg is true then Right else Left) js Δ'; (''(Δ1,Δ2) envs_split (if neg is true then Right else Left) js Δ';
Δ2' envs_app false (Esnoc Enil j P2) Δ2; Δ2' envs_app false (Esnoc Enil j P2) Δ2;
Some (Δ1,Δ2')) = Some (Δ1,Δ2') (* does not preserve position of [j] *) Some (Δ1,Δ2')) = Some (Δ1,Δ2') (* does not preserve position of [j] *)
envs_entails Δ1 P1' envs_entails Δ2' Q envs_entails Δ Q. envs_entails Δ1 P1' envs_entails Δ2' Q envs_entails Δ Q.
......
...@@ -17,11 +17,9 @@ Fixpoint env_lookup {A} (i : ident) (Γ : env A) : option A := ...@@ -17,11 +17,9 @@ Fixpoint env_lookup {A} (i : ident) (Γ : env A) : option A :=
end. end.
Module env_notations. Module env_notations.
Notation "y ≫= f" := (match y with Some x => f x | None => None end).
Notation "x ← y ; z" := (match y with Some x => z | None => None end). Notation "x ← y ; z" := (match y with Some x => z | None => None end).
Notation "' ( x1 , x2 ) ← y ; z" := Notation "' x1 .. xn ← y ; z" := (y = (λ x1, .. (λ xn, z) .. )).
(match y with Some (x1,x2) => z | None => None end).
Notation "' ( x1 , x2 , x3 ) ← y ; z" :=
(match y with Some (x1,x2,x3) => z | None => None end).
Notation "Γ !! j" := (env_lookup j Γ). Notation "Γ !! j" := (env_lookup j Γ).
End env_notations. End env_notations.
Import env_notations. Import env_notations.
...@@ -68,7 +66,7 @@ Fixpoint env_lookup_delete {A} (i : ident) (Γ : env A) : option (A * env A) := ...@@ -68,7 +66,7 @@ Fixpoint env_lookup_delete {A} (i : ident) (Γ : env A) : option (A * env A) :=
| Enil => None | Enil => None
| Esnoc Γ j x => | Esnoc Γ j x =>
if ident_beq i j then Some (x,Γ) if ident_beq i j then Some (x,Γ)
else '(y,Γ') env_lookup_delete i Γ; Some (y, Esnoc Γ' j x) else ''(y,Γ') env_lookup_delete i Γ; Some (y, Esnoc Γ' j x)
end. end.
Inductive env_Forall2 {A B} (P : A B Prop) : env A env B Prop := Inductive env_Forall2 {A B} (P : A B Prop) : env A env B Prop :=
......
...@@ -39,9 +39,9 @@ Fixpoint close_list (k : stack) ...@@ -39,9 +39,9 @@ Fixpoint close_list (k : stack)
| SList :: k => Some (SPat (IList (ps :: pss)) :: k) | SList :: k => Some (SPat (IList (ps :: pss)) :: k)
| SPat pat :: k => close_list k (pat :: ps) pss | SPat pat :: k => close_list k (pat :: ps) pss
| SAlwaysElim :: k => | SAlwaysElim :: k =>
'(p,ps) maybe2 (::) ps; close_list k (IAlwaysElim p :: ps) pss ''(p,ps) maybe2 (::) ps; close_list k (IAlwaysElim p :: ps) pss
| SModalElim :: k => | SModalElim :: k =>
'(p,ps) maybe2 (::) ps; close_list k (IModalElim p :: ps) pss ''(p,ps) maybe2 (::) ps; close_list k (IModalElim p :: ps) pss
| SBar :: k => close_list k [] (ps :: pss) | SBar :: k => close_list k [] (ps :: pss)
| _ => None | _ => None
end. end.
...@@ -114,8 +114,8 @@ Fixpoint close (k : stack) (ps : list intro_pat) : option (list intro_pat) := ...@@ -114,8 +114,8 @@ Fixpoint close (k : stack) (ps : list intro_pat) : option (list intro_pat) :=
match k with match k with
| [] => Some ps | [] => Some ps
| SPat pat :: k => close k (pat :: ps) | SPat pat :: k => close k (pat :: ps)
| SAlwaysElim :: k => '(p,ps) maybe2 (::) ps; close k (IAlwaysElim p :: ps) | SAlwaysElim :: k => ''(p,ps) maybe2 (::) ps; close k (IAlwaysElim p :: ps)
| SModalElim :: k => '(p,ps) maybe2 (::) ps; close k (IModalElim p :: ps) | SModalElim :: k => ''(p,ps) maybe2 (::) ps; close k (IModalElim p :: ps)
| _ => None | _ => None
end. end.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment