| 1 |
Module Foo. |
| 2 |
Definition binary A := A -> A -> Prop. |
| 3 |
|
| 4 |
Definition inter A (R1 R2 : binary A): binary A := |
| 5 |
fun (x y:A) => R1 x y /\ R2 x y. |
| 6 |
End Foo. |
| 7 |
|
| 8 |
Module Simple_sparse_proof. |
| 9 |
Parameter node : Type. |
| 10 |
Parameter graph : Type. |
| 11 |
Parameter has_edge : graph -> node -> node -> Prop. |
| 12 |
Implicit Types x y z : node. |
| 13 |
Implicit Types G : graph. |
| 14 |
|
| 15 |
Parameter mem : forall A, A -> list A -> Prop. |
| 16 |
Axiom mem_nil : forall x, mem node x nil = False. |
| 17 |
|
| 18 |
Definition notin (l: list node): node -> node -> Prop := |
| 19 |
fun x y => ~ mem node x l /\ ~ mem node y l. |
| 20 |
|
| 21 |
Definition edge_notin G l : node -> node -> Prop := |
| 22 |
Foo.inter node (has_edge G) (notin l). |
| 23 |
|
| 24 |
#[export] Hint Unfold Foo.inter notin edge_notin : rel_crush. |
| 25 |
|
| 26 |
Lemma edge_notin_nil G : forall x y, edge_notin G nil x y <-> has_edge G x y. |
| 27 |
Proof. |
| 28 |
intros. autounfold with rel_crush. rewrite !mem_nil. tauto. |
| 29 |
Qed. |
| 30 |
End Simple_sparse_proof. |