aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/changelog/10-standard-library/13365-axiom-free-wf.rst4
-rw-r--r--theories/Program/Wf.v5
2 files changed, 6 insertions, 3 deletions
diff --git a/doc/changelog/10-standard-library/13365-axiom-free-wf.rst b/doc/changelog/10-standard-library/13365-axiom-free-wf.rst
new file mode 100644
index 0000000000..1fc40894eb
--- /dev/null
+++ b/doc/changelog/10-standard-library/13365-axiom-free-wf.rst
@@ -0,0 +1,4 @@
+- **Fixed:**
+ `Coq.Program.Wf.Fix_F_inv` and `Coq.Program.Wf.Fix_eq` are now axiom-free. They no longer assume proof irrelevance.
+ (`#13365 <https://github.com/coq/coq/pull/13365>`_,
+ by Li-yao Xia).
diff --git a/theories/Program/Wf.v b/theories/Program/Wf.v
index 50351d6a14..688db8b812 100644
--- a/theories/Program/Wf.v
+++ b/theories/Program/Wf.v
@@ -12,8 +12,6 @@
Require Import Coq.Init.Wf.
Require Import Coq.Program.Utils.
-Require Import ProofIrrelevance.
-Require Import FunctionalExtensionality.
Local Open Scope program_scope.
@@ -51,7 +49,7 @@ Section Well_founded.
Lemma Fix_F_inv : forall (x:A) (r s:Acc R x), Fix_F_sub x r = Fix_F_sub x s.
Proof.
intro x; induction (Rwf x); intros.
- rewrite (proof_irrelevance (Acc R x) r s) ; auto.
+ rewrite <- 2 Fix_F_eq; intros. apply F_ext; intros []; auto.
Qed.
Lemma Fix_eq : forall x:A, Fix_sub x = F_sub x (fun y:{ y:A | R y x} => Fix_sub (proj1_sig y)).
@@ -226,6 +224,7 @@ Ltac fold_sub f :=
(** This module provides the fixpoint equation provided one assumes
functional extensionality. *)
+Require Import FunctionalExtensionality.
Module WfExtensionality.