Zulip Chat Archive

Stream: Is there code for X?

Topic: ReflTransGen equivalent of TransGen.closed'


Maja Kądziołka (Mar 06 2025 at 15:00):

I have r a b -> P a -> P b and I would like to obtain ReflTransGen r a b -> P a -> P b. do we have that? for TransGen there's TransGen.closed', which would suffice when combined with TransGen.swap, but there doesn't seem to be an equivalent for ReflTransGen. is the API just not orthogonal for no reason, or am I missing something here?

Robin Arnez (Mar 06 2025 at 15:19):

Not sure about the API but if you want a proof:

theorem Relation.ReflTransGen.closed'
    (r : α  α  Prop) {P : α  Prop} (h :  a b, r a b  P b  P a) {a b : α}
    (h' : ReflTransGen r a b) : P b  P a := by
  induction h' with
  | refl => exact id
  | tail h' rel ih =>
    exact ih  h _ _ rel

Last updated: May 02 2025 at 03:31 UTC