Commit 18f83bcb authored by Robbert Krebbers's avatar Robbert Krebbers

Add class `Involutive`.

parent 77eecb3c
......@@ -327,6 +327,8 @@ Class Trichotomy {A} (R : relation A) :=
trichotomy x y : R x y x = y R y x.
Class TrichotomyT {A} (R : relation A) :=
trichotomyT x y : {R x y} + {x = y} + {R y x}.
Class Involutive {A} (R : relation A) (f : A A) :=
involutive x : R (f (f x)) x.
Arguments irreflexivity {_} _ {_} _ _ : assert.
Arguments inj {_ _ _ _} _ {_} _ _ _ : assert.
......@@ -344,6 +346,7 @@ Arguments anti_symm {_ _} _ {_} _ _ _ _ : assert.
Arguments total {_} _ {_} _ _ : assert.
Arguments trichotomy {_} _ {_} _ _ : assert.
Arguments trichotomyT {_} _ {_} _ _ : assert.
Arguments involutive {_ _} _ {_} _ : assert.
Lemma not_symmetry `{R : relation A, !Symmetric R} x y : ¬R x y ¬R y x.
Proof. intuition. Qed.
......
  • Isn't it a bit strange to have a class with 0 instances in the library?

  • I suppose we could add an instance for negation of integers?

  • Looking at the other classes, isn't Involutive R f the same as Cancel R f f?

    Edited by Ralf Jung
  • I was also about to suggest a relation to idempotency, which I thought was something like f (f x) = f x, but it doesn't seem like we have that? We work with such a function a lot though, it's called the core. (Well, things get more complicated because that can also be partial.)

    We only have f x x = x, which is an idempotent element of an operation, but not an idempotent operation.

    Edited by Ralf Jung
  • Looking at the other classes, isn't Involutive R f the same as Cancel R f f?

    Good point, maybe we should just make it a notation for that?

  • I was also about to suggest a relation to idempotency,

    Not sure if that's worth it.

  • mentioned in merge request !79 (merged)

    Toggle commit list
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment