Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] For arbitrary crelations, is symmetry involutive?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] For arbitrary crelations, is symmetry involutive?


Chronological Thread 
  • From: Gaetan Gilbert <gaetan.gilbert AT ens-lyon.fr>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] For arbitrary crelations, is symmetry involutive?
  • Date: Sun, 30 Apr 2017 12:20:41 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gaetan.gilbert AT ens-lyon.fr; spf=Neutral smtp.mailfrom=gaetan.gilbert AT ens-lyon.fr; spf=None smtp.helo=postmaster AT labbe.ens-lyon.fr
  • Ironport-phdr: 9a23:yjuilhXbk0dxl4UtoAuHBdmYZ1jV8LGtZVwlr6E/grcLSJyIuqrYYx2At8tkgFKBZ4jH8fUM07OQ6PG8HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjSwbLd9IRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KptVRTmijoINyQh/W/KlMJwgqJVrhGvqRNxzIHbYp2aOeF7fq/BZ94XX3ZNU8hTWiFHH4iyb5EPD+0EPetArofyvUUBrQekCgmqGejhyz5Ihnvt0qIkyeQhDRzN0QsvH90UrnvUsM/6NKEIXeC6zanIyS7MYO1M2Tfh84XHbBYhoeqVUbJ0ccvRzk8vGxnLjlWKsIHoOS6e2OoKs2ie9eVgVOSvhnYpqgFwoTivx98shZfUiYIU0F/I7yJ5wJw6JdC+VUV1YsakHYNNuyyVK4d6WMEvTmNytCony7ALu4S3cDYUxJg53xLSauKLf5KV7h7/SuqdOyp0iX1mdb6lmhq/8Eetx+vhXceuyllKtDBKktzUu3ANyRPT7s+HR+N5/ki7wjmAzB7c5vtaLkAyjqrXMpohw743lpoVq0jDEDX2lF33jK+QaEok5vCl5/nob7n6vJORNY15hhvjPqkvmMGzG/o0PhYQU2SD/OSzzrzj/Un3QLVQif02l7HUsJ/AKssFuq62GQlV3pws6xa+Czepy8oXnWMbLF9eZh2HiZPpN0jKIPH4Cve/hU6gkDlxx/zeJL3uHo3NLmTfkLfmZbty90lcyBMqwd9D45JUF6oOLenoWk7xsdzYFgU2Pxa1w+bhEtV915kRVXiBAq+DY+vutgqD4ftqKO2RbqcUviz8Ir4r/a3Al3g8zHAUcLWg29M4aXSyE+56axGWaHfwi9FHHmYOtAckUMTnjkbHVS9UYTC8RfRvtXkAFIu6ANKbFciWi7ub0XLjEw==

[fun _ _ => bool] is an equivalence so it still doesn't work.

(Setoid is about relations in Prop, not crelations, so if you have proof irrelevance from some axiom the theorem is trivial.

If you don't have proof irrelevance the theorem implies it, see attached file)

Either you need to avoid relying on symmetry being involutive, or you need to take an hypothesis about it.

In the later case since you're using equivalences it might be worth looking at groupoids https://en.wikipedia.org/wiki/Groupoid#Category_theoretic where you have

f⁻¹⁻¹ = f⁻¹⁻¹ ∘ id
= f⁻¹⁻¹ ∘ (f⁻¹ ∘ f)
= (f⁻¹⁻¹ ∘ f⁻¹) ∘ f
= id ∘ f
= f

(if you need a coherence law on symmetry you may need ones for reflexivity and transitivity as well)

Gaëtan Gilbert

On 29/04/2017 10:16, John Wiegley wrote:
"GG" == Gaetan Gilbert
<gaetan.gilbert AT ens-lyon.fr>
writes:
GG> [symmetry] is not involutive: take [R := fun _ _ => bool] and for the
GG> proof of symmetry [fun x y (H : R x y) => true : R y x].

GG> Then for some x and y, [false : R x y] and [symmetry (symmetry false) =
GG> true <> false].

Hi Gaëtan,

How about relations that are known to be equivalences?

Theorem symmetry_invol `{Setoid A} (x y : A) (R : x === y) :
symmetry (symmetry R) = R.


Require Import RelationClasses.

Axiom symmetry_invol : forall A r (Heq : Equivalence r) (x y : A) (R : r x y),
    symmetry (symmetry R) = R.

Inductive boolP : Prop := trueP | falseP.

Lemma trueP_eq_falseP : trueP = falseP.
Proof.
pose (r := fun _ _ : unit => boolP).
unshelve refine (let Heq := _ : Equivalence r in _).
- split;red;[intros ?;exact trueP|idtac|intros ?????;exact trueP].
  intros x y _;exact trueP.
- exact (symmetry_invol _ r Heq tt tt falseP).
Qed.

Lemma proof_irrelevance (P : Prop) (p q : P) : p = q.
Proof.
pose (f := fun b => match b with trueP => p | falseP => q end).
change (f trueP = f falseP).
clearbody f.
rewrite trueP_eq_falseP. reflexivity.
Qed.



Archive powered by MHonArc 2.6.18.

Top of Page