Coq 证明补码是内合的

Coq proof that complement is involutive

如何证明集合的补集是内合的?

  Require Import Ensembles. Arguments In {_}. Arguments Complement {_}.

  Variables (T:Type) (A:Ensemble T).
  Axiom set_eq: forall (E1 E2:Ensemble T), (forall x, E1 x <-> E2 x) -> E1 = E2.

  Lemma complement_involutive: 
      forall x, In (Complement (Complement A)) x -> In A x.

编辑:假设 decidable (In A x) 使 firstorder 能够完全证明引理。

complement_involutive 恰好是 ~ ~ A x -> A x,即 well-known 等同于排中律,在本例中是 Type,因此如果不假设它是,则无法在 Coq 中证明一个公理。看到这个答案 https://math.stackexchange.com/questions/1370805/why-cant-you-prove-the-law-of-the-excluded-middle-in-intuitionistic-logic-for