-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNotation.lp
35 lines (29 loc) · 1023 Bytes
/
Notation.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
// General notations
// Proposition type
constant symbol Prop : TYPE // Type of propositions
set declared "π"
injective symbol π : Prop → TYPE // Interpretation of propositions in TYPE
// Set type
constant symbol Set : TYPE // Type of set codes
set declared "τ"
injective symbol τ : Set → TYPE // Interpretation of set codes in TYPE
// Leibniz equality
constant symbol eq {a} : τ a → τ a → Prop
set infix 8 "=" ≔ eq
constant symbol eq_refl {a} (x : τ a) : π (x = x)
constant symbol eq_ind {a} (x y : τ a) : π (x = y) → Πp, π (p y) → π (p x)
// Set builtins for the rewrite tactic
set builtin "P" ≔ π
set builtin "T" ≔ τ
set builtin "eq" ≔ eq
set builtin "refl" ≔ eq_refl
set builtin "eqind" ≔ eq_ind
// Properties of Leibniz equality
theorem eq_sym {a} (x y:τ a) : π (x=y) → π (y=x)
proof
assume a x y xy
symmetry
apply xy
qed
// constant symbol pi : Π (a : U), (T a → U) → U ??
// rule T (pi $a $f) → Π (x : T $a), T ($f x) ??