Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaëtan Gilbert
Iris
Commits
5c959e86
Commit
5c959e86
authored
6 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
rename Declare Reduction to match the tactics
parent
67183a36
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/proofmode/reduction.v
+14
-18
14 additions, 18 deletions
theories/proofmode/reduction.v
with
14 additions
and
18 deletions
theories/proofmode/reduction.v
+
14
−
18
View file @
5c959e86
From
iris
.
bi
Require
Import
bi
telescopes
.
From
iris
.
bi
Require
Import
bi
telescopes
.
From
iris
.
proofmode
Require
Import
base
environments
.
From
iris
.
proofmode
Require
Import
base
environments
.
Declare
Reduction
pm_cbv
:=
cbv
[
(** Called by all tactics to perform computation to lookup items in the
context. We avoid reducing anything user-visible here to make sure we
do not reduce e.g. before unification happens in [iApply].*)
Declare
Reduction
pm_eval
:=
cbv
[
(* base *)
(* base *)
base
.
beq
base
.
Pos_succ
base
.
ascii_beq
base
.
string_beq
base
.
positive_beq
base
.
ident_beq
base
.
beq
base
.
Pos_succ
base
.
ascii_beq
base
.
string_beq
base
.
positive_beq
base
.
ident_beq
(* environments *)
(* environments *)
...
@@ -14,28 +17,21 @@ Declare Reduction pm_cbv := cbv [
...
@@ -14,28 +17,21 @@ Declare Reduction pm_cbv := cbv [
(* PM option combinators *)
(* PM option combinators *)
pm_option_bind
pm_from_option
pm_option_fun
pm_option_bind
pm_from_option
pm_option_fun
]
.
]
.
(* Some things should only be unfolded according to cbn rules, when
certain arguments are constructors. This is because they can appear in
the user side of proofs as well. *)
Declare
Reduction
pm_cbn
:=
cbn
[
(* telescope combinators *)
tele_fold
tele_bind
tele_app
(* BI connectives *)
bi_persistently_if
bi_affinely_if
bi_intuitionistically_if
bi_wandM
sbi_laterN
bi_tforall
bi_texist
]
.
(** Called by all tactics to perform computation to lookup items in the
context. We avoid reducing anything user-visible here to make sure we
do not reduce e.g. before unification happens in [iApply].*)
Ltac
pm_eval
t
:=
Ltac
pm_eval
t
:=
eval
pm_
cbv
in
t
.
eval
pm_
eval
in
t
.
Ltac
pm_reduce
:=
Ltac
pm_reduce
:=
match
goal
with
|
-
?u
=>
let
v
:=
pm_eval
u
in
change
v
end
.
match
goal
with
|
-
?u
=>
let
v
:=
pm_eval
u
in
change
v
end
.
Ltac
pm_reflexivity
:=
pm_reduce
;
exact
eq_refl
.
Ltac
pm_reflexivity
:=
pm_reduce
;
exact
eq_refl
.
(** Called by many tactics for redexes that are created by instantiation.
(** Called by many tactics for redexes that are created by instantiation.
This cannot create any envs redexes so we just do the cbn part. *)
This cannot create any envs redexes so we just do the cbn part. *)
Declare
Reduction
pm_prettify
:=
cbn
[
(* telescope combinators *)
tele_fold
tele_bind
tele_app
(* BI connectives *)
bi_persistently_if
bi_affinely_if
bi_intuitionistically_if
bi_wandM
sbi_laterN
bi_tforall
bi_texist
]
.
Ltac
pm_prettify
:=
Ltac
pm_prettify
:=
match
goal
with
|
-
?u
=>
let
v
:=
eval
pm_
cbn
in
u
in
change
v
end
.
match
goal
with
|
-
?u
=>
let
v
:=
eval
pm_
prettify
in
u
in
change
v
end
.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment