@@ -684,16 +684,16 @@ Section SCT.
684684 intros n k'' g b f. intros H.
685685 intros gz [x rx] y.
686686 specialize (H (x, rx) y rx y). simpl.
687- rewrite H. clear H.
687+ rw H. clear H.
688688 split.
689689 + intros [xlt relr].
690- intros f'. depelim f'. rewrite gz. apply xlt. apply relr.
690+ intros f'. depelim f'. rw gz. apply xlt. apply relr.
691691 + intros Hf. split.
692- specialize (Hf fz). rewrite gz in Hf. apply Hf.
692+ specialize (Hf fz). rw gz in Hf. apply Hf.
693693 intros f'. apply Hf.
694694 + intros n k'' g gf x y.
695695 split. intros [].
696- intros f. specialize (f fz). now rewrite gf in f.
696+ intros f. specialize (f fz). now rw gf in f.
697697 Qed .
698698
699699 Lemma graph_relation_spec {k : nat} (G : graph k) :
@@ -706,7 +706,7 @@ Section SCT.
706706 | None => False
707707 end ).
708708 Proof .
709- unfold graph_relation. intros x y. now rewrite k_related_spec.
709+ unfold graph_relation. intros x y. now rw k_related_spec.
710710 Qed .
711711
712712 Definition approximates {k} (G : graph k) (R : relation (k_tuple_type k)) :=
@@ -732,13 +732,13 @@ Section SCT.
732732 approximates (G0 ⋅ G1) (compose_rel R0 R1).
733733 Proof .
734734 unfold approximates. intros ag0 ag1.
735- intros x z [y [Hxy Hyz]]. rewrite graph_relation_spec.
735+ intros x z [y [Hxy Hyz]]. rw graph_relation_spec.
736736 intros f. specialize (ag0 _ _ Hxy). specialize (ag1 _ _ Hyz).
737737 rewrite -> graph_relation_spec in ag0, ag1. specialize (ag0 f).
738- funelim (graph_compose G0 G1 f). now rewrite Heq in ag0.
739- rewrite Heq0 in ag0. specialize (ag1 arg1). rewrite Heq in ag1.
738+ funelim (graph_compose G0 G1 f). now rw Heq in ag0.
739+ rw Heq0 in ag0. specialize (ag1 arg1). rw Heq in ag1.
740740 destruct weight, weight'; simpl; try lia.
741- specialize (ag1 arg1). now rewrite Heq in ag1.
741+ specialize (ag1 arg1). now rw Heq in ag1.
742742 Qed .
743743
744744 Equations fin_union {A n} (f : fin n -> relation A) : relation A :=
@@ -752,10 +752,10 @@ Section SCT.
752752 intros [k _]. depelim k.
753753 split. intros [Hfz|Hfs].
754754 now exists fz.
755- specialize (H x y x y). rewrite -> H in Hfs.
755+ specialize (H x y x y). rw H in Hfs.
756756 destruct Hfs. now exists (fs x0).
757757 intros [k Hk]. depelim k. now left. right.
758- rewrite (H x y). now exists k.
758+ rw (H x y). now exists k.
759759 Qed .
760760
761761 Equations fin_all k (p : fin k -> bool) : bool :=
@@ -770,7 +770,7 @@ Section SCT.
770770 destruct (p fz) eqn:pfz. simpl. specialize (IHk (fun f => p (fs f))).
771771 simpl in IHk. destruct IHk; constructor. intros f; depelim f; auto.
772772 intro Hf. apply n. intros f'. apply Hf.
773- simpl. constructor. intros H. specialize (H fz). rewrite pfz in H. discriminate.
773+ simpl. constructor. intros H. specialize (H fz). rw pfz in H. discriminate.
774774 Qed .
775775
776776 Definition graph_eq {k} (g g' : graph k) : bool :=
@@ -813,7 +813,7 @@ Section SCT.
813813 forall x y, list_union (rs ++ rs') x y <-> list_union rs x y \/ list_union rs' x y.
814814 Proof .
815815 induction rs; intros; simpl; simp list_union; intuition.
816- rewrite -> IHrs in H0. intuition.
816+ rw IHrs in H0. intuition.
817817 Qed .
818818
819819 Equations map_k_tuple k (p : k_tuple_type k) (f : fin k -> nat) : k_tuple_type k :=
@@ -878,7 +878,7 @@ Section SCT.
878878 intuition.
879879 + revert H. clear -inS inScomp Ingi.
880880 induction famgi. simpl. intros [].
881- simpl. rewrite in_app_iff in_map_iff.
881+ simpl. rw in_app_iff in_map_iff.
882882 intros [[x [<- Inx]]| Ing]. apply inScomp. intuition auto.
883883 apply Ingi. constructor. auto.
884884 apply IHfamgi; auto. intros.
@@ -958,9 +958,9 @@ Section SCT.
958958 Proof .
959959 induction k. unfold TI_graph. do 2 red in G. intros f; depelim f.
960960 intros f. depelim f. simp TI_graph graph_compose.
961- destruct (G fz) as [[weight d]|]; simpl; try easy. now rewrite orb_false_r.
961+ destruct (G fz) as [[weight d]|]; simpl; try easy. now rw orb_false_r.
962962 simp TI_graph graph_compose.
963- destruct (G (fs f)) as [[weight d]|]; simpl; trivial. now rewrite orb_false_r.
963+ destruct (G (fs f)) as [[weight d]|]; simpl; trivial. now rw orb_false_r.
964964 Qed .
965965
966966 Definition TI k : relation (k_tuple_type k) := graph_relation (TI_graph k).
@@ -977,10 +977,10 @@ Section SCT.
977977 intros Hg. pose proof Hg. rewrite -> graph_relation_spec in H.
978978 intros. pose (H fz). simpl in y0. intuition.
979979 assert (graph_relation (TI_graph k) rx ry).
980- rewrite graph_relation_spec. intros. clear y0. specialize (H (fs f)). simpl in H.
980+ rw graph_relation_spec. intros. clear y0. specialize (H (fs f)). simpl in H.
981981 unfold TI_graph. destruct k. depelim f. auto.
982982 do 2 red in IHk. simpl in IHk. rewrite <- IHk. apply H0.
983- + intros [Hle Hi]. unfold TI. rewrite graph_relation_spec.
983+ + intros [Hle Hi]. unfold TI. rw graph_relation_spec.
984984 intros. depelim f. simpl. auto. simpl.
985985 do 2 red in IHk. simpl in IHk. rewrite <- IHk in Hi.
986986 red in Hi. rewrite -> graph_relation_spec in Hi.
@@ -990,7 +990,7 @@ Section SCT.
990990
991991 #[global] Instance TI_AlmostFull k : AlmostFull (TI k).
992992 Proof .
993- rewrite TI_intersection_equiv.
993+ rw TI_intersection_equiv.
994994 induction k. simpl. red. red. exists ZT. simpl. intros. exact I.
995995 simpl. apply af_interesection.
996996 apply (AlmostFull_MR Nat.le). apply almost_full_le.
@@ -1012,11 +1012,11 @@ Section SCT.
10121012 exists x. intuition. }
10131013 pose (compose_approximates G (TI_graph k) T (TI k)).
10141014 forward a; auto. forward a; auto. unfold TI. red. intuition.
1015- rewrite TI_compose' in a.
1015+ rw TI_compose' in a.
10161016 apply (approximates_power n) in a.
10171017 specialize (a x x). specialize (a H0).
10181018 rewrite -> graph_relation_spec in a. specialize (a f).
1019- rewrite eqpow in a. lia.
1019+ rw eqpow in a. lia.
10201020 Qed .
10211021
10221022 Theorem size_change_termination {k} (n : nat)
@@ -1146,7 +1146,7 @@ Section SCT.
11461146 Lemma existsb_spec {A} (p : A -> bool) l : reflect (exists x, In x l /\ p x = true) (existsb p l).
11471147 Proof .
11481148 destruct existsb eqn:Heq. constructor. now apply existsb_exists in Heq.
1149- constructor. intro. apply existsb_exists in H. rewrite Heq in H; discriminate.
1149+ constructor. intro. apply existsb_exists in H. rw Heq in H; discriminate.
11501150 Qed .
11511151 Lemma eqb_refl {A} `{E:Eq A} (a : A) : eqb a a = true.
11521152 Proof . destruct (eqb_spec a a); intuition. Qed .
@@ -1227,7 +1227,7 @@ Section SCT.
12271227 + intros * H l Haux.
12281228(* forward H. red. intuition.
12291229 specialize (H l Haux). apply H. auto with datatypes.
1230- rewrite app_nil_r. red. intuition. intuition.
1230+ rw app_nil_r. red. intuition. intuition.
12311231 + intros * n * tracc l' [= <-]. simpl. split. intuition.
12321232 intros inclgs incltrgs becacc.
12331233 intuition. red. intuition. red.
@@ -1373,6 +1373,7 @@ Equations T_graphs (f : fin 2) : graph 2 :=
13731373 T_graphs (fs fz) := T_graph_r.
13741374
13751375Definition gnlex : (nat * nat) -> nat.
1376+ Proof .
13761377 assert (sct:=size_change_termination 2 T_rel T_graphs). forward sct.
13771378 intros f; depelim f. apply approximates_T_l. depelim f. apply approximates_T_r. depelim f.
13781379 specialize (sct T_trans_clos). forward sct. apply (compute_transitive_closure_spec 10). reflexivity.
@@ -1402,17 +1403,18 @@ Print Assumptions gnlex. *)
14021403(* Eval native_compute in gnlex (4, 3). *)
14031404
14041405Lemma gnlex_0_l y : gnlex (0, y) = 1.
1405- Admitted .
1406+ Proof . Admitted .
14061407
14071408Lemma gnlex_0_r x : gnlex (x, 0) = 1.
1408- Admitted .
1409+ Proof . Admitted .
14091410
14101411
14111412Lemma gnlex_S x y : gnlex (S x, S y) = gnlex (S y, y) + gnlex (S y, x).
1412- Admitted .
1413+ Proof . Admitted .
14131414
14141415Lemma gnlex_S_test x y : exists foo, gnlex (S x, S y) = foo.
1415- eexists. rewrite gnlex_S. destruct y. rewrite gnlex_0_r.
1416- destruct x. rewrite gnlex_0_r. reflexivity.
1417- rewrite gnlex_S. rewrite gnlex_0_r. destruct x. admit. rewrite gnlex_S.
1416+ Proof .
1417+ eexists. rw gnlex_S. destruct y. rw gnlex_0_r.
1418+ destruct x. rw gnlex_0_r. reflexivity.
1419+ rw gnlex_S. rw gnlex_0_r. destruct x. admit. rw gnlex_S.
14181420Admitted .
0 commit comments