Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joshua Yanovski
iris-coq
Commits
d9c89c8f
Commit
d9c89c8f
authored
Aug 08, 2016
by
Robbert Krebbers
Browse files
Better fix to avoid relying on the order in which simplify_eq works.
parent
1c5a85f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
algebra/cofe_solver.v
View file @
d9c89c8f
...
...
@@ -106,17 +106,17 @@ Proof. by assert (k = j) by lia; subst; rewrite !coerce_id. Qed.
Lemma
coerce_f
{
k
j
}
(
H
:
S
k
=
S
j
)
(
x
:
A
k
)
:
coerce
H
(
f
k
x
)
=
f
j
(
coerce
(
Nat
.
succ_inj
_
_
H
)
x
).
Proof
.
by
assert
(
k
=
j
)
by
lia
;
subst
;
rewrite
!
coerce_id
.
Qed
.
Lemma
gg_gg
{
k
i
i1
i2
j
}
(
H1
:
k
=
i
+
j
)
(
H2
:
k
=
i2
+
(
i1
+
j
))
(
x
:
A
k
)
:
Lemma
gg_gg
{
k
i
i1
i2
j
}
:
∀
(
H1
:
k
=
i
+
j
)
(
H2
:
k
=
i2
+
(
i1
+
j
))
(
x
:
A
k
)
,
gg
i
(
coerce
H1
x
)
=
gg
i1
(
gg
i2
(
coerce
H2
x
)).
Proof
.
assert
(
i
=
i2
+
i1
)
by
lia
;
move
:
H1
=>
H1
;
simplify_eq
/=
.
revert
j
x
H1
.
intros
?
->
x
.
assert
(
i
=
i2
+
i1
)
as
->
by
lia
.
revert
j
x
H1
.
induction
i2
as
[
|
i2
IH
];
intros
j
X
H1
;
simplify_eq
/=
;
[
by
rewrite
coerce_id
|
by
rewrite
g_coerce
IH
].
Qed
.
Lemma
ff_ff
{
k
i
i1
i2
j
}
(
H1
:
i
+
k
=
j
)
(
H2
:
i1
+
(
i2
+
k
)
=
j
)
(
x
:
A
k
)
:
Lemma
ff_ff
{
k
i
i1
i2
j
}
:
∀
(
H1
:
i
+
k
=
j
)
(
H2
:
i1
+
(
i2
+
k
)
=
j
)
(
x
:
A
k
)
,
coerce
H1
(
ff
i
x
)
=
coerce
H2
(
ff
i1
(
ff
i2
x
)).
Proof
.
assert
(
i
=
i1
+
i2
)
by
lia
;
move
:
H1
=>
H1
;
simplify_eq
/=
.
intros
?
<-
x
.
assert
(
i
=
i1
+
i2
)
as
->
by
lia
.
induction
i1
as
[
|
i1
IH
];
simplify_eq
/=
;
[
by
rewrite
coerce_id
|
by
rewrite
coerce_f
IH
].
Qed
.
...
...
Write
Preview
Supports
Markdown
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