Coq johnmajor的函数扩展性&x27;s平等

Coq johnmajor的函数扩展性&x27;s平等,coq,equality,dependent-type,Coq,Equality,Dependent Type,John Major等式的函数可扩展性可证明吗(可能依赖于安全公理) 如果不是,那么假设它是一个公理是安全的吗?它可以从通常的函数扩展性中证明 Require Import Coq.Logic.FunctionalExtensionality. Require Import Coq.Logic.JMeq. Theorem jmeq_funext A (P : A -> Type) (Q : A -> Type) (f : forall a, P a)(g : foral

John Major等式的函数可扩展性可证明吗(可能依赖于安全公理)


如果不是,那么假设它是一个公理是安全的吗?

它可以从通常的函数扩展性中证明

Require Import Coq.Logic.FunctionalExtensionality.
Require Import Coq.Logic.JMeq.

Theorem jmeq_funext
   A (P : A -> Type) (Q : A -> Type)
   (f : forall a, P a)(g : forall a, Q a)
   (h : forall a, JMeq (f a) (g a)) : JMeq f g.
Proof.
  assert (pq_eq : P = Q).
    apply functional_extensionality.
    exact (fun a => match (h a) with JMeq_refl => eq_refl end).
  induction pq_eq.
  assert (fg_eq : f = g).
    apply functional_extensionality_dep.
    exact (fun a => JMeq_rect (fun ga => f a = ga) eq_refl (h a)).
  induction fg_eq.    
  exact JMeq_refl.
Qed.
Require Import Coq.Logic.FunctionalExtensionality.
Require Import Coq.Logic.JMeq.

Theorem jmeq_funext
   A (P : A -> Type) (Q : A -> Type)
   (f : forall a, P a)(g : forall a, Q a)
   (h : forall a, JMeq (f a) (g a)) : JMeq f g.
Proof.
  assert (pq_eq : P = Q).
    apply functional_extensionality.
    exact (fun a => match (h a) with JMeq_refl => eq_refl end).
  induction pq_eq.
  assert (fg_eq : f = g).
    apply functional_extensionality_dep.
    exact (fun a => JMeq_rect (fun ga => f a = ga) eq_refl (h a)).
  induction fg_eq.    
  exact JMeq_refl.
Qed.