Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Iris
stdpp
Commits
1de37fd6
Commit
1de37fd6
authored
Mar 15, 2017
by
Ralf Jung
Browse files
improve inv_vec to force the length of the vector
parent
cb021200
Changes
1
Hide whitespace changes
Inline
Sidebyside
Showing
1 changed file
with
8 additions
and
5 deletions
+8
5
theories/vector.v
theories/vector.v
+8
5
No files found.
theories/vector.v
View file @
1de37fd6
...
...
@@ 189,11 +189,14 @@ Defined.
Ltac
inv_vec
v
:
=
let
T
:
=
type
of
v
in
match
eval
hnf
in
T
with

vec
_
0
=>
revert
dependent
v
;
match
goal
with

∀
v
,
@
?P
v
=>
apply
(
vec_0_inv
P
)
end

vec
_
(
S
?n
)
=>
revert
dependent
v
;
match
goal
with

∀
v
,
@
?P
v
=>
apply
(
vec_S_inv
P
)
end
;
try
(
let
x
:
=
fresh
"x"
in
intros
x
v
;
inv_vec
v
;
revert
x
)

vec
_
?n
=>
match
eval
hnf
in
n
with

0
=>
revert
dependent
v
;
match
goal
with

∀
v
,
@
?P
v
=>
apply
(
vec_0_inv
P
)
end

S
?n
=>
revert
dependent
v
;
match
goal
with

∀
v
,
@
?P
v
=>
apply
(
vec_S_inv
P
)
end
;
(* Try going on recursively. *)
try
(
let
x
:
=
fresh
"x"
in
intros
x
v
;
inv_vec
v
;
revert
x
)
end
end
.
(** The following tactic performs case analysis on all hypotheses of the shape
...
...
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