123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102-------------------------------------------------------------------------- The Agda standard library---- Propositional equality---- This file contains some core definitions which are re-exported by-- Relation.Binary.PropositionalEquality.------------------------------------------------------------------------ {-# OPTIONS --cubical-compatible --safe #-} module Relation.Binary.PropositionalEquality.Core where open import Data.Product.Base using (_,_)open import Function.Base using (_∘_)open import Levelopen import Relation.Binary.Coreopen import Relation.Binary.Definitionsopen import Relation.Nullary.Negation.Core using (¬_) private variable a b ℓ : Level A B C : Set a -------------------------------------------------------------------------- Propositional equality open import Agda.Builtin.Equality public infix 4 _≢__≢_ : {A : Set a} → Rel A ax ≢ y = ¬ x ≡ y -------------------------------------------------------------------------- Pointwise equality infix 4 _≗_ _≗_ : (f g : A → B) → Set __≗_ {A = A} {B = B} f g = ∀ x → f x ≡ g x -------------------------------------------------------------------------- A variant of `refl` where the argument is explicit pattern erefl x = refl {x = x} -------------------------------------------------------------------------- Congruence lemmas cong : ∀ (f : A → B) {x y} → x ≡ y → f x ≡ f ycong f refl = refl cong′ : ∀ {f : A → B} x → f x ≡ f xcong′ _ = refl icong : ∀ {f : A → B} {x y} → x ≡ y → f x ≡ f yicong = cong _ icong′ : ∀ {f : A → B} x → f x ≡ f xicong′ _ = refl cong₂ : ∀ (f : A → B → C) {x y u v} → x ≡ y → u ≡ v → f x u ≡ f y vcong₂ f refl refl = refl cong-app : ∀ {A : Set a} {B : A → Set b} {f g : (x : A) → B x} → f ≡ g → (x : A) → f x ≡ g xcong-app refl x = refl -------------------------------------------------------------------------- Properties of _≡_ sym : Symmetric {A = A} _≡_sym refl = refl trans : Transitive {A = A} _≡_trans refl eq = eq subst : Substitutive {A = A} _≡_ ℓsubst P refl p = p subst₂ : ∀ (_∼_ : REL A B ℓ) {x y u v} → x ≡ y → u ≡ v → x ∼ u → y ∼ vsubst₂ _ refl refl p = p resp : ∀ (P : A → Set ℓ) → P Respects _≡_resp P refl p = p respˡ : ∀ (∼ : Rel A ℓ) → ∼ Respectsˡ _≡_respˡ _∼_ refl x∼y = x∼y respʳ : ∀ (∼ : Rel A ℓ) → ∼ Respectsʳ _≡_respʳ _∼_ refl x∼y = x∼y resp₂ : ∀ (∼ : Rel A ℓ) → ∼ Respects₂ _≡_resp₂ _∼_ = respʳ _∼_ , respˡ _∼_ -------------------------------------------------------------------------- Properties of _≢_ ≢-sym : Symmetric {A = A} _≢_≢-sym x≢y = x≢y ∘ sym