1

Isabelle is a sort of logical framework. You can introduce the axioms and rules of a logic and reason about them using the meta-theory. For instance, you can see the encoding of intuitionistic first order logic in IFOL.thy of the Isabelle distribution. Here is the declaration of quantifier constants:

typedecl o

judgment
  Trueprop :: ‹o ⇒ prop›  (‹(_)› 5)

axiomatization
  All :: ‹('a ⇒ o) ⇒ o›  (binder ‹∀› 10) and
  Ex :: ‹('a ⇒ o) ⇒ o›  (binder ‹∃› 10)
where
  allI: ‹(⋀x. P(x)) ⟹ (∀x. P(x))› and
  spec: ‹(∀x. P(x)) ⟹ P(x)› and
  exI: ‹P(x) ⟹ (∃x. P(x))› and
  exE: ‹⟦∃x. P(x); ⋀x. P(x) ⟹ R⟧ ⟹ R›

This procedure certainly fits in higher-order logic. You can also see that the rules are encoded in the meta-theory which has symbols ⟹ and ⋀.

However, in Coq I don't think you have a logical framework (?).

How does one encode IFOL in Coq?

user1868607
  • 2,558
  • 1
  • 17
  • 38

1 Answers1

2

I don't know Isabelle so I could be missing some subtleties about the meaning of axiomatization, but here's a rough approximation:

Parameter o : Type.

Parameter TrueProp : o -> Prop.

Implicit Types A : Type.

Notation "[ P ]" := (TrueProp P) : o_scope.
Local Open Scope o_scope.

Parameter All : forall {A}, (A -> o) -> o.
Parameter Ex  : forall {A}, (A -> o) -> o.

Parameter allI : forall {A} P, (forall x : A, [ P x ]) -> [ All P ].
Parameter spec : forall {A} P (x : A), [ All P ] -> [ P x ].
Parameter exI : forall {A} P (x : A), [ P x ] -> [ Ex P ].
Parameter exE : forall {A} (P : A -> o) (R : Prop), ([ Ex P ] /\ (forall x : A, [ P x ] -> R)) -> R.
Li-yao Xia
  • 31,896
  • 2
  • 33
  • 56