Skip to content

Instantly share code, notes, and snippets.

@cppio
Created October 23, 2024 05:06
Show Gist options
  • Save cppio/dcbd1f70efc22bd03c817c793e6aa85e to your computer and use it in GitHub Desktop.
Save cppio/dcbd1f70efc22bd03c817c793e6aa85e to your computer and use it in GitHub Desktop.
variable {α : Sort u} (r : α → α → Prop)
inductive EqvClos a : α → Prop
| refl : EqvClos a a
| step : r b c → EqvClos a b → EqvClos a c
| unstep : r b c → EqvClos a c → EqvClos a b
variable {r}
def Quot.exact (h : mk r a = mk r b) : EqvClos r a b :=
(h ▸ .refl : (mk r b).lift (EqvClos r a) fun _ _ h => propext ⟨.step h, .unstep h⟩)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment