Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Paolo G. Giarrusso
iris
Commits
171768c4
Commit
171768c4
authored
3 years ago
by
Gregory Malecha
Committed by
Ralf Jung
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Pick and name universes for [bi_tforall] and [bi_texist].
This requires the [fixpoint] version of [tele_arg].
parent
9d04874f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
iris/bi/bi.v
+6
-0
6 additions, 0 deletions
iris/bi/bi.v
iris/bi/interface.v
+10
-3
10 additions, 3 deletions
iris/bi/interface.v
iris/bi/telescopes.v
+5
-5
5 additions, 5 deletions
iris/bi/telescopes.v
tests/telescopes.v
+4
-0
4 additions, 0 deletions
tests/telescopes.v
with
25 additions
and
8 deletions
iris/bi/bi.v
+
6
−
0
View file @
171768c4
...
...
@@ -3,6 +3,12 @@ From iris.bi Require Export updates internal_eq plainly embedding.
From
iris
.
prelude
Require
Import
options
.
Module
Import
bi
.
(** Get universes into the desired scope *)
Universe
Logic
.
Constraint
Logic
=
bi
.
interface
.
universes
.
Logic
.
Universe
Quant
.
Constraint
Quant
=
bi
.
interface
.
universes
.
Quant
.
(** Get other symbols into the desired scope *)
Export
bi
.
interface
.
bi
.
Export
bi
.
derived_laws
.
bi
.
Export
bi
.
derived_laws_later
.
bi
.
...
...
This diff is collapsed.
Click to expand it.
iris/bi/interface.v
+
10
−
3
View file @
171768c4
...
...
@@ -164,8 +164,15 @@ Section bi_mixin.
Qed
.
End
bi_mixin
.
Module
Import
universes
.
(** The universe of the logic (PROP). *)
Universe
Logic
.
(** The universe of quantifiers in the logic. *)
Universe
Quant
.
End
universes
.
Structure
bi
:=
Bi
{
bi_car
:>
Type
;
bi_car
:>
Type
@
{
Logic
}
;
bi_dist
:
Dist
bi_car
;
bi_equiv
:
Equiv
bi_car
;
bi_entails
:
bi_car
→
bi_car
→
Prop
;
...
...
@@ -174,8 +181,8 @@ Structure bi := Bi {
bi_and
:
bi_car
→
bi_car
→
bi_car
;
bi_or
:
bi_car
→
bi_car
→
bi_car
;
bi_impl
:
bi_car
→
bi_car
→
bi_car
;
bi_forall
:
∀
A
,
(
A
→
bi_car
)
→
bi_car
;
bi_exist
:
∀
A
,
(
A
→
bi_car
)
→
bi_car
;
bi_forall
:
∀
A
:
Type
@
{
Quant
}
,
(
A
→
bi_car
)
→
bi_car
;
bi_exist
:
∀
A
:
Type
@
{
Quant
}
,
(
A
→
bi_car
)
→
bi_car
;
bi_sep
:
bi_car
→
bi_car
→
bi_car
;
bi_wand
:
bi_car
→
bi_car
→
bi_car
;
bi_persistently
:
bi_car
→
bi_car
;
...
...
This diff is collapsed.
Click to expand it.
iris/bi/telescopes.v
+
5
−
5
View file @
171768c4
...
...
@@ -6,10 +6,10 @@ Import bi.
(* This cannot import the proofmode because it is imported by the proofmode! *)
(** Telescopic quantifiers *)
Definition
bi_texist
{
PROP
:
bi
}
{
TT
:
tele
}
(
Ψ
:
TT
→
PROP
)
:
PROP
:=
Definition
bi_texist
{
PROP
:
bi
}
{
TT
:
tele
@
{
Quant
}
}
(
Ψ
:
TT
→
PROP
)
:
PROP
:=
tele_fold
(
@
bi_exist
PROP
)
(
λ
x
,
x
)
(
tele_bind
Ψ
)
.
Global
Arguments
bi_texist
{_
!
_}
_
/.
Definition
bi_tforall
{
PROP
:
bi
}
{
TT
:
tele
}
(
Ψ
:
TT
→
PROP
)
:
PROP
:=
Definition
bi_tforall
{
PROP
:
bi
}
{
TT
:
tele
@
{
Quant
}
}
(
Ψ
:
TT
→
PROP
)
:
PROP
:=
tele_fold
(
@
bi_forall
PROP
)
(
λ
x
,
x
)
(
tele_bind
Ψ
)
.
Global
Arguments
bi_tforall
{_
!
_}
_
/.
...
...
@@ -21,7 +21,7 @@ Notation "'∀..' x .. y , P" := (bi_tforall (λ x, .. (bi_tforall (λ y, P)) ..
format
"∀.. x .. y , P"
)
:
bi_scope
.
Section
telescopes
.
Context
{
PROP
:
bi
}
{
TT
:
tele
}
.
Context
{
PROP
:
bi
}
{
TT
:
tele
@
{
Quant
}
}
.
Implicit
Types
Ψ
:
TT
→
PROP
.
Lemma
bi_tforall_forall
Ψ
:
bi_tforall
Ψ
⊣⊢
bi_forall
Ψ
.
...
...
@@ -34,7 +34,7 @@ Section telescopes.
-
simpl
.
apply
(
anti_symm
_);
apply
forall_intro
;
intros
a
.
+
rewrite
/=
-
IH
.
apply
forall_intro
;
intros
p
.
by
rewrite
(
forall_elim
(
TargS
a
p
))
.
+
move
/
tele_arg_inv
:
(
a
)
=>
[
x
[
pf
->
]]
{
a
}
/=.
+
destruct
a
=>
/=.
setoid_rewrite
<-
IH
.
rewrite
2
!
forall_elim
.
done
.
Qed
.
...
...
@@ -47,7 +47,7 @@ Section telescopes.
rewrite
(
tele_arg_O_inv
p
)
//.
+
by
rewrite
-
(
exist_intro
TargO
)
.
-
simpl
.
apply
(
anti_symm
_);
apply
exist_elim
.
+
intros
p
.
move
/
tele_arg_inv
:
(
p
)
=>
[
x
[
pf
->
]]
{
p
}
/=.
+
intros
p
.
destruct
p
=>
/=.
by
rewrite
-
exist_intro
-
IH
-
exist_intro
.
+
intros
x
.
rewrite
/=
-
IH
.
apply
exist_elim
;
intros
p
.
...
...
This diff is collapsed.
Click to expand it.
tests/telescopes.v
+
4
−
0
View file @
171768c4
...
...
@@ -176,3 +176,7 @@ Restart.
Abort
.
End
telescopes_and_tactics
.
Lemma
tele_universe
{
PROP
:
bi
}
(
TT
:
tele
@
{
bi
.
Quant
})
(
P
:
TT
→
PROP
)
:
bi_texist
P
⊣⊢
bi_exist
P
.
Proof
.
apply
bi_texist_exist
.
Qed
.
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