Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mistakes in the definition of Poset #124

Open
t-wissmann opened this issue Apr 17, 2023 · 1 comment
Open

Mistakes in the definition of Poset #124

t-wissmann opened this issue Apr 17, 2023 · 1 comment

Comments

@t-wissmann
Copy link
Contributor

The definition of Poset in Instance/Poset.v currently is:

Definition Poset {C : Category} `{R : relation C}
           `(P : PreOrder C R) `{Asymmetric C R} : Category := Proset P.

I think there are two issues:

  1. C should only be a Type and not a category (the morphism structure isn't used anywhere as far as I can see)
  2. The relation R should be Antisymmetric instead of Asymmetric.

This second issue implies that all inhabitants of Poset are empty, i.e. any element of a poset leads to a contradiction:

Require Import Category.Lib.
Require Import Category.Theory.Category.
Require Import Category.Instance.Proset.

Require Import Coq.Classes.Equivalence.
Require Import Coq.Relations.Relation_Definitions.

Generalizable All Variables.
Set Implicit Arguments.

Definition Poset {C : Type} `{R : relation C}
           `(P : PreOrder C R) `{Asymmetric C R} : Category := Proset P.

Theorem there_is_no_poset
  {C : Type} `(P : PreOrder C R) `{Asymmetric C R} :
  Poset P -> False.
Proof.
  intro x.
  simpl in *.
  destruct P as [refl _].
  eapply H; unshelve apply (refl x); apply (refl x).
Qed.

I assume the definition should be revised as follows:

Definition Poset {C : Type} `{R : relation C}
           `(P : PreOrder C R) `{Antisymmetric C R} : Category := Proset P.

If there aren't any further subtleties that I missed, I can prepare a PR.

@t-wissmann t-wissmann changed the title Why does Poset have a category parameter? Mistakes in the definition of Poset Apr 17, 2023
@jwiegley
Copy link
Owner

@t-wissmann Thank you for pointing this out! I'd happily accept a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants