Skip to content

Commit 8843bce

Browse files
committed
Wellfounded/Inclusion.v add lemma for when the inclusion is partial
1 parent 3b915a2 commit 8843bce

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

theories/Wellfounded/Inclusion.v

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,40 @@
1010

1111
(** Author: Bruno Barras *)
1212

13-
From Stdlib Require Import Relation_Definitions.
13+
From Stdlib Require Import Relation_Definitions Relation_Operators.
1414

1515
Section WfInclusion.
1616
Variable A : Type.
1717
Variables R1 R2 : A -> A -> Prop.
1818

19+
Lemma Acc_partial_incl : forall z : A,
20+
(forall x y, clos_refl_trans _ R1 y z -> R1 x y -> R2 x y) ->
21+
Acc R2 z -> Acc R1 z.
22+
Proof.
23+
intros z H.
24+
induction 1 as [z Hz IH].
25+
apply Acc_intro.
26+
intros y Hy.
27+
apply IH.
28+
- apply H,Hy.
29+
auto with sets.
30+
- intros x z' Hz' HR.
31+
apply H, HR.
32+
apply rt_trans with y;auto with sets.
33+
Qed.
34+
1935
Lemma Acc_incl : inclusion A R1 R2 -> forall z:A, Acc R2 z -> Acc R1 z.
2036
Proof.
2137
induction 2.
22-
apply Acc_intro; auto with sets.
38+
apply Acc_intro; auto.
2339
Qed.
2440

2541
#[local]
2642
Hint Resolve Acc_incl : core.
2743

2844
Theorem wf_incl : inclusion A R1 R2 -> well_founded R2 -> well_founded R1.
2945
Proof.
30-
unfold well_founded; auto with sets.
46+
unfold well_founded; auto.
3147
Qed.
3248

3349
End WfInclusion.

0 commit comments

Comments
 (0)