-
Notifications
You must be signed in to change notification settings - Fork 0
/
333.lp
37 lines (29 loc) · 859 Bytes
/
333.lp
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
require open AL_library.Notation
// ////////////////////////
// Entiers naturels
///////////////////////////
constant symbol nat : Set
set declared "ℕ"
definition ℕ ≔ τ nat
constant symbol zero : ℕ
constant symbol succ : ℕ → ℕ
// Enabling builtin natural number literals
set builtin "0" ≔ zero
set builtin "+1" ≔ succ
///////////////////////////////
// Addition
///////////////////////////////
symbol plus : ℕ → ℕ → ℕ
set infix left 6 "+" ≔ plus
assert λx y z,x+y+z ≡ λx y z,(x+y)+z // check that x+y=z is parsed correctly
rule 0 + $y ↪ $y
with succ $x + $y ↪ succ ($x + $y)
// //////////////////////// Logique sur les booléens
//require open amelie.small
// ...
// //////////////////////// Retour sur les entiers naturels
theorem plus_0_n : Πn, π ((0+n) = n)
proof
assume n
refine eq_refl n
qed