Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
RefinedC
Commits
df893f20
Commit
df893f20
authored
Nov 19, 2021
by
Michael Sammler
Browse files
cleanup
parent
bfd56995
Pipeline
#57415
canceled with stage
in 2 minutes and 26 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Sidebyside
theories/lithium/base.v
View file @
df893f20
...
...
@@ 63,20 +63,22 @@ Ltac get_head e :=

_
=>
constr
:
(
e
)
end
.
(** A version of done that
does not ex
pl
o
it
False and contradi
ctions. *)
Ltac
done_no_fals
e
:
=
(** A version of
fast_
done that
s
plit
s conjun
ctions. *)
Ltac
splitting_fast_don
e
:
=
solve
[
repeat
first
[
fast_done
(*  solve [trivial] *)
(* All the tactics below will introduce themselves anyway, or make no sense
for goals of product type. So this is a good place for us to do it. *)

progress
intros
(*  solve [symmetry; trivial] *)
(*  solve [apply not_symmetry; trivial] *)

split
]
].
Ltac
assert_is_trivial
P
:
=
assert_succeeds
(
assert
(
P
)
as
_;
[
splitting_fast_done
]).
Ltac
assert_is_not_trivial
P
:
=
assert_fails
(
assert
(
P
)
as
_;
[
splitting_fast_done
]).
(* Checks that a term is closed using a trick by Jason Gross. *)
Ltac
check_closed
t
:
=
assert_succeeds
(
...
...
theories/lithium/infrastructure.v
View file @
df893f20
...
...
@@ 22,12 +22,6 @@ Class AssumeInj {A B} (R : relation A) (S : relation B) (f : A → B) : Prop :=
Global
Instance
assume_inj_inj
A
B
R
S
(
f
:
A
→
B
)
`
{!
Inj
R
S
f
}
:
AssumeInj
R
S
f
.
Proof
.
done
.
Qed
.
(** * Checking if a hyp exists *)
Ltac
check_hyp_not_exists
P
:
=
assert_fails
(
assert
(
P
)
as
_;
[
fast_done
]).
Class
CheckHypNotExists
(
P
:
Prop
)
:
Prop
:
=
check_hyp_not_exists
:
True
.
Global
Hint
Extern
1
(
CheckHypNotExists
?P
)
=>
(
check_hyp_not_exists
P
;
change
True
;
fast_done
)
:
typeclass_instances
.
(** * Checking if a hyp in the context
The implementation can be found in interpreter.v *)
Class
CheckOwnInContext
{
Σ
}
(
P
:
iProp
Σ
)
:
Prop
:
=
{
check_own_in_context
:
True
}.
...
...
theories/lithium/interpreter.v
View file @
df893f20
...
...
@@ 593,7 +593,7 @@ Ltac liImpl :=
lazymatch
type
of
P
with

Prop
=>
first
[
(* first check if the hyp is trivial *)
assert_
succeeds
(
assert
(
P
)
as
_;
[
done_no_false
])
;
intros
_
assert_
is_trivial
P
;
intros
_

progress
normalize_goal_impl
;
simpl

...
...
@@ 613,7 +613,7 @@ Ltac liImpl :=

_
=
_
=>
check_injection_tac
;
let
Hi
:
=
fresh
"Hi"
in
move
=>
Hi
;
injection
Hi
;
clear
Hi

_
=>
check_hyp_not_exists
P
;
intros
?
;
subst

_
=>
assert_is_not_trivial
P
;
intros
?
;
subst

_
=>
move
=>
_
end
end
...
...
@@ 724,7 +724,7 @@ Ltac liSideCond :=
lazymatch
P
with

shelve_hint
_
=>
split
;
[
unfold
shelve_hint
;
li_shelve_sidecond
]

_
=>
first
[
split
;
[
done_no_fals
e
]

split
;
[
splitting_fast_don
e
]

progress
normalize_goal_and

lazymatch
P
with

context
[
protected
_
]
=>
first
[
...
...
theories/lithium/solvers.v
View file @
df893f20
...
...
@@ 65,20 +65,22 @@ Proof. naive_solver. Qed.
Ltac
normalize_and_simpl_goal_step
:
=
first
[
progress
normalize_goal
;
simpl

lazymatch
goal
with


∃
_
,
_
=>
fail
1
"normalize_and_simpl_goal stop in exist"
end

lazymatch
goal
with


_
∧
_
=>
idtac

_
=>
refine
(
intro_and_True
_
_
)
end
;
refine
(
apply_simpl_and
_
_
_
_
_
)
;
lazymatch
goal
with


true
=
true
→
_
=>
move
=>
_;
split_and
?
end

lazymatch
goal
with
progress
normalize_goal
;
simpl

lazymatch
goal
with


∃
_
,
_
=>
fail
1
"normalize_and_simpl_goal stop in exist"
end

lazymatch
goal
with


_
∧
_
=>
idtac

_
=>
refine
(
intro_and_True
_
_
)
end
;
refine
(
apply_simpl_and
_
_
_
_
_
)
;
lazymatch
goal
with


true
=
true
→
_
=>
move
=>
_;
split_and
?
end

lazymatch
goal
with
(* relying on the fact that unification variables cannot contain
dependent variables to distinguish between dependent and non dependent forall *)


?P
>
?Q
=>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment