Newer
Older
require open personoj.encodings.lhol
require open personoj.encodings.pvs_cert
require open personoj.encodings.bool_hol
require open personoj.encodings.prenex
// definition neq {T: Set} (x y: η T) ≔ ¬ (x = y)
symbol neq: χ (∀S (λt, scheme (t ~> t ~> bool)))
rule neq _ $x $y ↪ ¬ ($x = $y)
set infix left 2 "/=" ≔ neq
set infix left 2 "≠" ≔ neq
//
// if_def
//
//
// boolean_props
// Slightly modified from the prelude
constant symbol bool_exclusive: ε (neq bool false true)
constant
symbol bool_inclusive
: ε (∀ {bool} (λa, ((eq {bool} a false) ∨ (λ_, eq {bool} a true))))
{bool}
(λb, eq {bool} (xor a b)
(if {bool} a (λ_, ¬ b) (λ_, b)))))
// FIXME: needs another prenex polymorphism to be encoded,
require open personoj.encodings.pvs_more
definition pred : ι ({|set|} *> {|set|}) ≔ λt: θ {|set|}, t ~> bool
definition PRED ≔ pred
definition predicate ≔ pred
definition PREDICATE ≔ pred
definition setof ≔ pred
definition SETOF ≔ pred
//
// exists1
//
//
// equality_props
//
constant symbol reflexivity_of_equals: ε (∀B (λt, ∀ (λx: η t, x = x)))
constant
symbol transitivity_of_equals
: ε (∀B (λt,
// Not in prelude!
theorem eqind {t} x y: ε (x = y) → Πp: η t → Bool, ε (p y) → ε (p x)
proof
assume t x y heq
apply symmetry_of_equals t x y heq
qed
set builtin "eqind" ≔ eqind