(* -*- coding: utf-8 -*- *)
(************************************************************************)
(*         *      The Rocq Prover / The Rocq Development Team           *)
(*  v      *         Copyright INRIA, CNRS and contributors             *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)
(* File Eqdep.v created by Christine Paulin-Mohring in Coq V5.6, May 1992 *)
(* Further documentation and variants of eq_rect_eq by Hugo Herbelin, Apr 2003 *)
(* Abstraction with respect to the eq_rect_eq axiom and renaming to EqdepFacts.v by Hugo Herbelin, Mar 2006 *)
(** This file defines dependent equality and shows its equivalence with equality on dependent pairs (inhabiting sigma-types). It derives the consequence of axiomatizing the invariance by substitution of reflexive equality proofs and shows the equivalence between the 4 following statements  - Invariance by Substitution of Reflexive Equality Proofs. - Injectivity of Dependent Equality - Uniqueness of Identity Proofs - Uniqueness of Reflexive Identity Proofs - Streicher's Axiom K  These statements are independent of the calculus of constructions [2].  References:  [1] T. Streicher, Semantical Investigations into Intensional Type Theory, Habilitationsschrift, LMU München, 1993. [2] M. Hofmann, T. Streicher, The groupoid interpretation of type theory, Proceedings of the meeting Twenty-five years of constructive type theory, Venice, Oxford University Press, 1998  Table of contents:  1. Definition of dependent equality and equivalence with equality of dependent pairs and with dependent pair of equalities  2. Eq_rect_eq <-> Eq_dep_eq <-> UIP <-> UIP_refl <-> K  3. Definition of the functor that builds properties of dependent equalities assuming axiom eq_rect_eq  *)
(************************************************************************)
(** * Definition of dependent equality and equivalence with equality of dependent pairs *)
(* Set Universe Polymorphism. *)
Section Dependent_Equality.
Variable U : Type.
Variable P : U -> Type.
(** Dependent equality *)
Inductive eq_dep (p:U) (x:P p) : forall q:U, P q -> Prop :=
eq_dep_intro : eq_dep p x p x.
#[local]
Hint Constructors eq_dep: core.

Lemma eq_dep_sym :
forall (p q:U) (x:P p) (y:P q), eq_dep p x q y -> eq_dep q y p x.