Skip to content
Snippets Groups Projects
Commit d3c2c3e8 authored by Ralf Jung's avatar Ralf Jung
Browse files

more f_equiv work.

parent c41e167b
No related branches found
No related tags found
No related merge requests found
...@@ -236,17 +236,17 @@ Ltac f_equiv := ...@@ -236,17 +236,17 @@ Ltac f_equiv :=
try lazymatch goal with try lazymatch goal with
| |- pointwise_relation _ _ _ _ => intros ? | |- pointwise_relation _ _ _ _ => intros ?
end; end;
(* Normalize away equalities. *)
subst;
(* repeatedly apply congruence lemmas and use the equalities in the hypotheses. *) (* repeatedly apply congruence lemmas and use the equalities in the hypotheses. *)
first [ reflexivity | assumption | symmetry; assumption | first [ reflexivity | assumption | symmetry; assumption |
match goal with match goal with
(* We support matches on both sides, *if* they concern the same (* We support matches on both sides, *if* they concern the same
or provably equal variables. variable.
TODO: We should support different variables, provided that we can TODO: We should support different variables, provided that we can
derive contradictions for the off-diagonal cases. *) derive contradictions for the off-diagonal cases. *)
| |- ?R (match ?x with _ => _ end) (match ?x with _ => _ end) => | |- ?R (match ?x with _ => _ end) (match ?x with _ => _ end) =>
destruct x; f_equiv destruct x; f_equiv
| |- ?R (match ?x with _ => _ end) (match ?y with _ => _ end) =>
subst y; f_equiv
(* First assume that the arguments need the same relation as the result *) (* First assume that the arguments need the same relation as the result *)
| |- ?R (?f ?x) (?f _) => | |- ?R (?f ?x) (?f _) =>
let H := fresh "Proper" in let H := fresh "Proper" in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment