|
16 | 16 | (** This file collects some axioms used throughout the CompCert development. *)
|
17 | 17 |
|
18 | 18 | Require ClassicalFacts.
|
| 19 | +Require FunctionalExtensionality. |
19 | 20 |
|
20 | 21 | (** * Extensionality axioms *)
|
21 | 22 |
|
22 |
| -(** The following [Require Export] gives us functional extensionality for dependent function types: |
23 |
| -<< |
24 |
| -Axiom functional_extensionality_dep : forall {A} {B : A -> Type}, |
25 |
| - forall (f g : forall x : A, B x), |
26 |
| - (forall x, f x = g x) -> f = g. |
27 |
| ->> |
28 |
| -and, as a corollary, functional extensionality for non-dependent functions: |
29 |
| -<< |
30 |
| -Lemma functional_extensionality {A B} (f g : A -> B) : |
| 23 | +(** The [Require FunctionalExtensionality] gives us functional |
| 24 | + extensionality for dependent function types: *) |
| 25 | + |
| 26 | +Lemma functional_extensionality_dep: |
| 27 | + forall {A: Type} {B : A -> Type} (f g : forall x : A, B x), |
31 | 28 | (forall x, f x = g x) -> f = g.
|
32 |
| ->> |
| 29 | +Proof @FunctionalExtensionality.functional_extensionality_dep. |
| 30 | + |
| 31 | +(** and, as a corollary, functional extensionality for non-dependent functions: |
33 | 32 | *)
|
34 |
| -Require Export FunctionalExtensionality. |
| 33 | + |
| 34 | +Lemma functional_extensionality: |
| 35 | + forall {A B: Type} (f g : A -> B), (forall x, f x = g x) -> f = g. |
| 36 | +Proof @FunctionalExtensionality.functional_extensionality. |
35 | 37 |
|
36 | 38 | (** For compatibility with earlier developments, [extensionality]
|
37 | 39 | is an alias for [functional_extensionality]. *)
|
38 | 40 |
|
39 | 41 | Lemma extensionality:
|
40 | 42 | forall (A B: Type) (f g : A -> B), (forall x, f x = g x) -> f = g.
|
41 |
| -Proof. intros; apply functional_extensionality. auto. Qed. |
| 43 | +Proof @functional_extensionality. |
42 | 44 |
|
43 | 45 | Implicit Arguments extensionality.
|
44 | 46 |
|
45 |
| -(** We also assert propositional extensionality. *) |
46 |
| - |
47 |
| -Axiom prop_ext: ClassicalFacts.prop_extensionality. |
48 |
| -Implicit Arguments prop_ext. |
49 |
| - |
50 | 47 | (** * Proof irrelevance *)
|
51 | 48 |
|
52 |
| -(** We also use proof irrelevance, which is a consequence of propositional |
53 |
| - extensionality. *) |
| 49 | +(** We also use proof irrelevance. *) |
| 50 | + |
| 51 | +Axiom proof_irr: ClassicalFacts.proof_irrelevance. |
54 | 52 |
|
55 |
| -Lemma proof_irr: ClassicalFacts.proof_irrelevance. |
56 |
| -Proof. |
57 |
| - exact (ClassicalFacts.ext_prop_dep_proof_irrel_cic prop_ext). |
58 |
| -Qed. |
59 | 53 | Implicit Arguments proof_irr.
|
0 commit comments