]> matita.cs.unibo.it Git - helm.git/blob - helm/software/helena/examples/exp_math/L.hln
last commit for helena 0.8.2
[helm.git] / helm / software / helena / examples / exp_math / L.hln
1 \require preamble
2
3 \* Intuitionistic Predicate Logic with Equality *\
4
5 \open elements \* [1] 2.1. 2.2. 3.1 *\
6
7    \decl "logical false" False: *Prop
8
9    \decl "logical conjunction" And: { [*Prop] [*Prop] } *Prop
10
11    \decl "logical disjunction" Or: { [*Prop] [*Prop] } *Prop
12
13 \* implication and non-dependent abstraction are isomorphic *\
14    \def "logical implication" 
15       Imp = { [p:*Prop] [q:*Prop] } [p]^1 q : { [*Prop] [*Prop] } *Prop
16
17 \* comprehension and dependent abstraction are isomorphic *\
18    \def "unrestricted logical comprehension"
19       All = [q:[*Obj]^1 *Prop] [x:*Obj]^1 q(x) : [[*Obj]^1 *Prop] *Prop
20
21    \decl "unrestricted logical existence" Ex: [[*Obj]^1 *Prop] *Prop
22
23    \decl "syntactical identity" Id: { [*Obj] [*Obj] } *Prop
24
25 \close
26
27 \open abbreviations \* [1] 2.3. *\
28
29    \def "logical negation" 
30       Not = [p:*Prop] Imp(p, False) : [*Prop] *Prop
31
32    \def "logical equivalence"
33       Iff = { [p:*Prop] [q:*Prop] } And(Imp(p, q), Imp(q, p)) : { [*Prop] [*Prop] } *Prop
34
35    \def "unrestricted strict logical existence"
36       EX = [p:[*Obj]^1 *Prop] Ex([x:*Obj]^2 And(p(x), All([y:*Obj]^2 Imp(p(y), Id(x, y)))))
37          : [[*Obj]^1 *Prop] *Prop
38
39    \def "negated syntactical identity"
40       NId = { [x:*Obj] [y:*Obj] } Not(Id(x, y)) : { [*Obj] [*Obj] } *Prop
41
42 \close