Last active
March 17, 2026 20:45
-
-
Save mukeshtiwari/68785dbc5dacc5490be0c9b0339407a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From Stdlib Require Import Utf8. | |
| Section Equality. | |
| (* https://xavierleroy.org/CdF/2018-2019/10.pdf *) | |
| Definition Leibniz_eq {A : Type} (x y : A) : Prop := | |
| ∀ (P : A -> Prop), P x <-> P y. | |
| Theorem Leibniz_equality_forward {A : Type} : | |
| ∀ (x y : A), x = y -> Leibniz_eq x y. | |
| Proof. | |
| intros * ha. | |
| refine match ha in _ = y' return Leibniz_eq x y' | |
| with | |
| | eq_refl => ltac:(firstorder) | |
| end. | |
| Qed. | |
| Theorem Leibniz_equality_backward {A : Type} : | |
| ∀ (x y : A), Leibniz_eq x y -> x = y. | |
| Proof. | |
| intros * ha *. | |
| eapply ha. | |
| exact eq_refl. | |
| Defined. | |
| End Equality. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment