Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
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
Model registry
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
Iris
stdpp
Merge requests
!34
add telescopic versions of the Coq quantifiers
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
add telescopic versions of the Coq quantifiers
ralf/telescopes
into
master
Overview
24
Commits
3
Pipelines
0
Changes
1
Merged
Ralf Jung
requested to merge
ralf/telescopes
into
master
7 years ago
Overview
22
Commits
3
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
master
version 6
5f3f3e4b
7 years ago
version 5
a9a4074c
7 years ago
version 4
0d61e865
7 years ago
version 3
342ba822
7 years ago
version 2
dfa32bba
7 years ago
version 1
fd1e2eb4
7 years ago
master (base)
and
latest version
latest version
8afca298
3 commits,
7 years ago
version 6
5f3f3e4b
3 commits,
7 years ago
version 5
a9a4074c
3 commits,
7 years ago
version 4
0d61e865
3 commits,
7 years ago
version 3
342ba822
3 commits,
7 years ago
version 2
dfa32bba
2 commits,
7 years ago
version 1
fd1e2eb4
1 commit,
7 years ago
1 file
+
51
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
theories/telescopes.v
+
51
−
0
Options
From
stdpp
Require
Import
base
tactics
.
From
stdpp
Require
Import
base
tactics
.
Set
Default
Proof
Using
"Type"
.
Set
Default
Proof
Using
"Type"
.
+9
Local
Set
Universe
Polymorphism
.
(** Telescopes *)
(** Telescopes *)
Inductive
tele
:
Type
:=
Inductive
tele
:
Type
:=
|
TeleO
:
tele
|
TeleO
:
tele
@@ -141,3 +143,52 @@ Notation "'λ..' x .. y , e" :=
@@ -141,3 +143,52 @@ Notation "'λ..' x .. y , e" :=
(
tele_app
$
tele_bind
(
λ
x
,
.
.
(
tele_app
$
tele_bind
(
λ
y
,
e
))
.
.
))
(
tele_app
$
tele_bind
(
λ
x
,
.
.
(
tele_app
$
tele_bind
(
λ
y
,
e
))
.
.
))
(
at
level
200
,
x
binder
,
y
binder
,
right
associativity
,
(
at
level
200
,
x
binder
,
y
binder
,
right
associativity
,
format
"'[ ' 'λ..' x .. y ']' , e"
)
.
format
"'[ ' 'λ..' x .. y ']' , e"
)
.
(** Telescopic quantifiers *)
Definition
tforall
{
TT
:
tele
}
(
Ψ
:
TT
→
Prop
)
:
Prop
:=
tele_fold
(
λ
(
T
:
Type
)
(
b
:
T
→
Prop
),
∀
x
:
T
,
b
x
)
(
λ
x
,
x
)
(
tele_bind
Ψ
)
.
Arguments
tforall
{
!
_}
_
/.
Definition
texist
{
TT
:
tele
}
(
Ψ
:
TT
→
Prop
)
:
Prop
:=
tele_fold
ex
(
λ
x
,
x
)
(
tele_bind
Ψ
)
.
Arguments
texist
{
!
_}
_
/.
Notation
"'∀..' x .. y , P"
:=
(
tforall
(
λ
x
,
.
.
(
tforall
(
λ
y
,
P
))
.
.
))
(
at
level
200
,
x
binder
,
y
binder
,
right
associativity
,
format
"∀.. x .. y , P"
)
:
stdpp_scope
.
Notation
"'∃..' x .. y , P"
:=
(
texist
(
λ
x
,
.
.
(
texist
(
λ
y
,
P
))
.
.
))
(
at
level
200
,
x
binder
,
y
binder
,
right
associativity
,
format
"∃.. x .. y , P"
)
:
stdpp_scope
.
Lemma
tforall_forall
{
TT
:
tele
}
(
Ψ
:
TT
→
Prop
)
:
(
tforall
Ψ
)
↔
(
∀
x
,
Ψ
x
)
.
Proof
.
symmetry
.
unfold
tforall
.
induction
TT
as
[|
X
ft
IH
]
.
-
simpl
.
split
.
+
done
.
+
intros
?
p
.
rewrite
(
tele_arg_O_inv
p
)
.
done
.
-
simpl
.
split
;
intros
Hx
a
.
+
rewrite
<-
IH
.
done
.
+
destruct
(
tele_arg_S_inv
a
)
as
[
x
[
pf
->
]]
.
revert
pf
.
setoid_rewrite
IH
.
done
.
Qed
.
Lemma
texist_exist
{
TT
:
tele
}
(
Ψ
:
TT
→
Prop
)
:
(
texist
Ψ
)
↔
(
ex
Ψ
)
.
Proof
.
symmetry
.
induction
TT
as
[|
X
ft
IH
]
.
-
simpl
.
split
.
+
intros
[
p
Hp
]
.
rewrite
(
tele_arg_O_inv
p
)
in
Hp
.
done
.
+
intros
.
by
exists
TargO
.
-
simpl
.
split
;
intros
[
p
Hp
];
revert
Hp
.
+
destruct
(
tele_arg_S_inv
p
)
as
[
x
[
pf
->
]]
.
intros
?
.
exists
x
.
rewrite
<-
(
IH
x
(
λ
a
,
Ψ
(
TargS
x
a
)))
.
eauto
.
+
rewrite
<-
(
IH
p
(
λ
a
,
Ψ
(
TargS
p
a
)))
.
intros
[??]
.
eauto
.
Qed
.
(* Teach typeclass resolution how to make progress on these binders *)
Typeclasses
Opaque
tforall
texist
.
Hint
Extern
1
(
tforall
_)
=>
progress
cbn
[
tforall
tele_fold
tele_bind
tele_app
]
:
typeclass_instances
.
Hint
Extern
1
(
texist
_)
=>
progress
cbn
[
texist
tele_fold
tele_bind
tele_app
]
:
typeclass_instances
.
Loading