Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
personoj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
koizel
personoj
Commits
2ce9178e
Commit
2ce9178e
authored
4 years ago
by
gabrielhdt
Browse files
Options
Downloads
Patches
Plain Diff
inequality as builtin
parent
00c5cb46
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
encodings/builtins.lp
+4
-0
4 additions, 0 deletions
encodings/builtins.lp
prelude/logic.lp
+8
-6
8 additions, 6 deletions
prelude/logic.lp
prelude/numbers.lp
+1
-1
1 addition, 1 deletion
prelude/numbers.lp
with
13 additions
and
7 deletions
encodings/builtins.lp
+
4
−
0
View file @
2ce9178e
...
...
@@ -26,3 +26,7 @@ definition ∃ {T: Set} (P: η T → η bool) ≔ ¬ (∀ (λx, ¬ (P x)))
symbol propositional_extensionality:
ε (∀ {bool} (λp, (∀ {bool} (λq, (iff p q) ⊃ (λ_, eq {bool} p q)))))
definition neq {t} x y ≔ ¬ (eq {t} x y)
set infix left 2 "/=" ≔ neq
set infix left 2 "≠" ≔ neq
This diff is collapsed.
Click to expand it.
prelude/logic.lp
+
8
−
6
View file @
2ce9178e
...
...
@@ -2,6 +2,7 @@ require open personoj.encodings.lhol
require open personoj.encodings.pvs_cert
require open personoj.encodings.bool_hol
require open personoj.encodings.prenex
require open personoj.encodings.builtins
//
// Booleans
// In [adlib.cert_f.bootstrap]
...
...
@@ -14,10 +15,11 @@ require open personoj.encodings.prenex
// Notequal
//
// 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
// symbol neq: χ (∀S (λt, scheme (t ~> t ~> bool)))
// rule neq _ $x $y ↪ ¬ ($x = $y)
// set infix left 2 "/=" ≔ neq
// set infix left 2 "≠" ≔ neq
/// Defined in builtins
//
// if_def
...
...
@@ -26,7 +28,7 @@ set infix left 2 "≠" ≔ neq
//
// boolean_props
// Slightly modified from the prelude
constant symbol bool_exclusive: ε (neq bool false true)
constant symbol bool_exclusive: ε (neq
{
bool
}
false true)
constant
symbol bool_inclusive
: ε (∀ {bool} (λa, ((eq {bool} a false) ∨ (λ_, eq {bool} a true))))
...
...
@@ -40,7 +42,7 @@ qed
//
// xor_def
//
definition xor (a b: η bool) ≔ neq bool a b
definition xor (a b: η bool) ≔ neq
{
bool
}
a b
// PVS solves that kind of things thanks to the (bddsimp) tactic which uses an
// external C program
...
...
This diff is collapsed.
Click to expand it.
prelude/numbers.lp
+
1
−
1
View file @
2ce9178e
...
...
@@ -58,7 +58,7 @@ symbol Num_real: ε (∀ (λx: η {|!Number!|}, real_pred (insertnum x)))
definition nonzero_real ≔
psub {real}
(λx: η real,
neq
_
x (cast {_} {real} (λx, x) (insertnum 0) _))
neq
{_}
x (cast {_} {real} (λx, x) (insertnum 0) _))
// symbol closed_plus_real: Π(x y: Term real),
// let pr ≔ S.restr numfield real_pred in
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment