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
00c5cb46
Commit
00c5cb46
authored
4 years ago
by
gabrielhdt
Browse files
Options
Downloads
Patches
Plain Diff
redoing numbers
parent
e7f808a9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
prelude/numbers.lp
+14
-9
14 additions, 9 deletions
prelude/numbers.lp
with
14 additions
and
9 deletions
prelude/numbers.lp
+
14
−
9
View file @
00c5cb46
...
@@ -3,11 +3,14 @@ require open personoj.encodings.pvs_cert
...
@@ -3,11 +3,14 @@ require open personoj.encodings.pvs_cert
require open personoj.encodings.bool_hol
require open personoj.encodings.bool_hol
require open personoj.encodings.prenex
require open personoj.encodings.prenex
require open personoj.prelude.logic
require open personoj.prelude.logic
require open personoj.encodings.builtins
require open personoj.encodings.subtype2
//
//
// Theory numbers
// Theory numbers
//
//
constant symbol number: θ {|set|}
constant symbol number: θ {|set|}
rule η (μ number) ↪ η number
//
//
// Theory number_fields
// Theory number_fields
...
@@ -17,6 +20,8 @@ definition number_field ≔ psub field_pred
...
@@ -17,6 +20,8 @@ definition number_field ≔ psub field_pred
// number_field is an uninterpreted subtype
// number_field is an uninterpreted subtype
definition numfield ≔ number_field
definition numfield ≔ number_field
symbol insertnum: η {|!Number!|} → η numfield
symbol {|+|}: η (numfield ~> numfield ~> numfield)
symbol {|+|}: η (numfield ~> numfield ~> numfield)
set infix left 6 "+" ≔ {|+|}
set infix left 6 "+" ≔ {|+|}
symbol {|-|}: η (numfield ~> numfield ~> numfield)
symbol {|-|}: η (numfield ~> numfield ~> numfield)
...
@@ -43,17 +48,17 @@ symbol associative_add
...
@@ -43,17 +48,17 @@ symbol associative_add
//
//
constant symbol real_pred: η (pred numfield)
constant symbol real_pred: η (pred numfield)
definition real ≔ psub real_pred
definition real ≔ psub real_pred
// theorem real_not_empty: Term (∃ real_pred)
// proof admit
// constant symbol zero : Term real
set debug +u
// // Built in the PVS typechecker
set flag "print_implicits" on
symbol Num_real: ε (∀ (λx: η {|!Number!|}, real_pred (insertnum x)))
// definition nonzero_real_pred ≔ neq zero
// Built in the PVS typechecker
// definition nonzero_real ≔ Psub nonzero_real_pred
// theorem nonzero_real_not_empty: Term (∃ nonzero_real_pred)
definition nonzero_real ≔
// proof admit
psub {real}
// definition nzreal ≔ nonzero_real
(λx: η real,
neq _ x (cast {_} {real} (λx, x) (insertnum 0) _))
// symbol closed_plus_real: Π(x y: Term real),
// symbol closed_plus_real: Π(x y: Term real),
// let pr ≔ S.restr numfield real_pred in
// 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