再帰理論

Shoenfield. Mathematical Logic.

Require Import classical_logic.
Require Import partial_function.
Require Import power.

Set Implicit Arguments.

n: nat

Type
n: nat

Type

Type
n: nat
IHn: Type
Type

Type
exact unit.
n: nat
IHn: Type

Type
exact (prod nat IHn). Defined.

nats 2 -> nat

nats 2 -> nat
X: nats 2

nat
m, n: nat

nat
exact (m + n). Defined.

nats 2 -> nat

nats 2 -> nat
X: nats 2

nat
m, n: nat

nat
exact (m * n). Defined. Inductive recursive_function : forall n : nat, (nats n -> nat) -> Prop := | add : recursive_function 2 addition | mult : recursive_function 2 multiplication. Record partial_subset (A : Type) : Type := make_partial_subset { dom_ : power A; S :> power ({ a : A | a ∈ dom_ }); }.
A: Type
P: partial_subset A

A ⇀ nat
A: Type
P: partial_subset A

A ⇀ nat
A: Type
P: partial_subset A

power A
A: Type
P: partial_subset A
{a : A | a ∈ ?dom} -> nat
A: Type
P: partial_subset A

power A
exact (P.(dom_)).
A: Type
P: partial_subset A

{a : A | a ∈ dom_ P} -> nat
A: Type
P: partial_subset A
X: {a : A | a ∈ dom_ P}

nat
A: Type
P: partial_subset A
X: {a : A | a ∈ dom_ P}
H: (X ∈ P) + (~ X ∈ P)

nat
A: Type
P: partial_subset A
X: {a : A | a ∈ dom_ P}
m: X ∈ P

nat
A: Type
P: partial_subset A
X: {a : A | a ∈ dom_ P}
n: ~ X ∈ P
nat
A: Type
P: partial_subset A
X: {a : A | a ∈ dom_ P}
m: X ∈ P

nat
exact 0.
A: Type
P: partial_subset A
X: {a : A | a ∈ dom_ P}
n: ~ X ∈ P

nat
exact 1. Defined.