aboutsummaryrefslogtreecommitdiff
path: root/Nat.thy
blob: 657e79070c818694d3cc7c6f43eae22e73717091 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
(*
Title:  Nat.thy
Author: Joshua Chen
Date:   2018

Natural numbers
*)

theory Nat
imports HoTT_Base

begin


axiomatization
  Nat    :: t  ("ℕ") and
  zero   :: t  ("0") and
  succ   :: "t ⇒ t" and
  indNat :: "[[t, t] ⇒ t, t, t] ⇒ t"  ("(1ind⇩ℕ)")
where
  Nat_form: "ℕ: U O" and

  Nat_intro_0: "0: ℕ" and

  Nat_intro_succ: "n: ℕ ⟹ succ n: ℕ" and

  Nat_elim: "⟦
    a: C 0;
    n: ℕ;
    C: ℕ ⟶ U i;
    ⋀n c. ⟦n: ℕ; c: C n⟧ ⟹ f n c: C (succ n) ⟧ ⟹ ind⇩ℕ f a n: C n" and

  Nat_comp_0: "⟦
    a: C 0;
    C: ℕ ⟶ U i;
    ⋀n c. ⟦n: ℕ; c: C(n)⟧ ⟹ f n c: C (succ n) ⟧ ⟹ ind⇩ℕ f a 0 ≡ a" and

  Nat_comp_succ: "⟦
    a: C 0;
    n: ℕ;
    C: ℕ ⟶ U i;
    ⋀n c. ⟦n: ℕ; c: C n⟧ ⟹ f n c: C (succ n) ⟧ ⟹ ind⇩ℕ f a (succ n) ≡ f n (ind⇩ℕ f a n)"

lemmas Nat_form [form]
lemmas Nat_routine [intro] = Nat_form Nat_intro_0 Nat_intro_succ Nat_elim
lemmas Nat_comps [comp] = Nat_comp_0 Nat_comp_succ


end