Commit a89a1e98 authored by Robbert Krebbers's avatar Robbert Krebbers

Merge branch 'fossacs2013'

Conflicts:
	ars.v
	assertions.v
	axiomatic.v
	base.v
	doc/index.html
	expressions.v
	fin_maps.v
	memory.v
	smallstep.v
	state.v
	statements.v
	tactics.v
parents 6c89f5de 18f43bf1
......@@ -3,7 +3,7 @@ PREREQUISITES
This version is known to compile with:
- Coq 8.4
- Coq 8.4pl1
- SCons 2.0
BUILDING INSTRUCTIONS
......
......@@ -48,12 +48,10 @@ Hint Constructors rtc nsteps bsteps tc : ars.
Section rtc.
Context `{R : relation A}.
Instance rtc_preorder: PreOrder (rtc R).
Proof.
split.
* red. apply rtc_refl.
* red. induction 1; eauto with ars.
Qed.
Global Instance rtc_reflexive: Reflexive (rtc R).
Proof. red. apply rtc_refl. Qed.
Global Instance rtc_transitive: Transitive (rtc R).
Proof. red. induction 1; eauto with ars. Qed.
Lemma rtc_once x y : R x y rtc R x y.
Proof. eauto with ars. Qed.
Instance rtc_once_subrel: subrelation R (rtc R).
......@@ -170,8 +168,6 @@ Hint Extern 5 (subrelation _ (rtc _)) =>
eapply @rtc_once_subrel : typeclass_instances.
Hint Extern 5 (subrelation _ (tc _)) =>
eapply @tc_once_subrel : typeclass_instances.
Hint Extern 5 (PreOrder (rtc _)) =>
eapply @rtc_preorder : typeclass_instances.
Hint Resolve
rtc_once rtc_r
......@@ -187,16 +183,25 @@ Section subrel.
Lemma nf_subrel x : nf R2 x nf R1 x.
Proof. intros H1 H2. destruct H1. by apply red_subrel. Qed.
Global Instance rtc_subrel: subrelation (rtc R1) (rtc R2).
Instance rtc_subrel: subrelation (rtc R1) (rtc R2).
Proof. induction 1; [left|eright]; eauto; by apply Hsub. Qed.
Global Instance nsteps_subrel: subrelation (nsteps R1 n) (nsteps R2 n).
Instance nsteps_subrel: subrelation (nsteps R1 n) (nsteps R2 n).
Proof. induction 1; [left|eright]; eauto; by apply Hsub. Qed.
Global Instance bsteps_subrel: subrelation (bsteps R1 n) (bsteps R2 n).
Instance bsteps_subrel: subrelation (bsteps R1 n) (bsteps R2 n).
Proof. induction 1; [left|eright]; eauto; by apply Hsub. Qed.
Global Instance tc_subrel: subrelation (tc R1) (tc R2).
Instance tc_subrel: subrelation (tc R1) (tc R2).
Proof. induction 1; [left|eright]; eauto; by apply Hsub. Qed.
End subrel.
Hint Extern 5 (subrelation (rtc _) (rtc _)) =>
eapply @rtc_subrel : typeclass_instances.
Hint Extern 5 (subrelation (nsteps _) (nsteps _)) =>
eapply @nsteps_subrel : typeclass_instances.
Hint Extern 5 (subrelation (bsteps _) (bsteps _)) =>
eapply @bsteps_subrel : typeclass_instances.
Hint Extern 5 (subrelation (tc _) (tc _)) =>
eapply @tc_subrel : typeclass_instances.
Notation wf := well_founded.
Section wf.
......
......@@ -43,9 +43,9 @@ Notation "(≠ x )" := (λ y, y ≠ x) (only parsing) : C_scope.
Hint Extern 0 (?x = ?x) => reflexivity.
Notation "(→)" := (λ x y, x y) (only parsing) : C_scope.
Notation "( T →)" := (λ y, T y) (only parsing) : C_scope.
Notation "(→ T )" := (λ y, y T) (only parsing) : C_scope.
Notation "(→)" := (λ A B, A B) (only parsing) : C_scope.
Notation "( A →)" := (λ B, A B) (only parsing) : C_scope.
Notation "(→ B )" := (λ A, A B) (only parsing) : C_scope.
Notation "t $ r" := (t r)
(at level 65, right associativity, only parsing) : C_scope.
......@@ -57,6 +57,18 @@ Notation "(∘)" := compose (only parsing) : C_scope.
Notation "( f ∘)" := (compose f) (only parsing) : C_scope.
Notation "(∘ f )" := (λ g, compose g f) (only parsing) : C_scope.
Notation "(∧)" := and (only parsing) : C_scope.
Notation "( A ∧)" := (and A) (only parsing) : C_scope.
Notation "(∧ B )" := (λ A, A B) (only parsing) : C_scope.
Notation "(∨)" := or (only parsing) : C_scope.
Notation "( A ∨)" := (or A) (only parsing) : C_scope.
Notation "(∨ B )" := (λ A, A B) (only parsing) : C_scope.
Notation "(↔)" := iff (only parsing) : C_scope.
Notation "( A ↔)" := (iff A) (only parsing) : C_scope.
Notation "(↔ B )" := (λ A, A B) (only parsing) : C_scope.
(** Set convenient implicit arguments for [existT] and introduce notations. *)
Arguments existT {_ _} _ _.
Notation "x ↾ p" := (exist _ x p) (at level 20) : C_scope.
......@@ -413,6 +425,41 @@ Arguments left_absorb {_ _} _ _ {_} _.
Arguments right_absorb {_ _} _ _ {_} _.
Arguments anti_symmetric {_} _ {_} _ _ _ _.
Instance: Commutative () ().
Proof. red. intuition. Qed.
Instance: Commutative () ().
Proof. red. intuition. Qed.
Instance: Associative () ().
Proof. red. intuition. Qed.
Instance: Idempotent () ().
Proof. red. intuition. Qed.
Instance: Commutative () ().
Proof. red. intuition. Qed.
Instance: Associative () ().
Proof. red. intuition. Qed.
Instance: Idempotent () ().
Proof. red. intuition. Qed.
Instance: LeftId () True ().
Proof. red. intuition. Qed.
Instance: RightId () True ().
Proof. red. intuition. Qed.
Instance: LeftAbsorb () False ().
Proof. red. intuition. Qed.
Instance: RightAbsorb () False ().
Proof. red. intuition. Qed.
Instance: LeftId () False ().
Proof. red. intuition. Qed.
Instance: RightId () False ().
Proof. red. intuition. Qed.
Instance: LeftAbsorb () True ().
Proof. red. intuition. Qed.
Instance: RightAbsorb () True ().
Proof. red. intuition. Qed.
Instance: LeftId () True impl.
Proof. unfold impl. red. intuition. Qed.
Instance: RightAbsorb () True impl.
Proof. unfold impl. red. intuition. Qed.
(** The following lemmas are more specific versions of the projections of the
above type classes. These lemmas allow us to enforce Coq not to use the setoid
rewriting mechanism. *)
......
This diff is collapsed.
......@@ -123,6 +123,7 @@ Ltac simplify_equality := repeat
| H : ?f _ = ?f _ |- _ => apply (injective f) in H
(* before [injection'] to circumvent bug #2939 in some situations *)
| H : _ = _ |- _ => injection' H
| H : ?x = ?x |- _ => clear H
end.
(** Coq's default [remember] tactic does have an option to name the generated
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment